Package flash.swf.types

Examples of flash.swf.types.StraightEdgeRecord


        else
        {
          EdgeRecord edge = (EdgeRecord)shape;
          if (edge instanceof StraightEdgeRecord)
          {
            StraightEdgeRecord straightEdge = (StraightEdgeRecord)edge;
            out.print("SER" + "\t");
            out.print(straightEdge.deltaX + "\t" + straightEdge.deltaY);
            x += straightEdge.deltaX;
            y += straightEdge.deltaY;
            out.print("\t\t");
View Full Code Here


        {
            numSegments = abs_dy/MAX_EDGE_SIZE + 1;
        }
        else
        {
            StraightEdgeRecord ser = new StraightEdgeRecord(dx, dy);
            shapeRecords.add(ser);
            return shapeRecords;
        }

        int xSeg = dx/numSegments;
        int ySeg = dy/numSegments;
        for (int i=0; i < numSegments; i++)
        {
            if (i == numSegments-1)
            {
                //make up for any rounding errors
                int lastx = dx - xSeg*(numSegments-1);
                int lasty = dy - ySeg*(numSegments-1);
                StraightEdgeRecord ser = new StraightEdgeRecord(lastx, lasty);
                shapeRecords.add(ser);
            }
            else
            {
                StraightEdgeRecord ser = new StraightEdgeRecord(xSeg, ySeg);
                shapeRecords.add(ser);
            }
        }
       
        return shapeRecords;
View Full Code Here

                    firstMove = false;
                }
            }
            else if (r instanceof StraightEdgeRecord)
            {
                StraightEdgeRecord ser = (StraightEdgeRecord)r;
                x = x + ser.deltaX;
                y = y + ser.deltaY;
            }
            else if (r instanceof CurvedEdgeRecord)
            {
View Full Code Here

                coordinates[i][0] = scr.moveDeltaX;
                coordinates[i][1] = scr.moveDeltaY;
            }
            else if (record instanceof StraightEdgeRecord)
            {
                StraightEdgeRecord ser = (StraightEdgeRecord)record;
                coordinates[i][0] = coordinates[i-1][0] + ser.deltaX;
                coordinates[i][1] = coordinates[i-1][1] + ser.deltaY;
            }
            else if (record instanceof CurvedEdgeRecord)
            {
View Full Code Here

        if (r.readBit())
        {
            // general line
            int dx = r.readSBits(nbits);
            int dy = r.readSBits(nbits);
            return new StraightEdgeRecord(dx, dy);
        }
        else
        {
            if (r.readBit())
            {
                // vertical
                int dy = r.readSBits(nbits);
                return new StraightEdgeRecord(0, dy);
            }
            else
            {
                // horizontal
                int dx = r.readSBits(nbits);
                return new StraightEdgeRecord(dx, 0);
            }
        }
    }
View Full Code Here

        tagHandler.importAssets(importAssets);
    }

    public void line(Attributes attributes) throws SAXParseException
    {
        StraightEdgeRecord straightEdge = new StraightEdgeRecord();
        if (hasAttribute(attributes, "dx"))
        {
            straightEdge.deltaX = parseInt(getAttribute(attributes, "dx"));
        }
        if (hasAttribute(attributes, "dy"))
View Full Code Here

TOP

Related Classes of flash.swf.types.StraightEdgeRecord

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.