#include <node.h>
Inheritance diagram for NodeRenderable:
Public Member Functions | |
NodeRenderable () | |
This constructor creates a NodeRenderable linked to no other with all status flags false and an uninitialised bounding rectangle. | |
NodeRenderable (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated. | |
virtual BOOL | CanTransform () |
Determine whether a renderable node can be transformed - if it does not, then no undo information needs to be stored for it. | |
virtual void | Transform (TransformBase &) |
This is the base class verison of the transform function. This is called to move, scale, rotate etc renderable objects. Each class derived from NodeRenderableInk should write a version of this function that manipulates all the control points in the object and updates its bounding box. See NodePath for an example. | |
virtual void | TransformChildren (TransformBase &) |
virtual void | PolyCopyNodeContents (NodeRenderable *NodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual SubtreeRenderState | RenderSubtree (RenderRegion *pRender, Node **ppNextNode=NULL, BOOL bClip=TRUE) |
Virtual function - this function will indicate to the caller whether or not we want to render the given node, according to the information passed in. For this class, it always returns TRUE. | |
virtual BOOL | NeedsToExport (RenderRegion *pRender, BOOL VisibleLayersOnly=FALSE, BOOL CheckSelected=FALSE) |
Indicate that we want to export this class of nodes. | |
virtual INT32 | GetSizeOfExport (Filter *) |
Find out how many nodes will be exported when this node is exported. The node can use the filter to find out how it will be exported, e.g. blends should return a value that reflects whether or not intermediate shapes will be saved out, etc. Bitmaps and other large objects should return an approximation so that the progress display bar gives a smooth update. NB. This is virtual - the default implementation just returns 1 - only override if this is not accurate. | |
virtual BOOL | IsNodeRenderableClass () const |
Determine if a node is *derived* from the NodeRenderable class. NB. This has nothing to do with the node's renderable flag! | |
virtual BOOL | ShouldBeRendered () const |
Work out if the node should be rendered - basically all nodes except NodeRenderable nodes should be rendered. However, some NodeRenderable derived classes should not actually be rendered - for example NodeMouldGroup hides the original un-moulded objects, which should definitely *not* be rendered. This is mainly used during printing where due to complications to do with banding and transparency, we cannot use NeedsToRender() to filter out such nodes, so we use this function instead. NB. This has nothing to do with the node's renderable flag! | |
virtual void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual void | RenderFillBlobs (RenderRegion *pRender) |
virtual void | RenderAppliedFillBlobs (RenderRegion *pRender) |
virtual void | RenderArtisticBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. Artistic blobs are used to display infomation about things such as pressure and other 'artistic' effects. If a node wants to render artistic blobs it should contain a version of this function. | |
virtual void | RenderObjectBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. Object Blobs are the blobs that allow you to edit the shape of the node. For example, a path would display blobs on all its coords and a Rectangle may put a blob at each corner. | |
virtual void | RenderTinyBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. Tiny blobs are displayed by each of the objects that is selected when in bounded region selection mode. Typically a Tiny Blob should be a single small blob. | |
virtual void | RenderPenBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. Overide this function in each of the nodes that require Pen Blobs so draw what it needed. | |
virtual void | RenderToolObjectBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. ToolObject blobs are displayed and used by a Node for interaction with a specific tool. They are similar to object blobs, but the big difference is that whereas object blobs are displayed regardless of the current tool (even if you can't use it to edit them), ToolObject blobs are not. The Node should always exercise final control over whether the blobs are active, depending on which tool is in use. | |
virtual void | RenderEffectBlobs (RenderRegion *pRender) |
This function is the base class version of a blob rendering function, so it actually does nothing. The fill blobs are the blobs rendered by fills (eg the graduated fill should draw an arrow to show the start and end positions of the fill). A node that wants to render some fill blobs should write a replacement of this function. This function is the base class version of a blob rendering function, so it actually does nothing. The fill blobs are the blobs rendered by fills (eg the graduated fill should draw an arrow to show the start and end positions of the fill). A node that wants to render some fill blobs should write a replacement of this function. | |
virtual void | Select (BOOL ReDraw) |
Selects the node. | |
virtual void | DeSelect (BOOL ReDraw, BOOL bDeselectChildren=FALSE) |
DeSelects the node. | |
virtual BOOL | CopyComponentData (BaseDocument *SrcDoc, BaseDocument *NodesDoc) |
This virtual function will be called on the node after it has been copied from document SrcDoc. It should copy all neccessary DocComponent data from SrcDoc to the document where the node lives (NodesDoc). | |
virtual DocRect | GetBlobBoundingRect () |
Calculates the bounding rectangle of the nodes blobs.This should always be calculated on the fly as the view scale can change without the node knowing, giving an incorrect result. | |
virtual DocRect | GetUnionBlobBoundingRect (BOOL bIncludeEffects=TRUE) |
This simply returns the result of GetBlobBoundingRect() as the default action for the base class. | |
virtual BOOL | IsDragged () const |
Returns a flag saying whether the node is currently being dragged or not Scope: public. | |
virtual void | SetDraggedState (BOOL bNewState, BOOL bAndChildren) |
Allows you to set the dragged state of this node Scope: public. | |
virtual void | TransformStretchObject (const ExtendParams &ExtParams) |
Perform a stretch on this Node, according to the contents of ExtParams. This function does nothing unless ExtParams uses X_STRETCH or Y_STRETCH. See also: The Extender class. | |
virtual void | TransformTranslateObject (const ExtendParams &ExtParams) |
Translate this Node, according to the offsets and flags defined in ExtParams, and a reference centre, defined by NodeRenderable::FindExtendCentre(). This function does nothing unless ExtParams uses X_EXTEND or Y_EXTEND. See also: The Extender class; FindExtendCentre(). | |
virtual void | TransformTranslateNoStretchObject (const ExtendParams &ExtParams) |
Translate this node so that its extend-centre matches the position it would be in if the node were stretched. The node maintains its aspect ratio. This function does nothing unless ExtParams uses X_STRETCH or Y_STRETCH. See also: The Extender class; FindExtendCentre(). | |
virtual DocCoord | FindExtendCentre () |
virtual Node * | SimpleCopy () |
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes. | |
void | CopyNodeContents (NodeRenderable *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. | |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
BOOL | Dragged |
Definition at line 1214 of file node.h.
|
This constructor creates a NodeRenderable linked to no other with all status flags false and an uninitialised bounding rectangle.
Definition at line 264 of file noderend.cpp.
|
|
This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated.
Specifies the direction in which the node is to be attached to the ContextNode. The values this variable can take are as follows: PREV : Attach node as a previous sibling of the context node NEXT : Attach node as a next sibling of the context node FIRSTCHILD: Attach node as the first child of the context node LASTCHILD : Attach node as a last child of the context node The remaining inputs specify the status of the node: Locked: Is node locked ? Mangled: Is node mangled ? Marked: Is node marked ? Selected: Is node selected ?
Definition at line 313 of file noderend.cpp.
|
|
Determine whether a renderable node can be transformed - if it does not, then no undo information needs to be stored for it.
Reimplemented in AttrLinearFill, AttrRadialFill, AttrConicalFill, AttrSquareFill, AttrThreeColFill, AttrFourColFill, AttrBitmapFill, AttrFractalFill, and NodeRenderableInk. Definition at line 520 of file noderend.cpp. 00521 { 00522 return FALSE; 00523 }
|
|
This virtual function will be called on the node after it has been copied from document SrcDoc. It should copy all neccessary DocComponent data from SrcDoc to the document where the node lives (NodesDoc).
Reimplemented in AttrFillGeometry, NodeAttribute, and StyleReferenceAttribute. Definition at line 953 of file noderend.cpp. 00954 { 00955 // Do nothing in the base class 00956 return TRUE; 00957 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 595 of file noderend.cpp. 00596 { 00597 ENSURE(NodeCopy != NULL,"Trying to copy a node's contents into a NULL node"); 00598 Node::CopyNodeContents(NodeCopy); 00599 }
|
|
DeSelects the node.
Reimplemented in NodeCompound, and NodePath. Definition at line 890 of file noderend.cpp. 00891 { 00892 // Get the blob manager to draw some blobs if needed 00893 if (IsSelected()) 00894 { 00895 if (ReDraw) 00896 { 00897 // Find the blob manager 00898 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 00899 ENSURE( BlobMgr!=NULL, "Blob Manager unexpected not there" ); 00900 00901 // Get it to render the blobs of this node 00902 BlobMgr->RenderMyBlobsOff(NULL, FindParentSpread(), this); 00903 00904 AttrFillGeometry::LastRenderedMesh = NULL; 00905 } 00906 00907 // Make this node selected 00908 SetSelected(FALSE); 00909 GetApplication()->UpdateSelection(); 00910 } 00911 else if (IsParentOfSelected() && bDeselectChildren) 00912 { 00913 Node* pNode = this->FindFirstDepthFirst(); 00914 while (pNode) 00915 { 00916 if (pNode->IsNodeRenderableClass() && pNode!=this) 00917 { 00918 ((NodeRenderable*)pNode)->DeSelect(ReDraw); 00919 } 00920 pNode = pNode->FindNextDepthFirst(this); 00921 } 00922 00923 GetApplication()->UpdateSelection(); 00924 } 00925 }
|
|
Reimplemented in AttrFillGeometry, NodeRenderableBounded, and TextStory. Definition at line 1278 of file node.h. 01278 { return DocCoord(0, 0); }
|
|
Calculates the bounding rectangle of the nodes blobs.This should always be calculated on the fly as the view scale can change without the node knowing, giving an incorrect result.
Reimplemented in AttrFillGeometry, AttrFlatFill, AttrRadialFill, AttrConicalFill, AttrSquareFill, AttrThreeColFill, AttrFourColFill, AttrBitmapFill, NodeGrid, NodeGroup, Layer, AttrStrokeColour, AttrStrokeTransp, NodeContourController, NodeBrushMaker, NodeClipViewController, NodeMouldGroup, NodeBevel, NodeBevelBegin, NodeBlender, NodeBlend, NodeBrush, NodeClipView, NodeContour, NodeEllipse, NodeBitmapEffect, NodeMoulder, NodeMould, NodePath, NodeRegularShape, NodeSimpleShape, AbstractTextChar, CaretNode, EOLNode, TextLine, and TextStory. Definition at line 791 of file noderend.cpp. 00792 { 00793 DocRect EmptyOne(0,0,0,0); 00794 return EmptyOne; 00795 }
|
|
|
Find out how many nodes will be exported when this node is exported. The node can use the filter to find out how it will be exported, e.g. blends should return a value that reflects whether or not intermediate shapes will be saved out, etc. Bitmaps and other large objects should return an approximation so that the progress display bar gives a smooth update. NB. This is virtual - the default implementation just returns 1 - only override if this is not accurate.
Reimplemented in NodeBitmap. Definition at line 402 of file noderend.cpp.
|
|
This simply returns the result of GetBlobBoundingRect() as the default action for the base class.
Reimplemented in NodeRenderableBounded. Definition at line 809 of file noderend.cpp. 00810 { 00811 return GetBlobBoundingRect(); 00812 }
|
|
Returns a flag saying whether the node is currently being dragged or not Scope: public.
Reimplemented from Node. Definition at line 2035 of file noderend.cpp. 02036 { 02037 return Dragged; 02038 }
|
|
Determine if a node is *derived* from the NodeRenderable class. NB. This has nothing to do with the node's renderable flag!
Reimplemented from Node. Definition at line 422 of file noderend.cpp. 00423 { 00424 // We are a NodeRenderable, thanks. 00425 return TRUE; 00426 }
|
|
Reimplemented in AttrFlatColourFill, AttrFlatTranspFill, AttrLinearColourFill, AttrLinearTranspFill, AttrRadialColourFill, AttrRadialTranspFill, AttrConicalColourFill, AttrConicalTranspFill, AttrSquareColourFill, AttrSquareTranspFill, AttrThreeColColourFill, AttrThreeColTranspFill, AttrFourColColourFill, AttrFourColTranspFill, AttrBitmapColourFill, AttrBitmapTranspFill, AttrTextureColourFill, AttrTextureTranspFill, NodeRenderableInk, and NodeAttribute. Definition at line 1293 of file node.h. 01293 { return FALSE; }
|
|
Indicate that we want to export this class of nodes.
Reimplemented from Node. Reimplemented in NodeGuideline, Layer, NodeMouldGroup, NodeAttribute, NodeMoulder, NodePath, NodeRenderablePaper, and Spread. Definition at line 361 of file noderend.cpp. 00362 { 00363 #ifdef DO_EXPORT 00364 // If we have the check selection flag on then see if this renderable node is:- 00365 // - selected or not = render it 00366 // - a child of the selection e.g. part of selected group where we are an item in the 00367 // group and hence are not directly selected but still need to be exported 00368 // - a parent of the selected item e.g. selected inside item of group and we are at the 00369 // group and hence need to include the group in the range 00370 // Otherwise just return True as this is a renderable node and always needs to be exported 00371 // unless of course some node overrides this. 00372 if (CheckSelected) 00373 return (IsSelected() || IsChildOfSelected() || IsParentOfSelected()); 00374 else 00375 return TRUE; 00376 #else 00377 return FALSE; 00378 #endif 00379 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented in AttrBevelIndent, AttrBevelLightAngle, AttrBevelContrast, AttrBevelType, AttrBevelLightTilt, AttrBrushType, Chapter, AttrClipView, AttrFillGeometry, AttrFillMappingLinear, AttrFillMappingSin, AttrFillEffectFade, AttrFillEffectRainbow, AttrFillEffectAltRainbow, AttrTranspFillMappingLinear, AttrTranspFillMappingSin, AttrMould, AttrFeather, NodeGrid, NodeGridRect, NodeGridIso, NodeGroup, NodeGuideline, AttrImagesetting, Layer, AttrLineWidth, AttrStrokeColour, AttrStrokeTransp, AttrStartArrow, AttrEndArrow, AttrStartCap, AttrJoinType, AttrMitreLimit, AttrWindingRule, AttrDashPattern, NodeContourController, NodeBlendPath, NodeBrushMaker, NodeBrushPath, NodeClipViewController, NodeMouldGroup, NodeMouldBitmap, NodeMouldPath, NodeRenderableBounded, NodeAnimatingBitmap, NodeBevel, NodeBlender, NodeBlend, NodeBitmap, NodeBrush, NodeClipView, NodeContour, NodeDocument, NodeLiveEffect, NodeLockedEffect, NodeFeatherEffect, NodeMoulder, NodeMould, NodePath, NodeEffect, NodeRegularShape, NodeSimpleShape, AbstractTextChar, TextChar, KernCode, HorizontalTab, EOLNode, TextLine, BaseTextClass, TextStory, NodeRenderablePaper, Page, AttrQuality, Spread, AttrStrokeType, AttrVariableWidth, TemplateAttribute, AttrTxtFontTypeface, AttrTxtBold, AttrTxtItalic, AttrTxtUnderline, AttrTxtAspectRatio, AttrTxtJustification, AttrTxtTracking, AttrTxtFontSize, AttrTxtScript, AttrTxtBaseLine, AttrTxtLeftMargin, AttrTxtRightMargin, AttrTxtFirstIndent, AttrTxtRuler, AttrTxtLineSpace, AttrUser, and AttrWebAddress. Definition at line 566 of file noderend.cpp. 00567 { 00568 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00569 ENSURE(IS_A(pNodeCopy, NodeRenderable), "PolyCopyNodeContents given wrong dest node type"); 00570 00571 if (IS_A(pNodeCopy, NodeRenderable)) 00572 CopyNodeContents(pNodeCopy); 00573 }
|
|
Reimplemented in NodeRenderableInk. Definition at line 1248 of file node.h.
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. Artistic blobs are used to display infomation about things such as pressure and other 'artistic' effects. If a node wants to render artistic blobs it should contain a version of this function.
Reimplemented in NodeRenderableInk. Definition at line 683 of file noderend.cpp.
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. The fill blobs are the blobs rendered by fills (eg the graduated fill should draw an arrow to show the start and end positions of the fill). A node that wants to render some fill blobs should write a replacement of this function. This function is the base class version of a blob rendering function, so it actually does nothing. The fill blobs are the blobs rendered by fills (eg the graduated fill should draw an arrow to show the start and end positions of the fill). A node that wants to render some fill blobs should write a replacement of this function.
Reimplemented in NodeRenderableInk. Definition at line 662 of file noderend.cpp.
|
|
Reimplemented in AttrFillGeometry, AttrLinearFill, AttrLinearColourFill, AttrLinearTranspFill, AttrRadialFill, AttrRadialColourFill, AttrRadialTranspFill, AttrConicalFill, AttrConicalColourFill, AttrConicalTranspFill, AttrSquareFill, AttrSquareColourFill, AttrSquareTranspFill, AttrThreeColFill, AttrThreeColColourFill, AttrThreeColTranspFill, AttrFourColFill, AttrFourColColourFill, AttrFourColTranspFill, AttrBitmapFill, AttrBitmapColourFill, AttrBitmapTranspFill, AttrTextureColourFill, and AttrTextureTranspFill. Definition at line 1247 of file node.h.
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. Object Blobs are the blobs that allow you to edit the shape of the node. For example, a path would display blobs on all its coords and a Rectangle may put a blob at each corner.
Reimplemented in NodeGroup, NodeBlendPath, NodeBrushPath, NodeMouldPath, NodeBevelBegin, NodeBlend, NodeBrush, NodeLockedEffect, NodeMould, NodePath, NodeRegularShape, NodeSimpleShape, AbstractTextChar, CaretNode, EOLNode, TextLine, and TextStory. Definition at line 705 of file noderend.cpp.
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. Overide this function in each of the nodes that require Pen Blobs so draw what it needed.
Reimplemented in NodePath. Definition at line 746 of file noderend.cpp.
|
|
Virtual function - this function will indicate to the caller whether or not we want to render the given node, according to the information passed in. For this class, it always returns TRUE.
Reimplemented from Node. Reimplemented in AttrBrushType, AttrClipView, AttrFeather, NodeGrid, NodeGroup, NodeGuideline, Layer, NodeContourController, NodeClipViewController, NodeMouldGroup, NodeRenderableBounded, NodeAttribute, NodeBevelBegin, NodeBrush, NodeClipView, NodeLiveEffect, NodeLockedEffect, NodeEffect, NodeRenderablePaper, and Spread. Definition at line 338 of file noderend.cpp. 00339 { 00340 return SUBTREE_ROOTANDCHILDREN; // Else we allow the renderer into the subtree 00341 }
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. Tiny blobs are displayed by each of the objects that is selected when in bounded region selection mode. Typically a Tiny Blob should be a single small blob.
Reimplemented in NodeGroup, NodeContourController, NodeBrushPath, NodeClipViewController, NodeBevel, NodeBevelBegin, NodeBrush, NodeContour, NodeLockedEffect, NodeMould, NodePath, NodeRegularShape, NodeSimpleShape, AbstractTextChar, EOLNode, TextLine, and TextStory. Definition at line 727 of file noderend.cpp.
|
|
This function is the base class version of a blob rendering function, so it actually does nothing. ToolObject blobs are displayed and used by a Node for interaction with a specific tool. They are similar to object blobs, but the big difference is that whereas object blobs are displayed regardless of the current tool (even if you can't use it to edit them), ToolObject blobs are not. The Node should always exercise final control over whether the blobs are active, depending on which tool is in use.
Reimplemented in NodeClipViewController. Definition at line 772 of file noderend.cpp.
|
|
Selects the node.
Reimplemented in NodeCompound. Definition at line 826 of file noderend.cpp. 00827 { 00828 // Get the blob manager to draw some blobs if needed 00829 if (!IsSelected()) 00830 { 00831 // It's possible that this node is inside a currently selected node 00832 // The rules of select inside say that a selected node cannot have 00833 // selected parents or children, so we must go deselect them. 00834 // Parents... 00835 Node* pNode = FindParent(); 00836 while (pNode && pNode->IsNodeRenderableClass()) 00837 { 00838 ((NodeRenderable*)pNode)->DeSelect(ReDraw); 00839 pNode = pNode->FindParent(); 00840 } 00841 00842 // Children... 00843 // This node can only have selected children if it's marked as the parent 00844 // of selected children. 00845 if (IsParentOfSelected()) 00846 { 00847 pNode = this->FindFirstDepthFirst(); 00848 while (pNode) 00849 { 00850 if (pNode->IsNodeRenderableClass() && pNode!=this) 00851 { 00852 ((NodeRenderable*)pNode)->DeSelect(ReDraw); 00853 } 00854 pNode = pNode->FindNextDepthFirst(this); 00855 } 00856 } 00857 00858 SetSelected(TRUE); 00859 00860 if (ReDraw) 00861 { 00862 // Find the blob manager 00863 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 00864 ENSURE( BlobMgr!=NULL, "Blob Manager unexpected not there" ); 00865 00866 // Get it to render the blobs of this node 00867 BlobMgr->RenderMyBlobsOn(NULL, FindParentSpread(), this); 00868 00869 AttrFillGeometry::LastRenderedMesh = NULL; 00870 } 00871 00872 // Make this node selected and throw away the selection cache 00873 GetApplication()->UpdateSelection(); 00874 } 00875 }
|
|
Allows you to set the dragged state of this node Scope: public.
Definition at line 2056 of file noderend.cpp. 02057 { 02058 Dragged = bNewState; 02059 if (bAndChildren) 02060 { 02061 NodeRenderable* pNode = (NodeRenderable*)FindFirstChild(CC_RUNTIME_CLASS(NodeRenderable)); 02062 while (pNode) 02063 { 02064 pNode->SetDraggedState(bNewState, bAndChildren); 02065 pNode = (NodeRenderable*)pNode->FindNext(CC_RUNTIME_CLASS(NodeRenderable)); 02066 } 02067 } 02068 }
|
|
Work out if the node should be rendered - basically all nodes except NodeRenderable nodes should be rendered. However, some NodeRenderable derived classes should not actually be rendered - for example NodeMouldGroup hides the original un-moulded objects, which should definitely *not* be rendered. This is mainly used during printing where due to complications to do with banding and transparency, we cannot use NeedsToRender() to filter out such nodes, so we use this function instead. NB. This has nothing to do with the node's renderable flag!
Reimplemented from Node. Reimplemented in NodeMouldGroup. Definition at line 449 of file noderend.cpp. 00450 { 00451 // By default we render nodes of this class, and derived nodes. 00452 return TRUE; 00453 }
|
|
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
Reimplemented from Node. Reimplemented in AttrBevelIndent, AttrBevelLightAngle, AttrBevelContrast, AttrBevelType, AttrBevelLightTilt, AttrBrushType, Chapter, AttrClipView, AttrFlatColourFill, AttrFlatTranspFill, AttrLinearColourFill, AttrLinearTranspFill, AttrRadialColourFill, AttrRadialTranspFill, AttrConicalColourFill, AttrConicalTranspFill, AttrSquareColourFill, AttrSquareTranspFill, AttrThreeColColourFill, AttrThreeColTranspFill, AttrFourColColourFill, AttrFourColTranspFill, AttrBitmapColourFill, AttrBitmapTranspFill, AttrTextureColourFill, AttrFractalColourFill, AttrNoiseColourFill, AttrTextureTranspFill, AttrFractalTranspFill, AttrNoiseTranspFill, AttrFillMappingLinear, AttrFillMappingSin, AttrFillEffectFade, AttrFillEffectRainbow, AttrFillEffectAltRainbow, AttrTranspFillMappingLinear, AttrTranspFillMappingSin, AttrMould, AttrFeather, NodeGrid, NodeGridRect, NodeGridIso, NodeGroup, NodeGuideline, NodeRenderableInk, AttrOverprintLine, AttrOverprintFill, AttrPrintOnAllPlates, Layer, AttrLineWidth, AttrStrokeColour, AttrStrokeTransp, AttrStartArrow, AttrEndArrow, AttrStartCap, AttrJoinType, AttrMitreLimit, AttrWindingRule, AttrDashPattern, NodeContourController, NodeBlendPath, NodeBrushMaker, NodeBrushPath, NodeClipViewController, NodeMouldGroup, NodeMouldBitmap, NodeMouldPath, NodeRenderableBounded, NodeAnimatingBitmap, NodeAttribute, NodeBevel, NodeBevelBegin, NodeBlender, NodeBlend, NodeBitmap, NodeBrush, NodeClipView, NodeContour, NodeDocument, NodeEllipse, NodeLiveEffect, NodeLockedEffect, NodeFeatherEffect, NodeMoulder, NodeMould, NodePath, NodeEffect, NodeRect, NodeRegularShape, NodeSimpleShape, VisibleTextNode, AbstractTextChar, TextChar, KernCode, HorizontalTab, CaretNode, EOLNode, TextLine, BaseTextClass, TextStory, NodeRenderablePaper, Page, AttrQuality, Spread, AttrStrokeType, AttrVariableWidth, TemplateAttribute, StyleReferenceAttribute, AttrTxtFontTypeface, AttrTxtBold, AttrTxtItalic, AttrTxtUnderline, AttrTxtAspectRatio, AttrTxtJustification, AttrTxtTracking, AttrTxtFontSize, AttrTxtScript, AttrTxtBaseLine, AttrTxtLeftMargin, AttrTxtRightMargin, AttrTxtFirstIndent, AttrTxtRuler, AttrTxtLineSpace, AttrUser, and AttrWebAddress. Definition at line 544 of file noderend.cpp. 00545 { 00546 NodeRenderable* NodeCopy; 00547 NodeCopy = new NodeRenderable(); 00548 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 00549 CopyNodeContents(NodeCopy); 00550 return (NodeCopy); 00551 }
|
|
This is the base class verison of the transform function. This is called to move, scale, rotate etc renderable objects. Each class derived from NodeRenderableInk should write a version of this function that manipulates all the control points in the object and updates its bounding box. See NodePath for an example.
Reimplemented in AttrBevelIndent, AttrBevelLightAngle, AttrBevelContrast, AttrBevelType, AttrBevelLightTilt, AttrBrushType, AttrClipView, AttrLinearFill, AttrRadialFill, AttrConicalFill, AttrSquareFill, AttrThreeColFill, AttrFourColFill, AttrBitmapFill, AttrFractalFill, AttrFeather, NodeGroup, NodeGuideline, AttrLineWidth, NodeContourController, NodeBrushMaker, NodeBrushPath, NodeClipViewController, NodeMouldGroup, NodeRenderableBounded, NodeBevel, NodeBlender, NodeBrush, NodeClipView, NodeContour, NodeLiveEffect, NodeLockedEffect, NodeMoulder, NodeMould, NodePath, NodeRegularShape, NodeSimpleShape, TextStory, and AttrUser. Definition at line 472 of file noderend.cpp. 00473 { 00474 // By default, just transform all the children 00475 TransformChildren(Trans); 00476 }
|
|
Reimplemented in NodeRenderableBounded. Definition at line 480 of file noderend.cpp. 00481 { 00482 // We have to go through all the child nodes of this node and Transform 00483 // all the NodeRenderable objects 00484 00485 Node* pCurrent = this -> FindFirstChild(); 00486 00487 while (pCurrent != NULL) 00488 { 00489 // Make sure it is a renderable ink object (not an attribute) 00490 if (pCurrent->IsKindOf( CC_RUNTIME_CLASS(NodeRenderable) ) ) 00491 // Transform the child node 00492 ((NodeRenderable*)pCurrent) -> Transform( Trans ); 00493 00494 // Show the hourglass 00495 if (ShowHourglass()) 00496 { 00497 ContinueSlowJob(); 00498 } 00499 00500 00501 // Find the next object in the group 00502 pCurrent = pCurrent -> FindNext(); 00503 } 00504 }
|
|
Perform a stretch on this Node, according to the contents of ExtParams. This function does nothing unless ExtParams uses X_STRETCH or Y_STRETCH. See also: The Extender class.
Definition at line 974 of file noderend.cpp. 00975 { 00976 // x-stretch - translate and stretch this Node. 00977 if (ExtParams.fExtendFlags & X_STRETCH) 00978 { 00979 Trans2DMatrix toOrigin(-ExtParams.doccScaleStart.x, 0); 00980 Matrix matStretch( FIXED16( ExtParams.xscale ), FIXED16( 1.0 ) ); 00981 Trans2DMatrix stretchX( matStretch ); 00982 Trans2DMatrix fromOrigin(ExtParams.doccScaleEnd.x, 0); 00983 Transform(toOrigin); 00984 Transform(stretchX); 00985 Transform(fromOrigin); 00986 } 00987 00988 // y-stretch - translate and stretch this Node. 00989 if (ExtParams.fExtendFlags & Y_STRETCH) 00990 { 00991 Trans2DMatrix toOrigin(0, -ExtParams.doccScaleStart.y); 00992 Matrix matStretch( FIXED16(1.0), FIXED16(ExtParams.yscale) ); 00993 Trans2DMatrix stretchY( matStretch ); 00994 Trans2DMatrix fromOrigin(0, ExtParams.doccScaleEnd.y); 00995 Transform(toOrigin); 00996 Transform(stretchY); 00997 Transform(fromOrigin); 00998 } 00999 }
|
|
Translate this node so that its extend-centre matches the position it would be in if the node were stretched. The node maintains its aspect ratio. This function does nothing unless ExtParams uses X_STRETCH or Y_STRETCH. See also: The Extender class; FindExtendCentre().
Definition at line 1084 of file noderend.cpp. 01085 { 01086 DocCoord doccRef = FindExtendCentre(); 01087 01088 // x-stretch - we translate the Node by the same amount as doccRef under stretching. 01089 if (ExtParams.fExtendFlags & X_STRETCH) 01090 { 01091 Trans2DMatrix transX( ExtParams.doccScaleEnd.x - 01092 ExtParams.doccScaleStart.x, 0 ); 01093 Transform(transX); 01094 01095 // extra translation is difference between stretched and unstretched pDoccRef. 01096 INT32 deltaX = (INT32)( (ExtParams.xscale - 1.0) * 01097 (doccRef.x - ExtParams.doccScaleStart.x) ); 01098 Trans2DMatrix trans2X(deltaX, 0); 01099 Transform(trans2X); 01100 } 01101 01102 // y-stretch - we translate the Node by the same amount as doccRef under stretching. 01103 if (ExtParams.fExtendFlags & Y_STRETCH) 01104 { 01105 Trans2DMatrix transY(0, ExtParams.doccScaleEnd.y - 01106 ExtParams.doccScaleStart.y); 01107 Transform(transY); 01108 01109 // extra translation is difference between stretched and unstretched pDoccRef. 01110 INT32 deltaY = (INT32)( (ExtParams.yscale - 1.0) * 01111 (doccRef.y - ExtParams.doccScaleStart.y) ); 01112 Trans2DMatrix trans2Y(0, deltaY); 01113 Transform(trans2Y); 01114 } 01115 }
|
|
Translate this Node, according to the offsets and flags defined in ExtParams, and a reference centre, defined by NodeRenderable::FindExtendCentre(). This function does nothing unless ExtParams uses X_EXTEND or Y_EXTEND. See also: The Extender class; FindExtendCentre().
Reimplemented in AttrFillGeometry, AttrLinearFill, AttrRadialFill, AttrBitmapFill, and NodePath. Definition at line 1017 of file noderend.cpp. 01018 { 01019 DocCoord doccCentre = FindExtendCentre(); 01020 01021 // x-extension - we move the whole Node; behaviour determined by its centre. 01022 if (ExtParams.fExtendFlags & X_EXTEND) 01023 { 01024 doccCentre.x += ExtParams.doccOffset.x; 01025 01026 // first, translate the object by the offset from start- to end- centres. 01027 Trans2DMatrix baseXoffset(ExtParams.doccOffset.x, 0); 01028 Transform(baseXoffset); 01029 01030 // slight fudge here - we only move anything if we're outside a buffer-zone around 01031 // the centre (necessary as objects can be misaligned by a millipoint or two). 01032 if (doccCentre.x > ExtParams.doccEndCentre.x + ExtParams.xincExtendBuffer) 01033 { 01034 Trans2DMatrix translateX(ExtParams.xinc, 0); 01035 Transform(translateX); 01036 } 01037 else if (doccCentre.x < ExtParams.doccEndCentre.x - ExtParams.xdecExtendBuffer) 01038 { 01039 Trans2DMatrix translateX(-ExtParams.xdec, 0); 01040 Transform(translateX); 01041 } 01042 } 01043 01044 // y-extension - we move the whole Node; behaviour determined by its centre. 01045 if (ExtParams.fExtendFlags & Y_EXTEND) 01046 { 01047 doccCentre.y += ExtParams.doccOffset.y; 01048 01049 // first, translate the object by the offset from start- to end- centres. 01050 Trans2DMatrix baseYoffset(0, ExtParams.doccOffset.y); 01051 Transform(baseYoffset); 01052 01053 // only extend if we're outside the centre's buffer-zone. 01054 if (doccCentre.y > ExtParams.doccEndCentre.y + ExtParams.yincExtendBuffer) 01055 { 01056 Trans2DMatrix translateY(0, ExtParams.yinc); 01057 Transform(translateY); 01058 } 01059 else if (doccCentre.y < ExtParams.doccEndCentre.y - ExtParams.ydecExtendBuffer) 01060 { 01061 Trans2DMatrix translateY(0, -ExtParams.ydec); 01062 Transform(translateY); 01063 } 01064 } 01065 }
|
|
|