Examples of StraightEdgeRecord


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

Examples of flash.swf.types.StraightEdgeRecord

        {
            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

Examples of flash.swf.types.StraightEdgeRecord

                    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

Examples of flash.swf.types.StraightEdgeRecord

                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

Examples of flash.swf.types.StraightEdgeRecord

        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

Examples of flash.swf.types.StraightEdgeRecord

        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

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

            else
            {
                EdgeRecord edge = (EdgeRecord)shape;
                if (edge instanceof StraightEdgeRecord)
                {
                    StraightEdgeRecord straightEdge = (StraightEdgeRecord)edge;
                    out.println("<line dx=\"" + straightEdge.getDeltaX() + "\" dy=\"" +
                                straightEdge.getDeltaY() + "\" />");
                }
                else
                {
                    CurvedEdgeRecord curvedEdge = (CurvedEdgeRecord)edge;
                    out.print("<curve ");
View Full Code Here

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

            else
            {
                EdgeRecord edge = (EdgeRecord)shape;
                if (edge instanceof StraightEdgeRecord)
                {
                    StraightEdgeRecord straightEdge = (StraightEdgeRecord)edge;
                    out.print("SER" + "\t");
                    out.print(straightEdge.getDeltaX() + "\t" + straightEdge.getDeltaY());
                    x += straightEdge.getDeltaX();
                    y += straightEdge.getDeltaY();
                    out.print("\t\t");
                }
                else
                {
                    CurvedEdgeRecord curvedEdge = (CurvedEdgeRecord)edge;
View Full Code Here

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

            if (isEdge)
            {
                final boolean isStraight = bitStream.readBit();
                if (isStraight)
                {
                    final StraightEdgeRecord straightEdge = readStraightEdgeRecord();
                    list.add(straightEdge);
                }
                else
                {
                    final CurvedEdgeRecord curvedEdge = readCurvedEdgeRecord();
View Full Code Here

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

        return new ShowFrameTag();
    }

    private StraightEdgeRecord readStraightEdgeRecord() throws IOException
    {
        StraightEdgeRecord straightEdgeRecord = null;
        final int nbits = 2 + bitStream.readUB(4);
        final boolean isGeneralLine = bitStream.readBit();
        if (isGeneralLine)
        {
            final int dx = bitStream.readSB(nbits);
            final int dy = bitStream.readSB(nbits);
            straightEdgeRecord = new StraightEdgeRecord(dx, dy);
        }
        else
        {
            final boolean isVertLine = bitStream.readBit();
            if (isVertLine)
            {
                final int dy = bitStream.readSB(nbits);
                straightEdgeRecord = new StraightEdgeRecord(0, dy);
            }
            else
            {
                final int dx = bitStream.readSB(nbits);
                straightEdgeRecord = new StraightEdgeRecord(dx, 0);
            }
        }
        return straightEdgeRecord;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.