blob: 492e26f94efbd5f56819ce9d755fadcf2a2b1886 [file] [log] [blame]
{ "type": "class",
"qname": "org.apache.royale.graphics.utils.MatrixUtil",
"baseClassname": ""
,
"description": "The MatrixUtil class is for internal use only. Class for matrix and geometric related math routines.",
"tags": [
{ "tagName": "private",
"values": []} ],
"members": [
{ "type": "method",
"qname": "clampRotation",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns rotation value clamped between -180 and 180 degreeds. This mimicks the Flash player behavior.",
"return": "Number",
"params": [{ "name": "value", "type": "Number"}]}
,
{ "type": "method",
"qname": "transformPoint",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns a static Point object with the result. If matrix is null, point is untransformed.",
"return": "flash.geom.Point",
"params": [{ "name": "x", "type": "Number"},
{ "name": "y", "type": "Number"},
{ "name": "m", "type": "flash.geom.Matrix"}]}
,
{ "type": "method",
"qname": "composeMatrix",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"return": "flash.geom.Matrix",
"params": [{ "name": "x", "type": "Number"},
{ "name": "y", "type": "Number"},
{ "name": "scaleX", "type": "Number"},
{ "name": "scaleY", "type": "Number"},
{ "name": "rotation", "type": "Number"},
{ "name": "transformX", "type": "Number"},
{ "name": "transformY", "type": "Number"}]}
,
{ "type": "method",
"qname": "decomposeMatrix",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Decompose a matrix into its component scale, rotation, and translation parts. The Vector of Numbers passed in the components parameter will be populated by this function with the component parts. and translation values. x = components[0] y = components[1] rotation = components[2] scaleX = components[3] scaleY = components[4]",
"tags": [
{ "tagName": "param",
"values": ["components Vector which holds the component scale, rotation", "matrix The matrix to decompose", "transformX The x value of the transform center", "transformY The y value of the transform center"]} ],
"return": "void",
"params": [{ "name": "components", "type": "Vector.<Number>"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "transformX", "type": "Number"},
{ "name": "transformY", "type": "Number"}]}
,
{ "type": "method",
"qname": "rectUnion",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "<code>Rectangle(left, top, right - left, bottom - top)</code>. Note that if rect is non-null, it will be updated to reflect the return value.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the union of <code>rect</code> and"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Rectangle",
"params": [{ "name": "left", "type": "Number"},
{ "name": "top", "type": "Number"},
{ "name": "right", "type": "Number"},
{ "name": "bottom", "type": "Number"},
{ "name": "rect", "type": "flash.geom.Rectangle"}]}
,
{ "type": "method",
"qname": "getEllipseBoundingBox",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Calculates the bounding box of a post-transformed ellipse. the segment bounding box. bounding box of the the post-transformed ellipse.",
"tags": [
{ "tagName": "param",
"values": ["cx The x coordinate of the ellipse's center", "cy The y coordinate of the ellipse's center", "rx The horizontal radius of the ellipse", "ry The vertical radius of the ellipse", "matrix The transformation matrix.", "rect If non-null, rect will be updated to the union of rect and"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the union of the passed in rect with the"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Rectangle",
"params": [{ "name": "cx", "type": "Number"},
{ "name": "cy", "type": "Number"},
{ "name": "rx", "type": "Number"},
{ "name": "ry", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "rect", "type": "flash.geom.Rectangle"}]}
,
{ "type": "method",
"qname": "getQBezierSegmentBBox",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "the segment bounding box. bezier segment's axis aligned bounding box and the passed in rect.",
"tags": [
{ "tagName": "param",
"values": ["x0 x coordinate of the first control point", "y0 y coordinate of the first control point", "x1 x coordinate of the second control point", "y1 y coordinate of the second control point", "x2 x coordinate of the third control point", "y2 y coordinate of the third control point", "sx The pre-transform scale factor for x coordinates.", "sy The pre-transform scale factor for y coordinates.", "matrix The transformation matrix. Can be null for identity transformation.", "rect If non-null, rect will be updated to the union of rect and"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the union of the post-transformed quadratic"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Rectangle",
"params": [{ "name": "x0", "type": "Number"},
{ "name": "y0", "type": "Number"},
{ "name": "x1", "type": "Number"},
{ "name": "y1", "type": "Number"},
{ "name": "x2", "type": "Number"},
{ "name": "y2", "type": "Number"},
{ "name": "sx", "type": "Number"},
{ "name": "sy", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "rect", "type": "flash.geom.Rectangle"}]}
,
{ "type": "method",
"qname": "transformSize",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "transformed bounds top left to the untransformed bounds top left in the coordinate space defined by <code>matrix</code>. This is useful if you want to align the transformed bounds to x,y by modifying the object's position. Moving the object by <code>x + vec.x</code> and <code>y + vec.y</code> respectively will offset the transformed bounds top left corner by x,y. by other MatrixUtil methods.",
"tags": [
{ "tagName": "param",
"values": ["width The width of the bounds to be transformed.", "height The height of the bounds to be transformed.", "matrix The transfomration matrix.", "vec If vec is non-null it will be set to the vector from the"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the transformed bounds. Note that the Point object returned will be reused"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "width", "type": "Number"},
{ "name": "height", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"}]}
,
{ "type": "method",
"qname": "transformBounds",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "rectangle to be transformed. On return, it will be set to the top left of the rectangle after transformation. by other MatrixUtil methods.",
"tags": [
{ "tagName": "param",
"values": ["width The width of the bounds to be transformed.", "height The height of the bounds to be transformed.", "matrix The transfomration matrix.", "topleft If topLeft is non-null it will be used as the origin of the bounds"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the transformed width and height. Note that the Point object returned will be reused"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "width", "type": "Number"},
{ "name": "height", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "topLeft", "type": "flash.geom.Point"}]}
,
{ "type": "method",
"qname": "projectBounds",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns the axis aligned bounding box <code>bounds</code> transformed with <code>matrix</code> and then projected with <code>projection</code>. original matrix values.</p> transformed and projected bounds.",
"tags": [
{ "tagName": "param",
"values": ["bounds The bounds, in child coordinates, to be transformed and projected.", "matrix <p>The transformation matrix. Note that the method will clobber the", "projection The projection."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the <code>bounds</code> parameter that has been updated with the"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Rectangle",
"params": [{ "name": "bounds", "type": "flash.geom.Rectangle"},
{ "name": "matrix", "type": "flash.geom.Matrix3D"},
{ "name": "projection", "type": "flash.geom.PerspectiveProjection"}]}
,
{ "type": "method",
"qname": "isDeltaIdentity",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "for any <code>pt:Point</code> (<code>matrix</code> is identity matrix, when disregarding the translation part).",
"tags": [
{ "tagName": "param",
"values": ["matrix"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns true when <code>pt == matrix.DeltaTransformPoint(pt)</code>"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "matrix", "type": "flash.geom.Matrix"}]}
,
{ "type": "method",
"qname": "fitBounds",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "<code>fitBounds</code> Calculates a size (x,y) for a bounding box (0,0,x,y) such that the bounding box transformed with <code>matrix</code> will fit into (0,0,width,height). needs to fit in. size needs to fit in. into account when calculating the size. The bounding box (0,0,x,y) of the calculated size (x,y) transformed with <code>matrix</code> will fit in the specified <code>width</code> and <code>height</code>. will first try to find a solution using this width. will first try to find a solution using this height. the function will set the calculated size width to this value. the function will set the calculated size height to this value. fit into (0,0,width,height) after transformation with <code>matrix</code>. Returns null if there is no possible solution.",
"tags": [
{ "tagName": "param",
"values": ["width This is the width of the bounding box that calculated size", "height This is the height of the bounding box that the calculated", "matrix This defines the transformations that the function will take", "explicitWidth Explicit width for the calculated size. The function", "explicitHeight Preferred height for the calculated size. The function", "preferredWidth Preferred width for the calculated size. If possible", "preferredHeight Preferred height for the calculated size. If possible", "minWidth The minimum allowed value for the calculated size width.", "minHeight The minimum allowed value for the calculated size height.", "maxWidth The maximum allowed value for the calculated size width.", "maxHeight The maximum allowed value for the calculated size height."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns the size (x,y) such that the bounding box (0,0,x,y) will"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "width", "type": "Number"},
{ "name": "height", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "explicitWidth", "type": "Number"},
{ "name": "explicitHeight", "type": "Number"},
{ "name": "preferredWidth", "type": "Number"},
{ "name": "preferredHeight", "type": "Number"},
{ "name": "minWidth", "type": "Number"},
{ "name": "minHeight", "type": "Number"},
{ "name": "maxWidth", "type": "Number"},
{ "name": "maxHeight", "type": "Number"}]}
,
{ "type": "method",
"qname": "calcUBoundsToFitTBoundsHeight",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Calculates (x,y) such that the bounding box (0,0,x,y) transformed with <code>matrix</code> will have bounding box with height equal to <code>h</code>. x and y are restricted by <code>minX</code>, <code>maxX</code> and <code>minY</code>, <code>maxY</code>. If possible x will be set to <code>preferredX</code> or y will be set to <code>preferredY</code>. When there are multiple solutions, the function picks the one that minimizes the bounding box area of transformed (0,0,x,y). The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code> (solution components x and y are non-negative).",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns Point(x,y) or null if no solution exists."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "h", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "preferredX", "type": "Number"},
{ "name": "preferredY", "type": "Number"},
{ "name": "minX", "type": "Number"},
{ "name": "minY", "type": "Number"},
{ "name": "maxX", "type": "Number"},
{ "name": "maxY", "type": "Number"}]}
,
{ "type": "method",
"qname": "calcUBoundsToFitTBoundsWidth",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Calculates (x,y) such that the bounding box (0,0,x,y) transformed with <code>matrix</code> will have bounding box with width equal to <code>w</code>. x and y are restricted by <code>minX</code>, <code>maxX</code> and <code>minY</code>, <code>maxY</code>. If possible x will be set to <code>preferredX</code> or y will be set to <code>preferredY</code>. When there are multiple solutions, the function picks the one that minimizes the bounding box area of transformed (0,0,x,y). The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code> (solution components x and y are non-negative).",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Returns Point(x,y) or null if no solution exists."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "w", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "preferredX", "type": "Number"},
{ "name": "preferredY", "type": "Number"},
{ "name": "minX", "type": "Number"},
{ "name": "minY", "type": "Number"},
{ "name": "maxX", "type": "Number"},
{ "name": "maxY", "type": "Number"}]}
,
{ "type": "method",
"qname": "calcUBoundsToFitTBounds",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Calculates (x,y) such that the bounding box (0,0,x,y) transformed with <code>matrix</code> will have bounding box (0,0,w,h). x and y are restricted by <code>minX</code>, <code>maxX</code> and <code>minY</code>, <code>maxY</code>. When there is infinite number of solutions, the function will calculate x and y to be as close as possible. The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code> (solution components x and y are non-negative).",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["Point(x,y) or null if no solution exists."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "flash.geom.Point",
"params": [{ "name": "w", "type": "Number"},
{ "name": "h", "type": "Number"},
{ "name": "matrix", "type": "flash.geom.Matrix"},
{ "name": "minX", "type": "Number"},
{ "name": "minY", "type": "Number"},
{ "name": "maxX", "type": "Number"},
{ "name": "maxY", "type": "Number"}]}
,
{ "type": "method",
"qname": "isEqual",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Determine if two Matrix instances are equal.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["true if the matrices are equal."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "m1", "type": "flash.geom.Matrix"},
{ "name": "m2", "type": "flash.geom.Matrix"}]}
,
{ "type": "method",
"qname": "isEqual3D",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Determine if two Matrix3D instances are equal.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 1.0.0"]},
{ "tagName": "return",
"values": ["true if the matrices are equal."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "m1", "type": "flash.geom.Matrix3D"},
{ "name": "m2", "type": "flash.geom.Matrix3D"}]}
]
}