DescriptionCSS Typed OM: Implement TransformValue::asMatrix
TransformValue::asMatrix returns:
- the identity matrix (2d) when the components are empty
- the multiplication of all the transform components in order
Please note:
- this is a very naive implementation
Alternative improved approaches to consider:
1. Use switch statement and type casts.
Have MatrixTransformComponent::multiplySelf
take arguments TransformComponent and ExceptionState
Then have a switch statement for each type and use
the underlying TransformationMatrix operations, rather than
unnecessarily making O(n) MatrixTransformComponents.
It is also more optimised for operations such as scale etc
where it only multiplies the necessary values, rather
than the entire matrix.
2. Expose TransformValue to TransformationMatrix.
Implement similar to 1. in TransformValue.
Has the pro that MatrixTransformComponent could be kept
as immutable.
BUG=545318
Patch Set 1 #
Depends on Patchset: Messages
Total messages: 2 (1 generated)
|