#include <nsStyleTransformMatrix.h>
Public Member Functions | |
| nsStyleTransformMatrix () | |
| Constructor sets the matrix to the identity. | |
| gfxMatrix | GetThebesMatrix (const nsRect &aBounds, float aFactor) const |
| Given a frame's bounding rectangle, returns a gfxMatrix corresponding to the transformation represented by this matrix. | |
| nsStyleTransformMatrix & | operator*= (const nsStyleTransformMatrix &aOther) |
| Multiplies this matrix by another matrix, in that order. | |
| const nsStyleTransformMatrix | operator* (const nsStyleTransformMatrix &aOther) const |
| Returns a new nsStyleTransformMatrix that is equal to one matrix multiplied by another matrix, in that order. | |
| void | SetToTransformFunction (const nsCSSValue::Array *aData, nsStyleContext *aContext, nsPresContext *aPresContext, PRBool &aCanStoreInRuleTree) |
| Given an nsCSSValue::Array* containing a -moz-transform function, updates this matrix to hold the value of that function. | |
| void | SetToIdentity () |
| Sets this matrix to be the identity matrix. | |
| float | GetMainMatrixEntry (PRInt32 aIndex) const |
| Returns the value of the entry at the 2x2 submatrix of the transform matrix that defines the non-affine linear transform. | |
| nscoord | GetXTranslation (const nsRect &aBounds) const |
| Returns the value of the X or Y translation component of the matrix, given the specified bounds. | |
| nscoord | GetYTranslation (const nsRect &aBounds) const |
| nscoord | GetCoordXTranslation () const |
| Get the raw components used for GetXTranslation and GetYTranslation. | |
| nscoord | GetCoordYTranslation () const |
| float | GetWidthRelativeXTranslation () const |
| float | GetWidthRelativeYTranslation () const |
| float | GetHeightRelativeXTranslation () const |
| float | GetHeightRelativeYTranslation () const |
| PRBool | operator== (const nsStyleTransformMatrix &aOther) const |
| Returns whether the two matrices are equal or not. | |
| PRBool | operator!= (const nsStyleTransformMatrix &aOther) const |
Static Public Member Functions | |
| static nsCSSKeyword | TransformFunctionOf (const nsCSSValue::Array *aData) |
| Return the transform function, as an nsCSSKeyword, for the given nsCSSValue::Array from a transform list. | |
| static nsStyleTransformMatrix | ReadTransforms (const nsCSSValueList *aList, nsStyleContext *aContext, nsPresContext *aPresContext, PRBool &aCanStoreInRuleTree) |
| The same as SetToTransformFunction, but for a list of transform functions. | |
| nsStyleTransformMatrix::nsStyleTransformMatrix | ( | ) |
Constructor sets the matrix to the identity.
| nscoord nsStyleTransformMatrix::GetCoordXTranslation | ( | ) | const [inline] |
Get the raw components used for GetXTranslation and GetYTranslation.
| nscoord nsStyleTransformMatrix::GetCoordYTranslation | ( | ) | const [inline] |
| float nsStyleTransformMatrix::GetHeightRelativeXTranslation | ( | ) | const [inline] |
| float nsStyleTransformMatrix::GetHeightRelativeYTranslation | ( | ) | const [inline] |
| float nsStyleTransformMatrix::GetMainMatrixEntry | ( | PRInt32 | aIndex | ) | const [inline] |
Returns the value of the entry at the 2x2 submatrix of the transform matrix that defines the non-affine linear transform.
The order is given as |elem[0] elem[2]| |elem[1] elem[3]|
| aIndex | The element index. |
Given a frame's bounding rectangle, returns a gfxMatrix corresponding to the transformation represented by this matrix.
The transformation takes points in the frame's local space and converts them to points in the frame's transformed space.
| aBounds | The frame's bounding rectangle. | |
| aFactor | The number of app units per device pixel. |
| float nsStyleTransformMatrix::GetWidthRelativeXTranslation | ( | ) | const [inline] |
| float nsStyleTransformMatrix::GetWidthRelativeYTranslation | ( | ) | const [inline] |
Returns the value of the X or Y translation component of the matrix, given the specified bounds.
| aBounds | The bounds of the element. |
| PRBool nsStyleTransformMatrix::operator!= | ( | const nsStyleTransformMatrix & | aOther | ) | const [inline] |
| const nsStyleTransformMatrix nsStyleTransformMatrix::operator* | ( | const nsStyleTransformMatrix & | aOther | ) | const |
Returns a new nsStyleTransformMatrix that is equal to one matrix multiplied by another matrix, in that order.
If C is the result of A * B, then for any vector x, the equivalence C(x) = A(B(x)).
| aOther | The matrix to multiply this matrix by. |
| nsStyleTransformMatrix& nsStyleTransformMatrix::operator*= | ( | const nsStyleTransformMatrix & | aOther | ) |
Multiplies this matrix by another matrix, in that order.
If A' is the value of A after A *= B, then for any vector x, the equivalence A'(x) == A(B(x)) holds.
| aOther | The matrix to multiply this matrix by. |
| PRBool nsStyleTransformMatrix::operator== | ( | const nsStyleTransformMatrix & | aOther | ) | const |
Returns whether the two matrices are equal or not.
| aOther | The matrix to compare to. |
| static nsStyleTransformMatrix nsStyleTransformMatrix::ReadTransforms | ( | const nsCSSValueList * | aList, | |
| nsStyleContext * | aContext, | |||
| nsPresContext * | aPresContext, | |||
| PRBool & | aCanStoreInRuleTree | |||
| ) | [static] |
The same as SetToTransformFunction, but for a list of transform functions.
| void nsStyleTransformMatrix::SetToIdentity | ( | ) |
Sets this matrix to be the identity matrix.
| void nsStyleTransformMatrix::SetToTransformFunction | ( | const nsCSSValue::Array * | aData, | |
| nsStyleContext * | aContext, | |||
| nsPresContext * | aPresContext, | |||
| PRBool & | aCanStoreInRuleTree | |||
| ) |
Given an nsCSSValue::Array* containing a -moz-transform function, updates this matrix to hold the value of that function.
| aData | The nsCSSValue::Array* containing the transform function. | |
| aContext | The style context, used for unit conversion. | |
| aPresContext | The presentation context, used for unit conversion. | |
| aCanStoreInRuleTree | Set to false if the result cannot be cached in the rule tree, otherwise untouched. |
aContext and aPresContext may be null if all of the (non-percent) length values in aData are already known to have been converted to eCSSUnit_Pixel (as they are in an nsStyleAnimation::Value)
| static nsCSSKeyword nsStyleTransformMatrix::TransformFunctionOf | ( | const nsCSSValue::Array * | aData | ) | [static] |
Return the transform function, as an nsCSSKeyword, for the given nsCSSValue::Array from a transform list.
1.7.1