Package flash.swf.types

Examples of flash.swf.types.Shape


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


        r.syncBits();

        sw.fillstyles = decodeFillstyles(shape);
        sw.linestyles = decodeLinestyles(shape);

        Shape s = decodeShape(shape);

        sw.shapeRecords = s.shapeRecords;

        return sw;
    }
View Full Code Here

        return color;
    }

    private Shape decodeGlyph(int shape, int count) throws IOException
    {
        Shape s1 = new Shape();

        r.syncBits();

        // SDK-18153 - Hack to work around third-party generated SWFs that
        // do not include at least one shape record in glyph SHAPE.
View Full Code Here

        return s1;
    }

    private Shape decodeShape(int shape) throws IOException
    {
        Shape s1 = new Shape();

        r.syncBits();

        // we use int[1] so we can pass numBits by reference
        int[] numFillBits = new int[] { r.readUBits(4) };
View Full Code Here

        {
            int index = getCharIndex(referenceChar);
            index = cmapFmt.mapCharCode(index);
            Glyph glyph = getGlyph(index);

            Shape s = getShapeFromGlyph(glyph);

            GlyphEntry ge = new GlyphEntry();
            ge.advance = (int)(getAdvance(referenceChar) * emScale * (useTwips ? SwfConstants.TWIPS_PER_PIXEL : 1));
            ge.character = c;
            ge.shape = s;
View Full Code Here

            long start = System.currentTimeMillis();
            Ellipse2D ellipse = new Ellipse2D.Double(0, 0, 5000, 5000);
            builder.processShape(new PathIteratorWrapper(ellipse.getPathIterator(null)));
            //System.out.println("Created shape in: " + (System.currentTimeMillis() - start) + " ms.");

            Shape shape = builder.build();
            assertTrue("Incorrect no. of Shape Records: " + shape.shapeRecords.size(), shape.shapeRecords.size() == 17); //16 quadratic curves + 1 style change record

            //Build valid SWF DefineShape tag
            ShapeWithStyle sws = new ShapeWithStyle();
            sws.shapeRecords = shape.shapeRecords;
View Full Code Here

            return createGlyphEntry(c, c);
        }

        public GlyphEntry createGlyphEntry(char c, char referenceChar)
        {
            Shape swfShape = null;
            int advance = 0;

            GlyphVector gv = font.createGlyphVector(frc, new char[]{referenceChar});
            java.awt.Shape glyphOutline = gv.getGlyphOutline(0);
View Full Code Here

TOP

Related Classes of flash.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.