Package org.apache.flex.swf.types

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


     */
    private static Rect rectUnion(int left, int top, int right, int bottom, Rect rect)
    {
        if (rect == null)
        {
            return new Rect(left, right, top, bottom);
        }
        return new Rect(Math.min(rect.xMin(), left), Math.max(rect.xMax(), right),
                Math.min(rect.yMin(), top), Math.max(rect.yMax(), bottom));       
    }
View Full Code Here


        // TODO: currently we take only scale into account,
        // but depending on joint style, cap style, etc. we need to take
        // the whole matrix into account as well as examine every line segment.
        if (stroke == null)
        {
            return new Rect(0, 0, 0 , 0);
        }
       
        int xMin, xMax, yMin, yMax;
        // Stroke with weight 0 or scaleMode "none" is always drawn
        // at "hairline" thickness, which is exactly one pixel.
        int lineWidth = ls.getWidth();  
        if (lineWidth == 0)
        {
            xMin = (int)StrictMath.rint(-0.5 * TWIPS_PER_PIXEL);
            xMax = (int)StrictMath.rint(0.5 * TWIPS_PER_PIXEL);
            yMin = (int)StrictMath.rint(-0.5 * TWIPS_PER_PIXEL);
            yMax = (int)StrictMath.rint(0.5 * TWIPS_PER_PIXEL);
        }
        else
        {
            xMin = (int)StrictMath.rint(-lineWidth * 0.5);
            xMax = (int)StrictMath.rint(lineWidth * 0.5);
            yMin = (int)StrictMath.rint(-lineWidth * 0.5);
            yMax = (int)StrictMath.rint(lineWidth * 0.5);  
        }
        return new Rect(xMin, xMax, yMin, yMax);
    }   
View Full Code Here

            if (y < ymin) ymin = y;
            if (x > xmax) xmax = x;
            if (y > ymax) ymax = y;
        }
       
        Rect r = new Rect(xmin, xmax, ymin, ymax);       
        return r;
    }
View Full Code Here

        int swfHeight = targetSettings.getDefaultHeight();
        Float attrHeight = targetAttributes.getHeight();
        if (attrHeight != null)
            swfHeight = attrHeight.intValue();

        Rect swfFrameSize = new Rect(ISWFConstants.TWIPS_PER_PIXEL * swfWidth,
                                  ISWFConstants.TWIPS_PER_PIXEL * swfHeight);

        float swfFrameRate = targetSettings.getDefaultFrameRate();
        Float attrFrameRate = targetAttributes.getFrameRate();
        if (attrFrameRate != null)
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.types.Rect

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.