Examples of StraightEdgeRecord


Examples of flash.swf.types.StraightEdgeRecord

        else
        {
          EdgeRecord edge = (EdgeRecord)shape;
          if (edge instanceof StraightEdgeRecord)
          {
            StraightEdgeRecord straightEdge = (StraightEdgeRecord)edge;
            out.println("<line dx='" + straightEdge.deltaX + "' dy='" + straightEdge.deltaY + "' />");
          }
          else
          {
            CurvedEdgeRecord curvedEdge = (CurvedEdgeRecord)edge;
View Full Code Here

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

        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

        int dyb = sbt - stt;
        int dyc = (int)(bitmap.height * SwfConstants.TWIPS_PER_PIXEL) - sbt;

        // border
        shapeRecords.add(new StyleChangeRecord(0, dya, 0, 0, 1));
        shapeRecords.add(new StraightEdgeRecord(0, -dya));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 2));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 3));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 0, 6));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 0 ,9));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));
        shapeRecords.add(new StraightEdgeRecord(-dxc, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 8));
        shapeRecords.add(new StraightEdgeRecord(-dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 7));
        shapeRecords.add(new StraightEdgeRecord(-dxa, 0));
        shapeRecords.add(new StraightEdgeRecord(0, -dyc));
        shapeRecords.add(new StyleChangeRecord(0, 0, 4));
        shapeRecords.add(new StraightEdgeRecord(0, -dyb));

        // down 1
        shapeRecords.add(new StyleChangeRecord(dxa, 0, 0, 2, 1));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 5, 4));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 8, 7));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));

        // down 2
        shapeRecords.add(new StyleChangeRecord(dxa + dxb, 0, 0, 3, 2));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 6, 5));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 9, 8));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));

        // right 1
        shapeRecords.add(new StyleChangeRecord(0, dya, 0, 1, 4));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 2, 5));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 3, 6));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));

        // right 2
        shapeRecords.add(new StyleChangeRecord(0, dya + dyb, 0, 4, 7));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 5, 8));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 6, 9));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));

        DefineShape shape = new DefineShape(TagValues.stagDefineShape4);
        shape.bounds = TypeHelper.rect(width, height);
        shape.edgeBounds = shape.bounds;
        shape.shapeWithStyle = sws;
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 flash.swf.types.StraightEdgeRecord

                        nbits = 2;
            w.writeUBits(nbits-2, 4);
                    if (straight)
                    {
                        // line
                        StraightEdgeRecord line = (StraightEdgeRecord) e;
                        encodeStraightEdgeRecord(line, w, nbits);
                    }
                    else
                    {
                        // curve
View Full Code Here

Examples of flash.swf.types.StraightEdgeRecord

            {
                addLineSubdivideAware(midXLeft, midYLeft);
            }
            else
            {
                shape.shapeRecords.add(new StraightEdgeRecord(midXLeft, midYLeft));
            }

            if (Math.abs(midXRight) > limit || Math.abs(midYRight) > limit)
            {
                addLineSubdivideAware(midXRight, midYRight);
            }
            else
            {
                shape.shapeRecords.add(new StraightEdgeRecord(midXRight, midYRight));
            }
        }
        else
        {
            shape.shapeRecords.add(new StraightEdgeRecord(x, y));
        }
    }
View Full Code Here

Examples of flash.swf.types.StraightEdgeRecord

                        nbits = 2;
            w.writeUBits(nbits-2, 4);
                    if (straight)
                    {
                        // line
                        StraightEdgeRecord line = (StraightEdgeRecord) e;
                        encodeStraightEdgeRecord(line, w, nbits);
                    }
                    else
                    {
                        // curve
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

        else
        {
          EdgeRecord edge = (EdgeRecord)shape;
          if (edge instanceof StraightEdgeRecord)
          {
            StraightEdgeRecord straightEdge = (StraightEdgeRecord)edge;
            out.println("<line dx='" + straightEdge.deltaX + "' dy='" + straightEdge.deltaY + "' />");
          }
          else
          {
            CurvedEdgeRecord curvedEdge = (CurvedEdgeRecord)edge;
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.