Package com.adobe.internal.fxg.types

Examples of com.adobe.internal.fxg.types.FXGMatrix.scale()


            spriteStack.push(clipSprite);
            List<ShapeRecord> clipRectRecords = ShapeHelper.rectangle(0.0, 0.0, imageTag.width, imageTag.height);
            DefineShape clipShape = createDefineShape(null, clipRectRecords, new SolidColorFillNode(), null, context.getTransform());
            FXGMatrix bitmapMatrix = TypeHelper.bitmapFillMatrix(fillNode, imageTag, edgeBounds);
            FXGMatrix clipMatrix = new FXGMatrix(bitmapMatrix.a, bitmapMatrix.b, bitmapMatrix.c, bitmapMatrix.d, 0, 0);
            clipMatrix.scale(1.0/SwfConstants.TWIPS_PER_PIXEL, 1.0/SwfConstants.TWIPS_PER_PIXEL);
            clipMatrix.translate(bitmapMatrix.tx, bitmapMatrix.ty);
            GraphicContext clipContext = new GraphicContext();
            clipContext.setTransform(clipMatrix);
            placeObject(clipShape, clipContext);
            spriteStack.pop();
View Full Code Here


        if (mtxNode != null)
        {
            double tx = mtxNode.tx;
            double ty = mtxNode.ty;
            FXGMatrix fxgMtx = new FXGMatrix(mtxNode.a, mtxNode.b, mtxNode.c, mtxNode.d, 0, 0);
            fxgMtx.scale(SwfConstants.TWIPS_PER_PIXEL/(float)SwfConstants.GRADIENT_SQUARE, SwfConstants.TWIPS_PER_PIXEL/(float)SwfConstants.GRADIENT_SQUARE);
            fxgMtx.translate(tx, ty);
            return fxgMtx.toSWFMatrix();
        }            
         
        double w = !Double.isNaN(gradient.getScaleX()) ? gradient.getScaleX()*SwfConstants.TWIPS_PER_PIXEL : pathBounds.getWidth();
View Full Code Here

        double h = !Double.isNaN(gradient.getScaleY()) ? gradient.getScaleY()*SwfConstants.TWIPS_PER_PIXEL: pathBounds.getHeight();
        double tx = (!Double.isNaN(gradient.getX()) ? gradient.getX() : (pathBounds.xMax + pathBounds.xMin) / (2.0*SwfConstants.TWIPS_PER_PIXEL));
        double ty = (!Double.isNaN(gradient.getY()) ? gradient.getY() (pathBounds.yMax + pathBounds.yMin) / (2.0*SwfConstants.TWIPS_PER_PIXEL));
           
        FXGMatrix matrix = new FXGMatrix();
        matrix.scale(w/SwfConstants.GRADIENT_SQUARE, h/SwfConstants.GRADIENT_SQUARE);
        if (!Double.isNaN(gradient.getRotation()) && (gradient.getRotation() != 0))
            matrix.rotate(gradient.getRotation());
        matrix.translate(tx, ty);
       
        return matrix.toSWFMatrix();
View Full Code Here

        //support for node matrix
        MatrixNode mtxNode = gradient.getMatrixNode();
        if (mtxNode != null)
        {
            matrix.translate(GRADIENT_DIMENSION/2.0, GRADIENT_DIMENSION/2.0);
            matrix.scale(1.0/GRADIENT_DIMENSION, 1.0/GRADIENT_DIMENSION);
            FXGMatrix nodeMatrix = new FXGMatrix(mtxNode);
            matrix.concat(nodeMatrix);
            return matrix.toSWFMatrix();
        }
View Full Code Here

        if (mtxNode != null)
        {
            double tx = mtxNode.tx;
            double ty = mtxNode.ty;
            FXGMatrix fxgMtx = new FXGMatrix(mtxNode.a, mtxNode.b, mtxNode.c, mtxNode.d, 0, 0);
            fxgMtx.scale(SwfConstants.TWIPS_PER_PIXEL, SwfConstants.TWIPS_PER_PIXEL);
            fxgMtx.translate(tx, ty);
            return fxgMtx;
        }

        FXGMatrix matrix = new FXGMatrix();
View Full Code Here

        }
      double angle = fill.rotation;
      while (angle < 0)
        angle += 360;
      angle %= 360;
        matrix.scale(scaleX, scaleY);
        matrix.rotate(angle);
        matrix.translate(tx, ty);

        return matrix;
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.