Package org.apache.flex.swf.types

Examples of org.apache.flex.swf.types.Shape


            for (int i = 0; i < tag.getGlyphShapeTable().length; i++)
            {
                indent();
                out.println("<glyph>");

                Shape shape = tag.getGlyphShapeTable()[i];
                indent++;
                printShapeWithTabs(shape);
                indent--;

                indent();
View Full Code Here


                    out.print(" advance=\"" + tag.getFontAdvanceTable()[i] + "\"");
                    out.print(" bounds=\"" + tag.getFontBoundsTable()[i] + "\"");
                }
                out.println(">");

                Shape shape = tag.getGlyphShapeTable()[i];
                indent++;
                if (tabbedGlyphs)
                    printShapeWithTabs(shape);
                else
                    printShape(shape);
View Full Code Here

        currentStyles.styles = null; // No initial style set.
        currentStyles.numFillBits = numFillBits;
        currentStyles.numLineBits = numLineBits;

        // Create ShapeWithStyle tag.
        final Shape shapes = new Shape();
        shapes.setNumFillBits(numFillBits);
        shapes.setNumLineBits(numLineBits);

        // Read ShapeRecords and passing in the style context.
        final List<ShapeRecord> shapeRecords = readShapeRecords(tagType, shapes, currentStyles);
        shapes.addShapeRecords(shapeRecords);
        return shapes;
    }
View Full Code Here

        final int characterId = bitStream.readUI16();
        final Rect startBounds = readRect();
        final Rect endBounds = readRect();
        final long offset = bitStream.readUI32();

        final Shape startEdges = readShapeWithStyle(TagType.DefineMorphShape);
        final Shape endEdges = readShape(TagType.DefineMorphShape);

        final DefineMorphShapeTag tag = new DefineMorphShapeTag();
        tag.setCharacterID(characterId);
        tag.setStartBounds(startBounds);
        tag.setEndBounds(endBounds);
View Full Code Here

        final boolean usesNonScalingStrokes = bitStream.readBit();
        final boolean usesScalingStrokes = bitStream.readBit();
        // 8 bits already. No need to align.
        final long offset = bitStream.readUI32();

        final Shape startEdges = readShapeWithStyle(TagType.DefineMorphShape2);
        final Shape endEdges = readShape(TagType.DefineMorphShape2);

        final DefineMorphShape2Tag tag = new DefineMorphShape2Tag();
        tag.setCharacterID(characterId);
        tag.setStartBounds(startBounds);
        tag.setEndBounds(endBounds);
View Full Code Here

        }
        final int sizeBeforeOffset = tagBuffer.size();

        // fields after "offset"

        Shape startEdges = tag.getStartEdges();
        writeShapeWithStyle((ShapeWithStyle)startEdges, tag.getTagType());

        final int sizeAfterOffsetToEnd = tagBuffer.size() - sizeBeforeOffset;

        // put together
View Full Code Here

        Ellipse2D.Double ellipse = new Ellipse2D.Double(0.0, 0.0, node.width, node.height);
       
        ShapeBuilder builder = new ShapeBuilder();
        IShapeIterator iterator = new PathIteratorWrapper(ellipse.getPathIterator(null));
        builder.processShape(iterator);
        Shape shape = builder.build();
        return placeDefineShapeTag(node, shape.getShapeRecords(), node.fill, node.stroke, node.createGraphicContext());
    }
View Full Code Here

     * @param origin the pen starting point, typically [0.0,0.0]
     * @see #processShape(IShapeIterator)
     */
    public ShapeBuilder(Styles styles, Point origin)
    {
        shape = new Shape();

        if (origin == null)
            origin = new Point();

        this.start = new Point(origin.x, origin.y);
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.types.Shape

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.