Examples of CurvedEdgeRecord


Examples of flash.swf.types.CurvedEdgeRecord

        int dcx = (int)controlX - (int)startX;
        int dcy = (int)controlY - (int)startY;
        int dax = (int)anchorX - (int)controlX;
        int day = (int)anchorY - (int)controlY;

        CurvedEdgeRecord cer = new CurvedEdgeRecord();
        cer.controlDeltaX = dcx;
        cer.controlDeltaY = dcy;
        cer.anchorDeltaX = dax;
        cer.anchorDeltaY = day;
        return cer;
View Full Code Here

Examples of flash.swf.types.CurvedEdgeRecord

                x = x + ser.deltaX;
                y = y + ser.deltaY;
            }
            else if (r instanceof CurvedEdgeRecord)
            {
                CurvedEdgeRecord cer = (CurvedEdgeRecord)r;
               
                Rect currRect = new Rect(x1, x2, y1, y2);
                if (!curveControlPointInsideCurrentRect(x, y, cer, currRect))
                {               
                  Rect curvBounds = computeCurveBounds(x, y, cer);
View Full Code Here

Examples of flash.swf.types.CurvedEdgeRecord

                coordinates[i][0] = coordinates[i-1][0] + ser.deltaX;
                coordinates[i][1] = coordinates[i-1][1] + ser.deltaY;
            }
            else if (record instanceof CurvedEdgeRecord)
            {
                CurvedEdgeRecord cer = (CurvedEdgeRecord)record;                   
                coordinates[i][0] = coordinates[i-1][0] + cer.controlDeltaX + cer.anchorDeltaX;
                coordinates[i][1] = coordinates[i-1][1] + cer.controlDeltaY + cer.anchorDeltaY;
            }                 
        }
        return coordinates;
View Full Code Here

Examples of flash.swf.types.CurvedEdgeRecord

        return list;
    }

    private CurvedEdgeRecord decodeCurvedEdgeRecord() throws IOException
    {
        CurvedEdgeRecord s = new CurvedEdgeRecord();
        int nbits = 2+r.readUBits(4);
        s.controlDeltaX = r.readSBits(nbits);
        s.controlDeltaY = r.readSBits(nbits);
        s.anchorDeltaX = r.readSBits(nbits);
        s.anchorDeltaY = r.readSBits(nbits);
View Full Code Here

Examples of flash.swf.types.CurvedEdgeRecord

            text.append(ch, start, length);
    }

    public void curve(Attributes attributes) throws SAXParseException
    {
        CurvedEdgeRecord curvedEdge = new CurvedEdgeRecord();

        curvedEdge.controlDeltaX = parseInt(getAttribute(attributes, "cdx"));
        curvedEdge.controlDeltaY = parseInt(getAttribute(attributes, "cdy"));
        curvedEdge.anchorDeltaX = parseInt(getAttribute(attributes, "dx"));
        curvedEdge.anchorDeltaY = parseInt(getAttribute(attributes, "dy"));
View Full Code Here

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

        return cxFormWithAlpha;
    }

    private CurvedEdgeRecord readCurvedEdgeRecord() throws IOException
    {
        final CurvedEdgeRecord curvedEdgeRecord = new CurvedEdgeRecord();
        final int nbits = 2 + bitStream.readUB(4);
        curvedEdgeRecord.setControlDeltaX(bitStream.readSB(nbits));
        curvedEdgeRecord.setControlDeltaY(bitStream.readSB(nbits));
        curvedEdgeRecord.setAnchorDeltaX(bitStream.readSB(nbits));
        curvedEdgeRecord.setAnchorDeltaY(bitStream.readSB(nbits));
        return curvedEdgeRecord;
    }
View Full Code Here

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

                    final StraightEdgeRecord straightEdge = readStraightEdgeRecord();
                    list.add(straightEdge);
                }
                else
                {
                    final CurvedEdgeRecord curvedEdge = readCurvedEdgeRecord();
                    list.add(curvedEdge);
                }
            }
            else
            {
View Full Code Here

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

        int dcx = (int)controlX - (int)startX;
        int dcy = (int)controlY - (int)startY;
        int dax = (int)anchorX - (int)controlX;
        int day = (int)anchorY - (int)controlY;

        CurvedEdgeRecord cer = new CurvedEdgeRecord();
        cer.setControlDeltaX(dcx);
        cer.setControlDeltaY(dcy);
        cer.setAnchorDeltaX(dax);
        cer.setAnchorDeltaY(day);
        return cer;
    }
View Full Code Here

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

                x = x + ser.getDeltaX();
                y = y + ser.getDeltaY();
            }
            else if (r instanceof CurvedEdgeRecord)
            {
                CurvedEdgeRecord cer = (CurvedEdgeRecord)r;
               
                Rect currRect = new Rect(x1, x2, y1, y2);
                if (!curveControlPointInsideCurrentRect(x, y, cer, currRect))
                {               
                  Rect curvBounds = computeCurveBounds(x, y, cer);
               
                  if (curvBounds.xMin() < x1) x1 = curvBounds.xMin();
                  if (curvBounds.yMin() < y1) y1 = curvBounds.yMin();
                  if (curvBounds.xMax() > x2) x2 = curvBounds.xMax();
                  if (curvBounds.yMax() > y2) y2 = curvBounds.yMax();
                }
                               
                x = x + cer.getControlDeltaX() + cer.getAnchorDeltaX();
                y = y + cer.getControlDeltaY() + cer.getAnchorDeltaY();
            }

            //update x1, y1 to min values and x2, y2 to max values
            if (x < x1) x1 = x;
            if (y < y1) y1 = y;
View Full Code Here

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

                coordinates[i][0] = coordinates[i-1][0] + ser.getDeltaX();
                coordinates[i][1] = coordinates[i-1][1] + ser.getDeltaY();
            }
            else if (record instanceof CurvedEdgeRecord)
            {
                CurvedEdgeRecord cer = (CurvedEdgeRecord)record;                   
                coordinates[i][0] = coordinates[i-1][0] + cer.getControlDeltaX() + cer.getAnchorDeltaX();
                coordinates[i][1] = coordinates[i-1][1] + cer.getControlDeltaY() + cer.getAnchorDeltaY();
            }                 
        }
        return coordinates;
    }
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.