Class for tracking the graphics state leading to the point where a transform is applied. More...
#include <transforms.h>
Public Member Functions | |
CTransformState (const IDOMNodePtr &node) | |
Initialise to the state that would be active inside the given node. An atttempt will be made to determine the complete state by contatenating the state of all the parents of the given node. The best results will occur when the node's parents lead to an IDOMFixedPage. | |
CTransformState | stateInsideNode (const IDOMNodePtr &node, bool updateTransform=true, bool updateClip=true, bool updateRenderingIntent=true, bool updateEdgeMode=true) const |
Return a new state consisting of this state concatenated with the state implied by the given node. | |
CTransformState | stateInsideBrush (const IDOMBrushPtr &brush, eBrushUsage brushUsage) const |
Return a new state consisting of this state concatenated with the state implied by the given brush. | |
Public Attributes | |
FMatrix | transform |
The current transformation from default coordinates. | |
bool | hasClipBounds |
True if clipBounds is valid. | |
FRect | clipBounds |
The bounds of the current clipping area. | |
IDOMColorSpacePtr | groupColorSpace |
The current group color space. | |
bool | hasRenderingIntent |
True if an explicit rendering intent has been applied. | |
eRenderingIntent | renderingIntent |
Ignored if hasRenderingIntent is false. | |
eBlackPointCompensation | blackPointCompensation |
The current black point compensation. | |
eEdgeMode | edgeMode |
The current edge mode. | |
eBrushUsage | brushUsage |
Set when we descend into a brush. | |
bool | inUncoloredTilingBrush |
void * | transformPriv |
Class for tracking the graphics state leading to the point where a transform is applied.
Consider for example the IImageDownsamplerTransform described later in this header. In order to determine how to downsample an image, the transform needs to know how large the image will eventually be. The CTransformState provides this information by providing the combined transform that applies to the image based on the RenderTransforms of all the nodes entered leading to the point where the image is actually encountered.
Other transforms need access to other information, such as the approximate clip area, the current group color space, the renderingIntent (if present), the current antialiasing mode (edge mode) and/or how a brush is used.
CTransformState JawsMako::CTransformState::stateInsideBrush | ( | const IDOMBrushPtr & | brush, |
eBrushUsage | brushUsage ) const |
Return a new state consisting of this state concatenated with the state implied by the given brush.
brush | The brush whose state we wish to apply. |
brushUsage | The way the brush would be used; ie for filling, stroking, or for use as an opacity mask. |
CTransformState JawsMako::CTransformState::stateInsideNode | ( | const IDOMNodePtr & | node, |
bool | updateTransform = true, | ||
bool | updateClip = true, | ||
bool | updateRenderingIntent = true, | ||
bool | updateEdgeMode = true ) const |
Return a new state consisting of this state concatenated with the state implied by the given node.
node | The node whose state we wish to apply. |
updateTransform | If true, update the transform entry, and also the related black point compensation entry. |
updateClip | If true, update the clipBounds entry |
updateRenderingIntent | If true, update the rendering intent. |
bool JawsMako::CTransformState::inUncoloredTilingBrush |
Set to true when we descend into an uncolored tiling brush (An IDOMTilingPatternBrush with PaintType == 2)
void* JawsMako::CTransformState::transformPriv |
Private contextual information for use by the transform implementation