#include <blobs.h>
Inheritance diagram for BlobManager:
Public Member Functions | |
BlobManager () | |
Default constructor for the blob manager, marks all the blobs as off. | |
~BlobManager () | |
void | ToolInterest (BlobStyle) |
void | AddInterest (BlobStyle) |
If the blobs specified are not already displayed, then they are rendered onto the screen. The Flags that the blob manager maintains about which blobs are on screen and which are not are also updated. | |
void | RemoveInterest (BlobStyle) |
If the blobs specified are already displayed, then they are rendered onto the screen to get rid of them (EORing!). The Flags that the blob manager maintains about which blobs are on screen and which are not are also updated. | |
BlobStyle | GetCurrentInterest (BOOL bIgnoreOffState=FALSE) |
Allows people other than the blobmanager to know what blob are currently displayed. | |
void | BlobRenderingOff (BOOL Redraw) |
After calling this function, any attempts to render blobs from anywhere in Camelot will result in nothing appearing on screen. This is a dangerous function to call if you are not sure what is going on. Normally you should use this function if you are about to do something that will involve the selection state becoming inconsistent with the blobs on screen and you specifically do not want lots of blob rendering going on until you have finished. Here is an example way of using it MonoOn Get rid of the blobs from the screen BlobMgr->BlobRenderingOff(TRUE);. | |
void | BlobRenderingOn (BOOL Redraw) |
If blob rendering has been turned off ( by calling BlobRenderinOff() ) then this function will re-enable it so that rendering can carry on like normal. Ideally this should be called not very long after calling BlobRenderingOff(). | |
INT32 | GetBlobSize () |
This function allows you to find out how wide a blob should be. | |
void | GetBlobRect (const DocCoord &Centre, DocRect *Rect, BOOL MFill=FALSE, BlobType eBlobType=BT_SELECTEDLARGEST) |
Finds the rectangle of a blob that surrounds a given coord. This is to replace the rather long winded method that had to be employed before. If there is no selected document it will leave the rect unchanged. | |
void | Render (DocRect *Rect, Spread *pSpread) |
This function will render all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderOn (DocRect *Rect, Spread *pSpread) |
This function will render on all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderOff (DocRect *Rect, Spread *pSpread) |
This function will render off all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderMyBlobs (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
Renders the blobs for the given node. Only the required blobs are rendered and since the blobs are EOR rendered, this function can be used to put the blobs onto the screen or take them off the screen. | |
void | RenderMyBlobsOn (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
This function will render on all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderMyBlobsOff (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
This function will render off all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderObjectBlobs (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
This function will render all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderObjectBlobsOn (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
This function will render on all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderObjectBlobsOff (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
This function will render off all the blobs that are currently being displayed for the given clipping rectangle. | |
void | RenderToolBlobsOn (Tool_v1 *pTool, Spread *pSpread, DocRect *pClipRect) |
This function will render on the specified tools blobs. | |
void | RenderToolBlobsOff (Tool_v1 *pTool, Spread *pSpread, DocRect *pClipRect) |
This function will render off the specified tools blobs. | |
BOOL | IsRemovingBlobs () |
Protected Member Functions | |
void | RenderRequiredBlobs (NodeRenderable *, RenderRegion *) |
Renders the required blobs for the given node into the given render region. The required blobs are specified by the tool when it is activated. | |
void | RenderSpecificBlobs (NodeRenderable *, RenderRegion *, BOOL, BOOL, BOOL, BOOL, BOOL, BOOL, BOOL) |
Renders only the blobs specified. This is called from the Add and Remove Interest Functions to add new types of blob to the display or take types of blob that are no longer needed off the display. | |
void | RenderRequiredBlobsOnSelection (DocRect *Rect) |
Renders the required blobs for the given node into the given render region. The required blobs are specified by the tool when it is activated. | |
void | RenderSpecificBlobsOnSelection (DocRect *Rect, BOOL, BOOL, BOOL, BOOL, BOOL, BOOL, BOOL) |
Renders only the blobs specified. This is called from the Add and Remove Interest Functions to add new types of blob to the display or take types of blob that are no longer needed off the display. | |
BOOL | NeedToRenderSelectionBlobs (DocRect *Rect) |
Check to make sure we need to render some blobs. | |
BOOL | NeedToRenderNodeBlobs (DocRect *Rect, Spread *pSpread, NodeRenderable *pNode) |
Check to make sure we need to render some blobs. | |
MsgResult | Message (Msg *Msg) |
Handles the View Changing message, and makes sure that the blobs are removed from the old view and drawn onto the new view. | |
Protected Attributes | |
BOOL | IsFillBlob |
BOOL | IsObjectBlob |
BOOL | IsArtisticBlob |
BOOL | IsTinyBlob |
BOOL | IsPenBlob |
BOOL | IsToolObjectBlob |
BOOL | IsEffectBlob |
BOOL | DrawBlobsAtAll |
BOOL | RemovingBlobs |
BOOL | bToolBlobsAreOff |
Private Member Functions | |
CC_DECLARE_MEMDUMP (BlobManager) |
Object Blobs - The blobs that appear to edit the shape of an object. ie the control point blobs on a path
Artistic Blobs - Used to edit information such as pressure details along shapes.
Tiny Blobs - the Blob that is displayed by an object when it is the Boundary selection mode of the selector tool to indicate that it is one of the selected objects.
ToolObject Blobs - These blobs are displayed and used by an object only when a specific tool is selected. They are similar to object blobs except that the _object_ has the final say in whether they are rendered/used or not.
Definition at line 208 of file blobs.h.
|
Default constructor for the blob manager, marks all the blobs as off.
Definition at line 194 of file blobs.cpp. 00194 : MessageHandler(CC_RUNTIME_CLASS(MessageHandler), TRUE) 00195 { 00196 // There are no blobs visible when we start 00197 IsFillBlob = FALSE; 00198 IsObjectBlob = FALSE; 00199 IsArtisticBlob = FALSE; 00200 IsTinyBlob = FALSE; 00201 IsPenBlob = FALSE; 00202 IsToolObjectBlob = FALSE; 00203 IsEffectBlob = FALSE; 00204 00205 // Blob rendering is switched on by default 00206 DrawBlobsAtAll = TRUE; 00207 00208 RemovingBlobs = FALSE; 00209 00210 bToolBlobsAreOff = FALSE; 00211 }
|
|
Definition at line 216 of file blobs.h.
|
|
If the blobs specified are not already displayed, then they are rendered onto the screen. The Flags that the blob manager maintains about which blobs are on screen and which are not are also updated.
Definition at line 332 of file blobs.cpp. 00333 { 00334 RemovingBlobs = FALSE; 00335 00336 // First we have to work out which bits of the we have to add. 00337 // Do we need Object blobs to be rendered 00338 BOOL DrawObject = FALSE; 00339 if (!IsObjectBlob && Blobs.Object) 00340 { 00341 DrawObject = TRUE; 00342 IsObjectBlob = TRUE; 00343 } 00344 00345 // Do we need Artistic blobs to be rendered 00346 BOOL DrawArtistic = FALSE; 00347 if (!IsArtisticBlob && Blobs.Artistic) 00348 { 00349 DrawArtistic = TRUE; 00350 IsArtisticBlob = TRUE; 00351 } 00352 00353 // Do we need Fill blobs to be rendered 00354 BOOL DrawFill = FALSE; 00355 if (!IsFillBlob && Blobs.Fill) 00356 { 00357 DrawFill = TRUE; 00358 IsFillBlob = TRUE; 00359 } 00360 00361 // Do we need Effect blobs to be rendered 00362 BOOL DrawEffect = FALSE; 00363 if (!IsEffectBlob && Blobs.Effect) 00364 { 00365 DrawEffect = TRUE; 00366 IsEffectBlob = TRUE; 00367 } 00368 00369 // Do we need Tiny blobs to be rendered 00370 BOOL DrawTiny = FALSE; 00371 if (!IsTinyBlob && Blobs.Tiny) 00372 { 00373 DrawTiny = TRUE; 00374 IsTinyBlob = TRUE; 00375 } 00376 00377 // Do we need Pen blobs to be rendered 00378 BOOL DrawPen = FALSE; 00379 if (!IsPenBlob && Blobs.Pen) 00380 { 00381 DrawPen = TRUE; 00382 IsPenBlob = TRUE; 00383 } 00384 00385 // Do we need ToolObject blobs to be rendered 00386 BOOL DrawToolObject = FALSE; 00387 if (!IsToolObjectBlob && Blobs.ToolObject) 00388 { 00389 DrawToolObject = TRUE; 00390 IsToolObjectBlob = TRUE; 00391 } 00392 00393 if (!NeedToRenderSelectionBlobs(NULL)) 00394 return; 00395 00396 RenderSpecificBlobsOnSelection( NULL, DrawObject, DrawArtistic, 00397 DrawFill, DrawTiny, DrawPen, DrawToolObject, DrawEffect); 00398 00399 // Now EOR off in all the render regions that are still rendering, 00400 // so that the Blob rendering when the region is finished, 00401 // will put them on 00402 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00403 00404 if (!pRegionList->IsEmpty()) 00405 { 00406 // Find out which spread the selection is on 00407 SelRange* Selected = GetApplication()->FindSelection(); 00408 Node* pNode = Selected->FindFirst(); 00409 00410 if (pNode) // Is there a Selection ? 00411 { 00412 Spread* pSpread = pNode->FindParentSpread(); 00413 00414 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 00415 00416 while (pRegion) 00417 { 00418 // Check the RenderRegion is for the same spread. 00419 if (pRegion->GetRenderSpread() == pSpread && 00420 pRegion->GetRenderView()==DocView::GetSelected() && 00421 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 00422 { 00423 // Render the blobs 'clipped' to this Render Region. 00424 DocRect ClipRect = pRegion->GetRegionRect(); 00425 RenderSpecificBlobsOnSelection( &ClipRect, 00426 DrawObject, DrawArtistic, DrawFill, 00427 DrawTiny, DrawPen, DrawToolObject, DrawEffect ); 00428 } 00429 00430 // Get the Next render region 00431 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 00432 } 00433 } 00434 } 00435 }
|
|
After calling this function, any attempts to render blobs from anywhere in Camelot will result in nothing appearing on screen. This is a dangerous function to call if you are not sure what is going on. Normally you should use this function if you are about to do something that will involve the selection state becoming inconsistent with the blobs on screen and you specifically do not want lots of blob rendering going on until you have finished. Here is an example way of using it MonoOn Get rid of the blobs from the screen BlobMgr->BlobRenderingOff(TRUE);.
Invalidate the region of the blobs ... Switch the blob manager back on again but leave the rendering of the blobs to the normal OnDraw loop BlobMgr->BlobRenderingOn(FALSE) MonoOff
Definition at line 628 of file blobs.cpp. 00629 { 00630 RemovingBlobs = TRUE; 00631 00632 if (Redraw && NeedToRenderSelectionBlobs(NULL)) 00633 { 00634 // EOR on in all the render regions that are still rendering, 00635 // so that the Blob rendering when the region is finished, 00636 // will take them off 00637 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00638 00639 if (!pRegionList->IsEmpty()) 00640 { 00641 // Find out which spread the selection is on 00642 SelRange* Selected = GetApplication()->FindSelection(); 00643 Node* pNode = Selected->FindFirst(); 00644 00645 if (pNode) // Is there a Selection ? 00646 { 00647 Spread* pSpread = pNode->FindParentSpread(); 00648 00649 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 00650 00651 while (pRegion) 00652 { 00653 // Check the RenderRegion is for the same spread. 00654 if (pRegion->GetRenderSpread() == pSpread && 00655 pRegion->GetRenderView()==DocView::GetSelected() && 00656 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 00657 { 00658 // Render the blobs 'clipped' to this Render Region. 00659 DocRect ClipRect = pRegion->GetRegionRect(); 00660 RenderRequiredBlobsOnSelection(&ClipRect); 00661 } 00662 00663 // Get the Next render region 00664 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 00665 } 00666 } 00667 } 00668 00669 RenderRequiredBlobsOnSelection(NULL); 00670 } 00671 00672 // Mark blob rendering to be off 00673 DrawBlobsAtAll = FALSE; 00674 00675 // Bodge to stop fill meshes EOR each other out. 00676 AttrFillGeometry::LastRenderedMesh = NULL; 00677 }
|
|
If blob rendering has been turned off ( by calling BlobRenderinOff() ) then this function will re-enable it so that rendering can carry on like normal. Ideally this should be called not very long after calling BlobRenderingOff().
Definition at line 696 of file blobs.cpp. 00697 { 00698 RemovingBlobs = FALSE; 00699 00700 if (Redraw && NeedToRenderSelectionBlobs(NULL)) 00701 { 00702 RenderRequiredBlobsOnSelection(NULL); 00703 00704 // Now EOR off in all the render regions that are still rendering, 00705 // so that the Blob rendering when the region is finished, 00706 // will put them on 00707 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00708 00709 if (!pRegionList->IsEmpty()) 00710 { 00711 // Find out which spread the selection is on 00712 SelRange* Selected = GetApplication()->FindSelection(); 00713 Node* pNode = Selected->FindFirst(); 00714 00715 if (pNode) // Is there a Selection ? 00716 { 00717 Spread* pSpread = pNode->FindParentSpread(); 00718 00719 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 00720 00721 while (pRegion) 00722 { 00723 // Check the RenderRegion is for the same spread. 00724 if (pRegion->GetRenderSpread() == pSpread && 00725 pRegion->GetRenderView()==DocView::GetSelected() && 00726 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 00727 { 00728 // Render the blobs 'clipped' to this Render Region. 00729 DocRect ClipRect = pRegion->GetRegionRect(); 00730 RenderRequiredBlobsOnSelection(&ClipRect); 00731 } 00732 00733 // Get the Next render region 00734 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 00735 } 00736 } 00737 } 00738 } 00739 00740 // Mark blob rendering to be on 00741 DrawBlobsAtAll = TRUE; 00742 00743 // Bodge to stop fill meshes EOR each other out. 00744 AttrFillGeometry::LastRenderedMesh = NULL; 00745 }
|
|
|
|
Finds the rectangle of a blob that surrounds a given coord. This is to replace the rather long winded method that had to be employed before. If there is no selected document it will leave the rect unchanged.
Definition at line 793 of file blobs.cpp. 00795 { 00796 // We will be needing a view to do this 00797 DocView* pDocView = DocView::GetSelected(); 00798 00799 // Find out how big a rect is these days, if we have a view 00800 if (pDocView!=NULL) 00801 { 00802 switch (eBlobType) 00803 { 00804 case BT_CLIPVIEW: 00805 OSRenderRegion::GetBlobRect(pDocView->GetViewScale(), Centre, BT_CLIPVIEW, Rect); 00806 break; 00807 00808 default: 00809 if (!MFill) 00810 { 00811 OSRenderRegion::GetBlobRect(pDocView->GetViewScale(), Centre, BT_SELECTEDLARGEST, Rect); 00812 } 00813 else 00814 { 00815 OSRenderRegion::GetBlobRect(pDocView->GetViewScale(), Centre, BT_MSTAGESELECTEDLARGEST, Rect); 00816 } 00817 break; 00818 } 00819 } 00820 }
|
|
This function allows you to find out how wide a blob should be.
Definition at line 761 of file blobs.cpp. 00762 { 00763 // To do this, we need to find out how big a blobs rect is 00764 DocRect Rect; 00765 GetBlobRect(DocCoord(0,0), &Rect); 00766 00767 // return the width of the resulting rect 00768 return Rect.Width(); 00769 }
|
|
Allows people other than the blobmanager to know what blob are currently displayed.
Definition at line 574 of file blobs.cpp. 00575 { 00576 // Make a default blob style with all interest off. 00577 BlobStyle CurrentBlobs; 00578 00579 if (DrawBlobsAtAll || bIgnoreOffState) 00580 { 00581 // Update it with the current Interest 00582 CurrentBlobs.Fill = IsFillBlob; 00583 CurrentBlobs.Effect = IsEffectBlob; 00584 CurrentBlobs.Object = IsObjectBlob; 00585 CurrentBlobs.Artistic = IsArtisticBlob; 00586 CurrentBlobs.Tiny = IsTinyBlob; 00587 CurrentBlobs.Pen = IsPenBlob; 00588 CurrentBlobs.ToolObject = IsToolObjectBlob; 00589 } 00590 00591 return CurrentBlobs; 00592 }
|
|
Definition at line 251 of file blobs.h. 00251 { return RemovingBlobs; }
|
|
Handles the View Changing message, and makes sure that the blobs are removed from the old view and drawn onto the new view.
Reimplemented from MessageHandler. Definition at line 1600 of file blobs.cpp. 01601 { 01602 if (MESSAGE_IS_A(Message, DocViewMsg)) 01603 { 01604 // Get a version of the message in the right type 01605 DocViewMsg* pDocViewMsg = (DocViewMsg*) Message; 01606 01607 switch (pDocViewMsg->State) 01608 { 01609 // respond to messages that arrive just before and just after the view has changed. 01610 case DocViewMsg::SELABOUTTOCHANGE: 01611 case DocViewMsg::SELCHANGED: 01612 { 01613 // rub blobs off old view or draw them in on the new one 01614 if (DocView::GetSelected()!=NULL) 01615 { 01616 // go find the selection 01617 SelRange* Selected = GetApplication()->FindSelection(); 01618 01619 // Have to be sure that the selection is correct for the view 01620 Selected->Update(); 01621 Node* pNode = Selected->FindFirst(); 01622 01623 // If there is something selected 01624 if (pNode!=NULL) 01625 { 01626 // Find its spread 01627 Spread* pSpread = pNode->FindParentSpread(); 01628 if (pSpread!=NULL) 01629 { 01630 // and render the blobs 01631 Render(NULL, pSpread); 01632 } 01633 } 01634 } 01635 break; 01636 } 01637 01638 01639 default: 01640 break; 01641 } 01642 } 01643 01644 return OK; 01645 }
|
|
Check to make sure we need to render some blobs.
Definition at line 1812 of file blobs.cpp. 01813 { 01814 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01815 if (pRegionList->IsEmpty()) 01816 return TRUE; 01817 01818 if (Rect != NULL || pNode->IsBounded()) 01819 { 01820 // If the Blob we are about to render, is completely contained 01821 // within a pending Render Region, then we don't need to 01822 // render anything 01823 01824 // Find out the blob rect of this node, if we can 01825 DocRect NodeRect = DocRect(0,0,0,0); 01826 01827 if (pNode->IsBounded()) 01828 { 01829 // Use the node's blob bounds 01830 NodeRect = ((NodeRenderableBounded*)pNode)->GetBlobBoundingRect(); 01831 } 01832 01833 // If a clip rect was given, and it doesn't completely contain the node rect, 01834 // then we'll have to use that 01835 if (Rect && !Rect->ContainsRect(NodeRect)) 01836 NodeRect = *Rect; 01837 01838 if (!NodeRect.IsEmpty()) 01839 { 01840 // So lets check the pending regions 01841 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01842 01843 while (pRegion) 01844 { 01845 // Check the RenderRegion is for the same spread. 01846 if (pRegion->GetRenderSpread() == pSpread && 01847 pRegion->GetRenderView()==DocView::GetSelected() && 01848 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01849 { 01850 // Get the 'clip' rect of this Render Region. 01851 DocRect ClipRect = pRegion->GetRegionRect(); 01852 01853 // If any of the RenderRegions completely contain the rect 01854 // then there is no point in rendering anything 01855 01856 if (ClipRect.ContainsRect(NodeRect)) 01857 return FALSE; // We don't need to render this node's blobs 01858 } 01859 01860 // Get the Next render region 01861 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01862 } 01863 } 01864 } 01865 return TRUE; 01866 }
|
|
Check to make sure we need to render some blobs.
Definition at line 1750 of file blobs.cpp. 01751 { 01752 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01753 if (pRegionList->IsEmpty()) 01754 return TRUE; 01755 01756 // Find the first selected object in the tree; 01757 SelRange* Selected = GetApplication()->FindSelection(); 01758 01759 if (Selected->Count() == 0) 01760 return FALSE; // Nothing to render 01761 01762 Node* pNode = Selected->FindFirst(); 01763 Spread* pSpread = pNode->FindParentSpread(); 01764 01765 // Find out the blob rect of the selection 01766 DocRect SelRect = Selected->GetBlobBoundingRect(); 01767 01768 // If a clip rect was given, and it doesn't completely contain the sel bounds, 01769 // then we'll have to use that 01770 if (Rect && !Rect->ContainsRect(SelRect)) 01771 SelRect = *Rect; 01772 01773 if (!SelRect.IsEmpty()) 01774 { 01775 // So lets check the pending regions 01776 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01777 01778 while (pRegion) 01779 { 01780 // Check the RenderRegion is for the same spread. 01781 if (pRegion->GetRenderSpread() == pSpread && 01782 pRegion->GetRenderView()==DocView::GetSelected() && 01783 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01784 { 01785 // Get the 'clip' rect of this Render Region. 01786 DocRect ClipRect = pRegion->GetRegionRect(); 01787 01788 // If any of the RenderRegions completely contain the rect 01789 // then there is no point in rendering anything 01790 01791 if (ClipRect.ContainsRect(SelRect)) 01792 return FALSE; // We don't need to render any blobs 01793 } 01794 01795 // Get the Next render region 01796 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01797 } 01798 } 01799 return TRUE; 01800 }
|
|
If the blobs specified are already displayed, then they are rendered onto the screen to get rid of them (EORing!). The Flags that the blob manager maintains about which blobs are on screen and which are not are also updated.
Definition at line 454 of file blobs.cpp. 00455 { 00456 RemovingBlobs = TRUE; 00457 00458 // First we have to work out which bits of the we have to add. 00459 // Do we need Object blobs to be rendered 00460 BOOL DrawObject = FALSE; 00461 if (IsObjectBlob && Blobs.Object) 00462 { 00463 DrawObject = TRUE; 00464 IsObjectBlob = FALSE; 00465 } 00466 00467 // Do we need Artistic blobs to be rendered 00468 BOOL DrawArtistic = FALSE; 00469 if (IsArtisticBlob && Blobs.Artistic) 00470 { 00471 DrawArtistic = TRUE; 00472 IsArtisticBlob = FALSE; 00473 } 00474 00475 // Do we need Fill blobs to be rendered 00476 BOOL DrawFill = FALSE; 00477 if (IsFillBlob && Blobs.Fill) 00478 { 00479 DrawFill = TRUE; 00480 IsFillBlob = FALSE; 00481 } 00482 00483 // Do we need Fill blobs to be rendered 00484 BOOL DrawEffect = FALSE; 00485 if (IsEffectBlob && Blobs.Effect) 00486 { 00487 DrawEffect = TRUE; 00488 IsEffectBlob = FALSE; 00489 } 00490 00491 // Do we need Tiny blobs to be rendered 00492 BOOL DrawTiny = FALSE; 00493 if (IsTinyBlob && Blobs.Tiny) 00494 { 00495 DrawTiny = TRUE; 00496 IsTinyBlob = FALSE; 00497 } 00498 00499 // Do we need Pen blobs to be rendered 00500 BOOL DrawPen = FALSE; 00501 if (IsPenBlob && Blobs.Pen) 00502 { 00503 DrawPen = TRUE; 00504 IsPenBlob = FALSE; 00505 } 00506 00507 // Do we need ToolObject blobs to be rendered 00508 BOOL DrawToolObject = FALSE; 00509 if (IsToolObjectBlob && Blobs.ToolObject) 00510 { 00511 DrawToolObject = TRUE; 00512 IsToolObjectBlob = FALSE; 00513 } 00514 00515 if (!NeedToRenderSelectionBlobs(NULL)) 00516 return; 00517 00518 // EOR on in all the render regions that are still rendering, 00519 // so that the Blob rendering when the region is finished, 00520 // will take them off 00521 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00522 00523 if (!pRegionList->IsEmpty()) 00524 { 00525 // Find out which spread the selection is on 00526 SelRange* Selected = GetApplication()->FindSelection(); 00527 Node* pNode = Selected->FindFirst(); 00528 00529 if (pNode) // Is there a Selection ? 00530 { 00531 Spread* pSpread = pNode->FindParentSpread(); 00532 00533 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 00534 00535 while (pRegion) 00536 { 00537 // Check the RenderRegion is for the same spread. 00538 if (pRegion->GetRenderSpread() == pSpread && 00539 pRegion->GetRenderView()==DocView::GetSelected() && 00540 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 00541 { 00542 // Render the blobs 'clipped' to this Render Region. 00543 DocRect ClipRect = pRegion->GetRegionRect(); 00544 RenderSpecificBlobsOnSelection( &ClipRect, 00545 DrawObject, DrawArtistic, DrawFill, 00546 DrawTiny, DrawPen, DrawToolObject, DrawEffect ); 00547 } 00548 00549 // Get the Next render region 00550 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 00551 } 00552 } 00553 } 00554 00555 RenderSpecificBlobsOnSelection( NULL, DrawObject, DrawArtistic, 00556 DrawFill, DrawTiny, DrawPen, DrawToolObject, DrawEffect); 00557 }
|
|
This function will render all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 834 of file blobs.cpp. 00835 { 00836 // If we are not drawing blobs today, then return straight away 00837 if (!DrawBlobsAtAll) 00838 return; 00839 00840 // Now render the sections that need to be rendered to get the corrent blobs on screen 00841 RenderRegion* pRegion = DocView::RenderOnTop(Rect, pSpread, ClippedEOR); 00842 while (pRegion) 00843 { 00844 // Find out the clipping rect of this region 00845 DocRect TestRect = pRegion->GetClipRect(); 00846 00847 // Find the first selected object in the tree; 00848 SelRange* Selected = GetApplication()->FindSelection(); 00849 00850 // Karim 29/06/2000 00851 // PromoteToParent should never be set TRUE on the selection range, outside 00852 // of code in which its modifications are required. 00853 // I have included a TRACE statement here, as a 'quiet' note to programmers, 00854 // should this occur. 00855 RangeControl rc = Selected->GetRangeControlFlags(); 00856 if (rc.PromoteToParent) 00857 { 00858 TRACE( _T("BlobManager::Render; PromoteToParent is TRUE! Read inline comment for details.\n")); 00859 rc.PromoteToParent = FALSE; 00860 Selected->Range::SetRangeControl(rc); 00861 } 00862 00863 Node* pNode = Selected->FindFirst(); 00864 while(pNode) 00865 { 00866 // Render only the required blobs 00867 if (pNode->IsBounded()) 00868 { 00869 // This node is bounded, so see if we really need to render it 00870 if (TestRect.IsIntersectedWith(((NodeRenderableBounded*)pNode)->GetBlobBoundingRect())) 00871 RenderRequiredBlobs((NodeRenderable*)pNode, pRegion); 00872 } 00873 else 00874 { 00875 // Always render it if it is not bounded (probably an Attribute) 00876 RenderRequiredBlobs((NodeRenderable*)pNode, pRegion); 00877 } 00878 00879 // Find the next selected node to render 00880 pNode = Selected->FindNext(pNode); 00881 } 00882 00883 // Go find the next region 00884 pRegion = DocView::GetNextOnTop(Rect); 00885 } 00886 00887 // Bodge to stop fill meshes EOR each other out. 00888 AttrFillGeometry::LastRenderedMesh = NULL; 00889 }
|
|
Renders the blobs for the given node. Only the required blobs are rendered and since the blobs are EOR rendered, this function can be used to put the blobs onto the screen or take them off the screen.
Definition at line 1056 of file blobs.cpp. 01057 { 01058 // If we are not drawing blobs today, then return straight away 01059 if (!DrawBlobsAtAll) 01060 return; 01061 01062 // Now render the sections that need to be rendered to get the corrent blobs on screen 01063 RenderRegion* pRegion = DocView::RenderOnTop(Rect, pSpread, ClippedEOR); 01064 while (pRegion) 01065 { 01066 // Find out the clipping rect of this region 01067 DocRect TestRect = pRegion->GetClipRect(); 01068 01069 // Render only the blobs that need to be drawn 01070 if (pNode->IsBounded()) 01071 { 01072 // This node is bounded, so see if we really need to render it 01073 if (TestRect.IsIntersectedWith(((NodeRenderableBounded*)pNode)->GetBlobBoundingRect())) 01074 RenderRequiredBlobs(pNode, pRegion); 01075 } 01076 else 01077 { 01078 // Always render it if it is not bounded (probably an Attribute) 01079 RenderRequiredBlobs(pNode, pRegion); 01080 } 01081 01082 // Go find the next region 01083 pRegion = DocView::GetNextOnTop(Rect); 01084 } 01085 }
|
|
This function will render off all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 1169 of file blobs.cpp. 01170 { 01171 RemovingBlobs = TRUE; 01172 01173 // If we are not drawing blobs today, then return straight away 01174 if (!DrawBlobsAtAll) 01175 return; 01176 01177 // Are we in the middle of a Background redraw ? 01178 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01179 if (pRegionList->IsEmpty()) 01180 { 01181 // Nope, so do stuff as normal 01182 01183 // Draw the blobs off 01184 RenderMyBlobs(Rect, pSpread, pNode); 01185 return; 01186 } 01187 01188 // We must be background rendering ... 01189 01190 // So lets try a bit of an optimisation 01191 if (!NeedToRenderNodeBlobs(Rect, pSpread, pNode)) 01192 return; 01193 01194 // Oh well, lets render some blobs then 01195 01196 // EOR on in all the render regions that are still rendering, 01197 // so that the Blob rendering when the region is finished, 01198 // will take them off 01199 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01200 01201 while (pRegion) 01202 { 01203 // Check the RenderRegion is for the same spread. 01204 if (pRegion->GetRenderSpread() == pSpread && 01205 pRegion->GetRenderView()==DocView::GetSelected() && 01206 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01207 { 01208 // Render the blobs 'clipped' to this Render Region. 01209 DocRect ClipRect = pRegion->GetRegionRect(); 01210 RenderMyBlobs(&ClipRect, pSpread, pNode); 01211 } 01212 01213 // Get the Next render region 01214 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01215 } 01216 01217 // Stop fill meshes EORing each other out. 01218 FillGeometryAttribute* pLastMesh = AttrFillGeometry::LastRenderedMesh; 01219 AttrFillGeometry::LastRenderedMesh = NULL; 01220 01221 // Draw the blobs off 01222 RenderMyBlobs(Rect, pSpread, pNode); 01223 01224 // Stop fill meshes EORing each other out. 01225 AttrFillGeometry::LastRenderedMesh = pLastMesh; 01226 }
|
|
This function will render on all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 1098 of file blobs.cpp. 01099 { 01100 RemovingBlobs = FALSE; 01101 01102 // If we are not drawing blobs today, then return straight away 01103 if (!DrawBlobsAtAll) 01104 return; 01105 01106 // Are we in the middle of a Background redraw ? 01107 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01108 if (pRegionList->IsEmpty()) 01109 { 01110 // Nope, so do stuff as normal 01111 01112 // Draw the blobs on 01113 RenderMyBlobs(Rect, pSpread, pNode); 01114 return; 01115 } 01116 01117 // We must be background rendering ... 01118 01119 // So lets try a bit of an optimisation 01120 if (!NeedToRenderNodeBlobs(Rect, pSpread, pNode)) 01121 return; 01122 01123 // Oh well, lets render some blobs then 01124 01125 // Draw the blobs on 01126 RenderMyBlobs(Rect, pSpread, pNode); 01127 01128 // Stop fill meshes EORing each other out. 01129 FillGeometryAttribute* pLastMesh = AttrFillGeometry::LastRenderedMesh; 01130 AttrFillGeometry::LastRenderedMesh = NULL; 01131 01132 // Now EOR off in all the render regions that are still rendering, 01133 // so that the Blob rendering when the region is finished, 01134 // will put them on 01135 01136 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01137 01138 while (pRegion) 01139 { 01140 // Check the RenderRegion is for the same spread. 01141 if (pRegion->GetRenderSpread() == pSpread && 01142 pRegion->GetRenderView()==DocView::GetSelected() && 01143 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01144 { 01145 // Render the blobs 'clipped' to this Render Region. 01146 DocRect ClipRect = pRegion->GetRegionRect(); 01147 RenderMyBlobs(&ClipRect, pSpread, pNode); 01148 } 01149 01150 // Get the Next render region 01151 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01152 } 01153 01154 // Stop fill meshes EORing each other out. 01155 AttrFillGeometry::LastRenderedMesh = pLastMesh; 01156 }
|
|
This function will render all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 1361 of file blobs.cpp. 01362 { 01363 RenderRegion* pOnTopRegion = DocView::RenderOnTop(Rect, pSpread, ClippedEOR); 01364 while (pOnTopRegion) 01365 { 01366 pNode->RenderObjectBlobs(pOnTopRegion); 01367 01368 // Go find the next region 01369 pOnTopRegion = DocView::GetNextOnTop(Rect); 01370 } 01371 }
|
|
This function will render off all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 1300 of file blobs.cpp. 01301 { 01302 RemovingBlobs = TRUE; 01303 01304 // Are we in the middle of a Background redraw ? 01305 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01306 if (pRegionList->IsEmpty()) 01307 { 01308 // Nope, so do stuff as normal 01309 01310 // Draw the blobs off 01311 RenderObjectBlobs(Rect, pSpread, pNode); 01312 return; 01313 } 01314 01315 // We must be background rendering ... 01316 01317 // So lets try a bit of an optimisation 01318 if (!NeedToRenderNodeBlobs(Rect, pSpread, pNode)) 01319 return; 01320 01321 // Oh well, lets render some blobs then 01322 01323 // EOR on in all the render regions that are still rendering, 01324 // so that the Blob rendering when the region is finished, 01325 // will take them off 01326 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01327 01328 while (pRegion) 01329 { 01330 // Check the RenderRegion is for the same spread. 01331 if (pRegion->GetRenderSpread() == pSpread && 01332 pRegion->GetRenderView()==DocView::GetSelected() && 01333 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01334 { 01335 // Render the blobs 'clipped' to this Render Region. 01336 DocRect ClipRect = pRegion->GetRegionRect(); 01337 01338 // Render what we need to 01339 RenderObjectBlobs(&ClipRect, pSpread, pNode); 01340 } 01341 01342 // Get the Next render region 01343 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01344 } 01345 01346 // Draw the blobs off 01347 RenderObjectBlobs(Rect, pSpread, pNode); 01348 }
|
|
This function will render on all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 1239 of file blobs.cpp. 01240 { 01241 RemovingBlobs = FALSE; 01242 01243 // Are we in the middle of a Background redraw ? 01244 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01245 if (pRegionList->IsEmpty()) 01246 { 01247 // Nope, so do stuff as normal 01248 01249 // Draw the blobs on 01250 RenderObjectBlobs(Rect, pSpread, pNode); 01251 return; 01252 } 01253 01254 // We must be background rendering ... 01255 01256 // So lets try a bit of an optimisation 01257 if (!NeedToRenderNodeBlobs(Rect, pSpread, pNode)) 01258 return; 01259 01260 // Oh well, lets render some blobs then 01261 01262 // Draw the blobs on 01263 RenderObjectBlobs(Rect, pSpread, pNode); 01264 01265 // EOR off in all the render regions that are still rendering, 01266 // so that the Blob rendering when the region is finished, 01267 // will put them on 01268 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01269 01270 while (pRegion) 01271 { 01272 // Check the RenderRegion is for the same spread. 01273 if (pRegion->GetRenderSpread() == pSpread && 01274 pRegion->GetRenderView()==DocView::GetSelected() && 01275 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01276 { 01277 // Render the blobs 'clipped' to this Render Region. 01278 DocRect ClipRect = pRegion->GetRegionRect(); 01279 01280 // Render what we need to 01281 RenderObjectBlobs(&ClipRect, pSpread, pNode); 01282 } 01283 01284 // Get the Next render region 01285 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01286 } 01287 }
|
|
This function will render off all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 978 of file blobs.cpp. 00979 { 00980 RemovingBlobs = TRUE; 00981 00982 // If we are not drawing blobs today, then return straight away 00983 if (!DrawBlobsAtAll) 00984 return; 00985 00986 // Are we in the middle of a Background redraw ? 00987 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00988 if (pRegionList->IsEmpty()) 00989 { 00990 // Nope, so do stuff as normal 00991 00992 // Draw the blobs on 00993 Render(Rect, pSpread); 00994 00995 // Stop fill meshes EORing each other out. 00996 AttrFillGeometry::LastRenderedMesh = NULL; 00997 return; 00998 } 00999 01000 // We must be background rendering ... 01001 // So lets try a bit of an optimisation 01002 01003 // If the Blob we are about to render, is completely contained 01004 // within a pending Render Region, then we don't need to 01005 // render anything 01006 01007 if (!NeedToRenderSelectionBlobs(Rect)) 01008 return; 01009 01010 // Oh well, lets render some blobs then 01011 01012 // EOR on in all the render regions that are still rendering, 01013 // so that the Blob rendering when the region is finished, 01014 // will take them off 01015 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01016 01017 while (pRegion) 01018 { 01019 // Check the RenderRegion is for the same spread. 01020 if (pRegion->GetRenderSpread() == pSpread && 01021 pRegion->GetRenderView()==DocView::GetSelected() && 01022 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 01023 { 01024 // Render the blobs 'clipped' to this Render Region. 01025 DocRect ClipRect = pRegion->GetRegionRect(); 01026 Render(&ClipRect, pSpread); 01027 } 01028 01029 // Get the Next render region 01030 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01031 } 01032 01033 // Stop fill meshes EORing each other out. 01034 AttrFillGeometry::LastRenderedMesh = NULL; 01035 01036 // Draw the blobs off 01037 Render(Rect, pSpread); 01038 01039 // Stop fill meshes EORing each other out. 01040 AttrFillGeometry::LastRenderedMesh = NULL; 01041 }
|
|
This function will render on all the blobs that are currently being displayed for the given clipping rectangle.
Definition at line 902 of file blobs.cpp. 00903 { 00904 RemovingBlobs = FALSE; 00905 00906 // If we are not drawing blobs today, then return straight away 00907 if (!DrawBlobsAtAll) 00908 return; 00909 00910 // Are we in the middle of a Background redraw ? 00911 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 00912 if (pRegionList->IsEmpty()) 00913 { 00914 // Nope, so do stuff as normal 00915 00916 // Draw the blobs on 00917 Render(Rect, pSpread); 00918 00919 // Stop fill meshes EORing each other out. 00920 AttrFillGeometry::LastRenderedMesh = NULL; 00921 return; 00922 } 00923 00924 // We must be background rendering ... 00925 // So lets try a bit of an optimisation 00926 00927 // If the Blob we are about to render, is completely contained 00928 // within a pending Render Region, then we don't need to 00929 // render anything 00930 00931 if (!NeedToRenderSelectionBlobs(Rect)) 00932 return; 00933 00934 // Oh well, lets render some blobs then 00935 00936 // Draw the blobs on 00937 Render(Rect, pSpread); 00938 00939 // Stop fill meshes EORing each other out. 00940 AttrFillGeometry::LastRenderedMesh = NULL; 00941 00942 // Now EOR off in all the render regions that are still rendering, 00943 // so that the Blob rendering when the region is finished, 00944 // will put them on 00945 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 00946 00947 while (pRegion) 00948 { 00949 // Check the RenderRegion is for the same spread. 00950 if (pRegion->GetRenderSpread() == pSpread && 00951 pRegion->GetRenderView()==DocView::GetSelected() && 00952 (pRegion->IsInkRenderStarted || pRegion->NeedsOSPaper)) 00953 { 00954 // Render the blobs 'clipped' to this Render Region. 00955 DocRect ClipRect = pRegion->GetRegionRect(); 00956 Render(&ClipRect, pSpread); 00957 } 00958 00959 // Get the Next render region 00960 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 00961 } 00962 00963 // Stop fill meshes EORing each other out. 00964 AttrFillGeometry::LastRenderedMesh = NULL; 00965 }
|
|
Renders the required blobs for the given node into the given render region. The required blobs are specified by the tool when it is activated.
Definition at line 1386 of file blobs.cpp. 01387 { 01388 // We know that the node is a renderable ink as it is selected 01389 ENSURE( pNode->IsKindOf(CC_RUNTIME_CLASS(NodeRenderableInk)), "Selected object was not Renderable!"); 01390 01391 // Render the Object Blobs of this node 01392 if (IsObjectBlob) 01393 pNode->RenderObjectBlobs(pRegion); 01394 01395 // Render the Artistic blobs of this node 01396 if (IsArtisticBlob) 01397 pNode->RenderArtisticBlobs(pRegion); 01398 01399 // Render the Fill blobs of this node 01400 if (IsFillBlob) 01401 pNode->RenderAppliedFillBlobs(pRegion); 01402 01403 // Render the Fill blobs of this node 01404 if (IsEffectBlob) 01405 pNode->RenderEffectBlobs(pRegion); 01406 01407 // Render the tiny blobs of this node 01408 if (IsTinyBlob) 01409 pNode->RenderTinyBlobs(pRegion); 01410 01411 // Render the pen blobs of this node 01412 if (IsPenBlob) 01413 pNode->RenderPenBlobs(pRegion); 01414 01415 // Render the ToolObject blobs of this node 01416 if (IsToolObjectBlob) 01417 pNode->RenderToolObjectBlobs(pRegion); 01418 }
|
|
Renders the required blobs for the given node into the given render region. The required blobs are specified by the tool when it is activated.
Definition at line 1433 of file blobs.cpp. 01434 { 01435 // Find out which spread the selection is on 01436 SelRange* Selected = GetApplication()->FindSelection(); 01437 Node* pNode = Selected->FindFirst(); 01438 01439 // go and render the blobs if there are any selected nodes 01440 if (pNode!=NULL && DrawBlobsAtAll) 01441 { 01442 Spread* pSpread = pNode->FindParentSpread(); 01443 01444 // Render what we need to 01445 RenderRegion* pRegion = DocView::RenderOnTop(Rect, pSpread, ClippedEOR); 01446 while (pRegion) 01447 { 01448 // Find the first selected object in the tree; 01449 Node* pNode = Selected->FindFirst(); 01450 while(pNode) 01451 { 01452 // Render only those blobs that are changing state (ie those appearing or disappearing) 01453 RenderRequiredBlobs((NodeRenderable*) pNode, pRegion); 01454 01455 // Find the next selected node to render 01456 pNode = Selected->FindNext(pNode); 01457 } 01458 01459 // Go find the next region 01460 pRegion = DocView::GetNextOnTop(Rect); 01461 } 01462 } 01463 01464 // Bodge to stop fill meshes EOR each other out. 01465 AttrFillGeometry::LastRenderedMesh = NULL; 01466 }
|
|
Renders only the blobs specified. This is called from the Add and Remove Interest Functions to add new types of blob to the display or take types of blob that are no longer needed off the display.
Definition at line 1490 of file blobs.cpp. 01493 { 01494 // We know that the node is a renderable ink as it is selected 01495 ENSURE( pNode->IsKindOf(CC_RUNTIME_CLASS(NodeRenderableInk)), "Selected object was not Renderable!"); 01496 01497 // Render the Object Blobs of this node 01498 if (DrawObject) 01499 pNode->RenderObjectBlobs(pRegion); 01500 01501 // Render the Artistic blobs of this node 01502 if (DrawArtistic) 01503 pNode->RenderArtisticBlobs(pRegion); 01504 01505 // Render the Fill blobs of this node 01506 if (DrawFill) 01507 pNode->RenderAppliedFillBlobs(pRegion); 01508 01509 // Render the tiny blobs of this node 01510 if (DrawTiny) 01511 pNode->RenderTinyBlobs(pRegion); 01512 01513 // Render the Pen blobs of this node 01514 if (DrawPen) 01515 pNode->RenderPenBlobs(pRegion); 01516 01517 // Render the ToolObject blobs of this node 01518 if (DrawToolObject) 01519 pNode->RenderToolObjectBlobs(pRegion); 01520 01521 // Render the Effect blobs of this node 01522 if (DrawEffect) 01523 pNode->RenderEffectBlobs(pRegion); 01524 }
|
|
Renders only the blobs specified. This is called from the Add and Remove Interest Functions to add new types of blob to the display or take types of blob that are no longer needed off the display.
Definition at line 1548 of file blobs.cpp. 01552 { 01553 // Find out which spread the selection is on 01554 SelRange* Selected = GetApplication()->FindSelection(); 01555 Node* pNode = Selected->FindFirst(); 01556 01557 // go and render the blobs if there are any selected nodes 01558 if (pNode!=NULL && DrawBlobsAtAll) 01559 { 01560 Spread* pSpread = pNode->FindParentSpread(); 01561 01562 // Render what we need to 01563 RenderRegion* pRegion = DocView::RenderOnTop(Rect, pSpread, ClippedEOR); 01564 while (pRegion) 01565 { 01566 // Find the first selected object in the tree; 01567 Node* pNode = Selected->FindFirst(); 01568 while(pNode) 01569 { 01570 // Render only those blobs that are changing state (ie those appearing or disappearing) 01571 RenderSpecificBlobs((NodeRenderable*)pNode, pRegion, DrawObject, DrawArtistic, 01572 DrawFill, DrawTiny, DrawPen, DrawToolObject, DrawEffect); 01573 01574 // Find the next selected node to render 01575 pNode = Selected->FindNext(pNode); 01576 } 01577 01578 // Go find the next region 01579 pRegion = DocView::GetNextOnTop(Rect); 01580 } 01581 } 01582 01583 // Bodge to stop fill meshes EOR each other out. 01584 AttrFillGeometry::LastRenderedMesh = NULL; 01585 }
|
|
This function will render off the specified tools blobs.
Definition at line 1702 of file blobs.cpp. 01703 { 01704 // If we are not drawing blobs today, then return straight away 01705 if (!DrawBlobsAtAll) 01706 return; 01707 01708 // if (bToolBlobsAreOff) 01709 // return; 01710 01711 // EOR on in all the render regions that are still rendering, 01712 // so that the Blob rendering when the region is finished, 01713 // will take them off 01714 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01715 01716 if (!pRegionList->IsEmpty()) 01717 { 01718 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01719 01720 while (pRegion) 01721 { 01722 // Check the RenderRegion is for the same spread. 01723 if (pRegion->GetRenderSpread() == pSpread && pRegion->GetRenderView()==DocView::GetSelected()) 01724 { 01725 // Render the blobs 'clipped' to this Render Region. 01726 DocRect ClipRect = pRegion->GetRegionRect(); 01727 pTool->RenderToolBlobs(pSpread, &ClipRect); 01728 } 01729 01730 // Get the Next render region 01731 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01732 } 01733 } 01734 01735 // Take the tool blobs off 01736 pTool->RenderToolBlobs(pSpread, pClipRect); 01737 bToolBlobsAreOff = TRUE; 01738 }
|
|
This function will render on the specified tools blobs.
Definition at line 1657 of file blobs.cpp. 01658 { 01659 // If we are not drawing blobs today, then return straight away 01660 if (!DrawBlobsAtAll) 01661 return; 01662 01663 // Put the tool blobs on 01664 pTool->RenderToolBlobs(pSpread, pClipRect); 01665 01666 // Now EOR off in all the render regions that are still rendering, 01667 // so that the Blob rendering when the region is finished, 01668 // will put them on 01669 RenderRegionList* pRegionList = GetApplication()->GetRegionList(); 01670 01671 if (!pRegionList->IsEmpty()) 01672 { 01673 RenderRegion* pRegion = (RenderRegion*)pRegionList->GetHead(); 01674 01675 while (pRegion) 01676 { 01677 // Check the RenderRegion is for the same spread. 01678 if (pRegion->GetRenderSpread() == pSpread && pRegion->GetRenderView()==DocView::GetSelected()) 01679 { 01680 // Render the blobs 'clipped' to this Render Region. 01681 DocRect ClipRect = pRegion->GetRegionRect(); 01682 pTool->RenderToolBlobs(pSpread, &ClipRect); 01683 } 01684 01685 // Get the Next render region 01686 pRegion = (RenderRegion*)pRegionList->GetNext(pRegion); 01687 } 01688 } 01689 bToolBlobsAreOff = FALSE; 01690 }
|
|
Definition at line 228 of file blobs.cpp. 00229 { 00230 BlobStyle BlobsToRemove; 00231 00232 // Find all the blobs that are NOT selected 00233 BlobsToRemove.Object = !Blobs.Object; 00234 BlobsToRemove.Artistic = !Blobs.Artistic; 00235 BlobsToRemove.Fill = !Blobs.Fill; 00236 BlobsToRemove.Tiny = !Blobs.Tiny; 00237 BlobsToRemove.Pen = !Blobs.Pen; 00238 BlobsToRemove.ToolObject= !Blobs.ToolObject; 00239 BlobsToRemove.Effect = !Blobs.Effect; 00240 00241 // and remove them 00242 RemoveInterest(BlobsToRemove); 00243 00244 // Add the selected blobs 00245 AddInterest(Blobs); 00246 00247 /* 00248 // Do we need to render Object Blobs 00249 BOOL DrawObject = FALSE; 00250 if ((Blobs.Object && !IsObjectBlob) || (!Blobs.Object && IsObjectBlob)) 00251 DrawObject = TRUE; 00252 00253 // Do we need to render Artistic Blobs 00254 BOOL DrawArtistic = FALSE; 00255 if ((Blobs.Artistic && !IsArtisticBlob) || (!Blobs.Artistic && IsArtisticBlob)) 00256 DrawArtistic = TRUE; 00257 00258 // Do we need to render Fill Blobs 00259 BOOL DrawFill = FALSE; 00260 if ((Blobs.Fill && !IsFillBlob) || (!Blobs.Fill && IsFillBlob)) 00261 DrawFill = TRUE; 00262 00263 // Do we need to render Tiny Blobs 00264 BOOL DrawTiny = FALSE; 00265 if ((Blobs.Tiny && !IsTinyBlob) || (!Blobs.Tiny && IsTinyBlob)) 00266 DrawTiny = TRUE; 00267 00268 // Do we need to render Tiny Blobs 00269 BOOL DrawPen = FALSE; 00270 if ((Blobs.Pen && !IsPenBlob) || (!Blobs.Pen && IsPenBlob)) 00271 DrawPen = TRUE; 00272 00273 00274 // Find out about the selection 00275 SelRange* Selected = GetApplication()->FindSelection(); 00276 Node* pNode = Selected->FindFirst(); 00277 00278 // was there a selection to render? 00279 if (pNode!=NULL && DrawBlobsAtAll) 00280 { 00281 // Find the parent spread 00282 Spread* pSpread = pNode->FindParentSpread(); 00283 00284 // Render what we need to 00285 RenderRegion* pRegion = DocView::RenderOnTop(NULL, pSpread, ClippedEOR); 00286 while (pRegion) 00287 { 00288 // Find the first selected object in the tree; 00289 Node* pNode = Selected->FindFirst(); 00290 while(pNode) 00291 { 00292 // Render only those blobs that are changing state (ie those appearing or disappearing) 00293 RenderSpecificBlobs((NodeRenderable*)pNode, pRegion, DrawObject, DrawArtistic, 00294 DrawFill, DrawTiny, DrawPen); 00295 00296 // Find the next selected node to render 00297 pNode = Selected->FindNext(pNode); 00298 } 00299 00300 // Go find the next region 00301 pRegion = DocView::GetNextOnTop(NULL); 00302 } 00303 } 00304 00305 // Now we have to set the flags to the appropraite value 00306 IsFillBlob = Blobs.Fill; 00307 IsArtisticBlob = Blobs.Artistic; 00308 IsObjectBlob = Blobs.Object; 00309 IsTinyBlob = Blobs.Tiny; 00310 IsPenBlob = Blobs.Pen; 00311 00312 // Bodge to stop fill meshes EOR each other out. 00313 AttrFillGeometry::LastRenderedMesh = NULL; 00314 */ 00315 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|