Package flash.swf.types

Examples of flash.swf.types.ShapeRecord


        boolean firstMove = true;

        Iterator<ShapeRecord> iterator = records.iterator();
        while (iterator.hasNext())
        {
            ShapeRecord r = iterator.next();

            if (r == null)
                continue;

            if (r instanceof StyleChangeRecord)
View Full Code Here


            }

            if (start >= count)
                break; // No more segments with valid tangents

            ShapeRecord startSegment = records.get(start);
            if (startSegment instanceof StyleChangeRecord)
            {
                // remember the last move segment
                lastOpenSegment = start + 1;
                lastMoveX = ((StyleChangeRecord)startSegment).moveDeltaX;
                lastMoveY = ((StyleChangeRecord)startSegment).moveDeltaY;
               
                // move onto next segment:
                start++;
                continue;
            }

            // Does the current segment close to a previous segment and form a
            // joint with it?
            // Note, even if the segment was originally a close segment,
            // it may not form a joint with the segment it closes to, unless
            // it's followed by a MoveSegment or it's the last segment in the
            // sequence.
            int startSegmentX = cooridinates[start][0];
            int startSegmentY = cooridinates[start][1];
            if ((start == count - 1 || records.get(start + 1) instanceof StyleChangeRecord) &&
                    startSegmentX == lastMoveX &&
                    startSegmentY == lastMoveY)
            {
                end = lastOpenSegment;
            }
            else
            {
                end = start + 1;
            }
           
            // Find a segment with a valid tangent or stop at a MoveSegment
            while (end < count && !(records.get(end) instanceof StyleChangeRecord))
            {      
                if (tangentIsValid(records.get(end), startSegmentX, startSegmentY))
                    break;
               
                end++;
            }

            if (end >= count)
                break; // No more segments with valid tangents

            ShapeRecord endSegment = records.get(end);
            if (!(endSegment instanceof StyleChangeRecord))
            {
                newRect = addMiterLimitStrokeToBounds(
                                            startSegment,
                                            endSegment,
View Full Code Here

    }
   
    private static int[][] getCoordinates(List<ShapeRecord> records)
    {
        int[][] coordinates = new int[records.size()][2];
        ShapeRecord record;
        for(int i=0; i<records.size(); i++)
        {
            record = records.get(i);
            if (record instanceof StyleChangeRecord)
            {
View Full Code Here

TOP

Related Classes of flash.swf.types.ShapeRecord

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.