Package flash.swf.types

Examples of flash.swf.types.ShapeWithStyle


        return t;
    }

    private ShapeWithStyle decodeShapeWithStyle(int shape) throws IOException
    {
        ShapeWithStyle sw = new ShapeWithStyle();

        r.syncBits();

        sw.fillstyles = decodeFillstyles(shape);
        sw.linestyles = decodeLinestyles(shape);
View Full Code Here


            fs = new FillStyle(FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP, matrix, tag);
          }
        }

        // Apply Fill Styles
        ShapeWithStyle sws = new ShapeWithStyle();
        sws.fillstyles = new ArrayList<FillStyle>(1);
        sws.fillstyles.add(fs);

        // Build Raw SWF Shape
        List<ShapeRecord> shapeRecords = ShapeHelper.rectangle(width, height);
View Full Code Here

        int srt = r.xMax;
        int stt = r.yMin;
        int sbt = r.yMax;

        List<ShapeRecord> shapeRecords = new ArrayList<ShapeRecord>(50);
        ShapeWithStyle sws = new ShapeWithStyle();
        sws.fillstyles = new ArrayList<FillStyle>(9);
        sws.shapeRecords = shapeRecords;

        // Apply runtime scale of 20x for twips
        Matrix matrix = new Matrix();
View Full Code Here

    {
        DefineShape tag = new DefineShape(stagDefineShape);
        int id = parseInt(getAttribute(attributes, "id"));
        createCharacter(id, tag);
        tag.bounds = parseRect(getAttribute(attributes, "bounds"));
        tag.shapeWithStyle = new ShapeWithStyle();
        tag.shapeWithStyle.fillstyles = new ArrayList();
        tag.shapeWithStyle.linestyles = new ArrayList();
        tag.shapeWithStyle.shapeRecords = new ArrayList();

        stack.push(tag);
View Full Code Here

    {
        DefineShape tag = new DefineShape(TagValues.stagDefineShape3);
        int id = parseInt(getAttribute(attributes, "id"));
        createCharacter(id, tag);
        tag.bounds = parseRect(getAttribute(attributes, "bounds"));
        tag.shapeWithStyle = new ShapeWithStyle();
        tag.shapeWithStyle.fillstyles = new ArrayList();
        tag.shapeWithStyle.linestyles = new ArrayList();
        tag.shapeWithStyle.shapeRecords = new ArrayList();

        stack.push(tag);
View Full Code Here

        // Calculate the bounds of the shape outline (without strokes) - edgeBounds
        Rect edgeBounds = (node == null) ? ShapeHelper.getBounds(shapeRecords, null, (AbstractStrokeNode)stroke) : node.getBounds(shapeRecords, null);
       
        Rect shapeBounds;

        ShapeWithStyle sws = new ShapeWithStyle();
        sws.shapeRecords = shapeRecords;

        int lineStyleIndex = stroke == null ? 0 : 1;
        int fillStyle0Index = fill == null ? 0 : 1;
        int fillStyle1Index = 0;
View Full Code Here

            clipContext.setTransform(context.getTransform());
            PlaceObject po3clip = placeObject(clipSprite, clipContext);
            po3clip.setClipDepth(po3clip.depth+1);
           
            // Then, process the bitmap image fill
            ShapeWithStyle sws = new ShapeWithStyle();
            sws.shapeRecords = shapeRecords;
            int lineStyleIndex = 0;
            int fillStyle0Index = 1;
            int fillStyle1Index = 0;
            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;
            imageShape.bounds = edgeBounds;
            imageShape.edgeBounds = edgeBounds;
            if ((fill != null) &&( windings.length > 0))
            {
                Winding windingValue = windings[0];
                imageShape.usesFillWindingRule = (windingValue == Winding.NON_ZERO);
            }
            PlaceObject po3 = placeObject(imageShape, context);       
            
            if (stroke != null)
            {
                //make a copy of ShapeRecord for strokes
                ArrayList<ShapeRecord> shapeRecords2 = new ArrayList<ShapeRecord>(shapeRecords);
                Collections.copy(shapeRecords2, shapeRecords);

                //generate the define sprite for the stroke object with no clipping
                ShapeWithStyle swsStroke = new ShapeWithStyle();
                swsStroke.shapeRecords = shapeRecords2;
   
                lineStyleIndex = 1;
                fillStyle0Index = 0;
                fillStyle1Index = 0;
View Full Code Here

    builder.processShape(new PathIteratorWrapper(shape.getPathIterator(null)));
  }

  public ShapeWithStyle build()
  {
    ShapeWithStyle sws = new ShapeWithStyle();
    sws.shapeRecords = builder.build().shapeRecords;
    sws.fillstyles = fillstyles;
    sws.linestyles = linestyles;

    return sws;
View Full Code Here

        return t;
    }

    private ShapeWithStyle decodeShapeWithStyle(int shape) throws IOException
    {
        ShapeWithStyle sw = new ShapeWithStyle();

        r.syncBits();

        sw.fillstyles = decodeFillstyles(shape);
        sw.linestyles = decodeLinestyles(shape);
View Full Code Here

    {
        DefineShape tag = new DefineShape(stagDefineShape);
        int id = parseInt(getAttribute(attributes, "id"));
        createCharacter(id, tag);
        tag.bounds = parseRect(getAttribute(attributes, "bounds"));
        tag.shapeWithStyle = new ShapeWithStyle();
        tag.shapeWithStyle.fillstyles = new ArrayList();
        tag.shapeWithStyle.linestyles = new ArrayList();
        tag.shapeWithStyle.shapeRecords = new ArrayList();

        stack.push(tag);
View Full Code Here

TOP

Related Classes of flash.swf.types.ShapeWithStyle

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.