Package org.apache.flex.swf.types

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


        int fs0 = fillStyle0Index == 0 ? -1 : fillStyle0Index;
        int fs1 = fillStyle1Index == 0 ? -1 : fillStyle1Index;
        int ls = lineStyleIndex == 0 ? -1 : lineStyleIndex;
        if (shapeRecords != null && shapeRecords.size() > 0)
        {
            ShapeRecord firstRecord = shapeRecords.get(0);
            if (firstRecord instanceof StyleChangeRecord)
            {
                StyleChangeRecord scr = (StyleChangeRecord)firstRecord;
                scr.setDefinedStyles(fs0, fs1, ls, styles);
            }
View Full Code Here


       
        if (shapeRecords != null && shapeRecords.size() > 0)
        {
            for (int i = 0; i < shapeRecords.size(); i++)
            {
                ShapeRecord record = shapeRecords.get(i);
                if (record instanceof StyleChangeRecord)
                {
                    StyleChangeRecord scr = (StyleChangeRecord)record;
                   
                    scr.setDefinedStyles(fs0, fs1, (!scr.isStateLineStyle() && ls > 0) ? ls : -1, styles);
View Full Code Here

       
        if (shapeRecords != null && shapeRecords.size() > 0)
        {
            for (int i = 0; i < shapeRecords.size(); i++)
            {
                ShapeRecord record = shapeRecords.get(i);
                if (record instanceof StyleChangeRecord)
                {
                    StyleChangeRecord old_scr = (StyleChangeRecord) record;
                    StyleChangeRecord new_scr =  new StyleChangeRecord();
                    int old_scrLineStyleIndex = 0;
View Full Code Here

        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).getMoveDeltaX();
                lastMoveY = ((StyleChangeRecord)startSegment).getMoveDeltaY();
               
                // 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 org.apache.flex.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.