Package flash.swf.types

Examples of flash.swf.types.FillStyle


            if (windings.length > 0)
                ShapeHelper.setPathStyles(shapeRecords, lineStyleIndex, fillStyle0Index, fillStyle1Index);
            else
                ShapeHelper.setStyles(shapeRecords, lineStyleIndex, fillStyle0Index, fillStyle1Index);

            FillStyle fillStyle = createFillStyle(fill, edgeBounds);
            sws.fillstyles = new ArrayList<FillStyle>(1);
            sws.fillstyles.add(fillStyle);
           
            DefineShape imageShape = new DefineShape(Tag.stagDefineShape4);
            imageShape.shapeWithStyle = sws;
View Full Code Here


            return null;
    }

    protected FillStyle createFillStyle(SolidColorFillNode fill)
    {
        FillStyle fs = new FillStyle();
        fs.color = TypeHelper.colorARGB(fill.color, fill.alpha);
        fs.type = FillStyle.FILL_SOLID;
        return fs;
    }
View Full Code Here

        return fs;
    }

    protected FillStyle createFillStyle(BitmapFillNode fill, Rect bounds)
    {       
        FillStyle fs = new FillStyle();
       
        if (ImageHelper.bitmapFillModeIsRepeat(fill))
            fs.type = FillStyle.FILL_BITS;
        else
            fs.type = FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP;
View Full Code Here

        return fs;
    }

    protected FillStyle createFillStyle(LinearGradientFillNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_LINEAR_GRADIENT;
        fs.matrix = TypeHelper.linearGradientMatrix(node, bounds);
        Gradient gradient = new Gradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        fs.gradient = gradient;
View Full Code Here

        return fs;
    }

    protected FillStyle createFillStyle(LinearGradientStrokeNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_LINEAR_GRADIENT;
        fs.matrix = TypeHelper.linearGradientMatrix(node, bounds);
        Gradient gradient = new Gradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        fs.gradient = gradient;
View Full Code Here

        return fs;
    }

    protected FillStyle createFillStyle(RadialGradientFillNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_FOCAL_RADIAL_GRADIENT;
        fs.matrix = TypeHelper.radialGradientMatrix(node, bounds);
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.focalPoint = (float)node.focalPointRatio;
View Full Code Here

        return fs;
    }

    protected FillStyle createFillStyle(RadialGradientStrokeNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_FOCAL_RADIAL_GRADIENT;
        fs.matrix = TypeHelper.radialGradientMatrix(node, bounds);
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.focalPoint = (float)node.focalPointRatio;
View Full Code Here

  {
    Point origin = new Point(graphicContext.getPen().getX(), graphicContext.getPen().getY());
    Paint paint = graphicContext.getPaint();
    Stroke stroke = graphicContext.getStroke();

    FillStyle fs = null;
    LineStyle ls = null;

    if (fill && paint != null)
      fs = FillStyleBuilder.build(paint, shape.getBounds2D(), graphicContext.getTransform());
View Full Code Here

        return a;
    }

    private FillStyle decodeFillStyle(int shape) throws IOException
    {
        FillStyle s = new FillStyle();

        s.type = r.readUI8();
        switch (s.type)
        {
        case FillStyle.FILL_SOLID: // 0x00
View Full Code Here

    public void fillstyle(Attributes attributes) throws SAXParseException
    {
        DefineShape defineShape = (DefineShape)stack.peek();
        boolean hasAlpha = (defineShape.code == stagDefineShape3);
        FillStyle fillstyle = new FillStyle();
        if (hasAttribute(attributes, "color"))
        {
            fillstyle.setType(FillStyle.FILL_SOLID);
            fillstyle.color = hasAlpha ? parseRGBA(getAttribute(attributes, "color")) :
                    parseRGB(getAttribute(attributes, "color"));
        }
        if (hasAttribute(attributes, "gradient"))
        {
            // todo support radial gradients
            fillstyle.setType(FillStyle.FILL_LINEAR_GRADIENT);
            fillstyle.gradient = parseGradient(getAttribute(attributes, "gradient"), hasAlpha);
            fillstyle.matrix = parseMatrix(getAttribute(attributes, "matrix"));
        }
        if (hasAttribute(attributes, "idref"))
        {
            // todo support clipped bitmaps
            fillstyle.setType(FillStyle.FILL_BITS); // tiled
            int idref = parseInt(getAttribute(attributes, "idref"));
            // todo check to make sure bitmapId points to a bitmap
            fillstyle.bitmap = findCharacter(idref);
            fillstyle.matrix = parseMatrix(getAttribute(attributes, "matrix"));
        }
View Full Code Here

TOP

Related Classes of flash.swf.types.FillStyle

Copyright © 2018 www.massapicom. 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.