#include <vectrndr.h>
Inheritance diagram for VectorFileRenderRegion:
Public Member Functions | |
VectorFileRenderRegion (void) | |
Default constructor for the VectorFileRenderRegion class. | |
VectorFileRenderRegion (DocRect ClipRect, Matrix ConvertMatrix, FIXED16 ViewScale) | |
Constructor for the VectorFileRenderRegion class. | |
virtual | ~VectorFileRenderRegion (void) |
Destructor for the VectorFileRenderRegion class. | |
BOOL | Init (void) |
Constructor for the VectorFileRenderRegion class. | |
virtual BOOL | StartRender (void) |
Prepare the render region for rendering (exporting). | |
virtual BOOL | StopRender (void) |
Deinitialise the render region after rendering (exporting). | |
void | DrawRect (DocRect *RectToRender) |
None at present - this function should not be called during ink rendering. | |
void | DrawDragRect (DocRect *RectToRender) |
Should not be called for this kind of render region. | |
void | DrawLine (const DocCoord &StartPoint, const DocCoord &EndPoint) |
None at present - this function should not be called during ink rendering. | |
void | DrawPixel (const DocCoord &Point) |
Should not be called for this kind of render region. | |
void | DrawBlob (DocCoord p, BlobType type) |
Should not be called for this kind of render region. | |
void | DrawCross (const DocCoord &Point, const UINT32 Size) |
Should not be called for this kind of render region. | |
void | DrawBitmap (const DocCoord &Point, KernelBitmap *pBitmap) |
Should not be called for this kind of render region. | |
void | DrawBitmap (const DocCoord &Point, UINT32 BitmapID, UINT32 ToolID=NULL) |
Should not be called for this kind of render region. | |
void | DrawBitmapBlob (const DocCoord &Point, KernelBitmap *BlobShape) |
Should not be called for this kind of render region. | |
void | DrawBitmapBlob (const DocCoord &Point, ResourceID resID) |
Protected Member Functions | |
MILLIPOINT | CalcPixelWidth () |
None for vector file render regions - just returns 1. | |
MILLIPOINT | CalcScaledPixelWidth () |
None for vector file render regions - just returns 1. | |
virtual void | InitClipping () |
Stub function. | |
virtual void | InitAttributes () |
Set up the default attributes for the render region. (Actually just marks the path attributes as invalid, so that we output some attribute commands before the first path we export). | |
virtual void | DeInitAttributes () |
Cleans up the default attributes for the render region. | |
virtual void | SetOSDrawingMode () |
Ensures that the drawing mode is set to DM_COPYPEN - any other drawing mode doesn't make sense when exporting EPS. | |
virtual void | SetQualityLevel () |
Sets the quality level for the drawing. Unused. | |
DocColour | AlphaBlend (DocColour &Foreground, DocColour &Background, UINT32 Transp) |
Blends the two colours (pForeground and pBackground) together using a simple alpha blending algorithm. | |
Protected Attributes | |
AttributeEntry * | LastOutputAttrs |
Definition at line 112 of file vectrndr.h.
|
Default constructor for the VectorFileRenderRegion class.
Definition at line 116 of file vectrndr.cpp. 00117 : RenderRegion() 00118 { 00119 // Null this pointer to prevent access violations. 00120 LastOutputAttrs = NULL; 00121 }
|
|
Constructor for the VectorFileRenderRegion class.
Definition at line 136 of file vectrndr.cpp. 00139 : RenderRegion( ClipRect, ConvertMatrix, ViewScale ) 00140 { 00141 // Null this pointer to prevent access violations. 00142 LastOutputAttrs = NULL; 00143 }
|
|
Destructor for the VectorFileRenderRegion class.
Definition at line 155 of file vectrndr.cpp. 00156 { 00157 // Clear up any attributes that survived the rendering process. 00158 DeInitAttributes(); 00159 }
|
|
Blends the two colours (pForeground and pBackground) together using a simple alpha blending algorithm.
Definition at line 574 of file vectrndr.cpp. 00577 { 00578 // Step 1: Declare local variables. 00579 DocColour Result; 00580 INT32 FGColour [3]; 00581 INT32 BGColour [3]; 00582 INT32 ResultColour [3]; 00583 00584 // Step 2: Extract the colours from the DocColour class. 00585 Foreground.GetRGBValue( &( FGColour [0] ), &( FGColour [1] ), &( FGColour [2] ) ); 00586 Background.GetRGBValue( &( BGColour [0] ), &( BGColour [1] ), &( BGColour [2] ) ); 00587 00588 // Step 3: Cycle through the list of colours, perform the alpha blend, and pass the 00589 // result out. 00590 for ( INT32 i = 0; i < 3; i++ ) 00591 { 00592 // Perform the alpha blend. 00593 ResultColour [i] = ( ( ( 255 - Transp ) * FGColour [i] ) + 00594 ( Transp * BGColour [i] ) ) / 255; 00595 } 00596 00597 // Step 4: Set the colour value. 00598 Result.SetRGBValue( ResultColour [0], ResultColour [1], ResultColour [2] ); 00599 00600 // Step 5: And return it. 00601 return Result; 00602 }
|
|
None for vector file render regions - just returns 1.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 418 of file vectrndr.cpp.
|
|
None for vector file render regions - just returns 1.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 435 of file vectrndr.cpp.
|
|
Cleans up the default attributes for the render region.
Definition at line 505 of file vectrndr.cpp. 00506 { 00507 // Release the 'Last Ouput' array 00508 if ( LastOutputAttrs != NULL ) 00509 { 00510 for ( INT32 i = 0; i < NumCurrentAttrs; i++ ) 00511 { 00512 if ( LastOutputAttrs[i].Temp ) 00513 { 00514 delete LastOutputAttrs[i].pAttr; 00515 } 00516 } 00517 00518 // We've finished with this array of attributes now 00519 CCFree( LastOutputAttrs ); 00520 LastOutputAttrs = NULL; 00521 } 00522 }
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 359 of file vectrndr.cpp.
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 339 of file vectrndr.cpp.
|
|
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. |
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 379 of file vectrndr.cpp.
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 301 of file vectrndr.cpp.
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 320 of file vectrndr.cpp.
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 248 of file vectrndr.cpp.
|
|
None at present - this function should not be called during ink rendering.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 265 of file vectrndr.cpp. 00267 { 00268 ENSURE( FALSE, "EPSRenderRegion::DrawLine called - this should not happen!" ); 00269 }
|
|
Should not be called for this kind of render region.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 283 of file vectrndr.cpp.
|
|
None at present - this function should not be called during ink rendering.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 231 of file vectrndr.cpp. 00232 { 00233 ENSURE( FALSE, "VectorFileRenderRegion::DrawRect called - this should not happen!" ); 00234 }
|
|
Constructor for the VectorFileRenderRegion class.
Reimplemented from RenderRegion. Reimplemented in EPSRenderRegion. Definition at line 173 of file vectrndr.cpp. 00174 { 00175 // Clear up any previous attributes. 00176 DeInitAttributes(); 00177 00178 return TRUE; 00179 }
|
|
Set up the default attributes for the render region. (Actually just marks the path attributes as invalid, so that we output some attribute commands before the first path we export).
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 469 of file vectrndr.cpp. 00470 { 00471 // We don't use pens and brushes. 00472 SetOSDrawingMode(); 00473 SetLineAttributes(); 00474 SetFillAttributes(); 00475 00476 // Set up the Last Output attributes for this device, first making sure that 00477 // any we might have lying around already are cleaned up. 00478 DeInitAttributes(); 00479 LastOutputAttrs = AttributeManager::GetDefaultAttributes(); 00480 00481 if ( LastOutputAttrs != NULL ) 00482 { 00483 for ( INT32 i = 0; i < NumCurrentAttrs; i++ ) 00484 { 00485 // NULL all the pointers to begin with, 00486 // so that all default attribute are output 00487 // with the first object 00488 LastOutputAttrs[i].pAttr = NULL; 00489 LastOutputAttrs[i].Temp = FALSE; 00490 LastOutputAttrs[i].Ignore = FALSE; 00491 } 00492 } 00493 }
|
|
Stub function.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 451 of file vectrndr.cpp.
|
|
Ensures that the drawing mode is set to DM_COPYPEN - any other drawing mode doesn't make sense when exporting EPS.
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion. Definition at line 536 of file vectrndr.cpp. 00537 { 00538 // EPS doesn't care about drawing modes...or at least, we should never set 00539 // anything other than COPYPEN - EOR is right out! 00540 ENSURE( DrawingMode == DM_COPYPEN, "Non-standard drawing mode in EPS output!" ); 00541 }
|
|
Sets the quality level for the drawing. Unused.
Reimplemented from RenderRegion. Definition at line 553 of file vectrndr.cpp.
|
|
Prepare the render region for rendering (exporting).
Reimplemented from RenderRegion. Reimplemented in ArtWorksEPSRenderRegion, CamelotEPSRenderRegion, and PrintPSRenderRegion. Definition at line 193 of file vectrndr.cpp. 00194 { 00195 // Call base class first. 00196 if (!RenderRegion::StartRender()) 00197 return FALSE; 00198 00199 InitAttributes(); 00200 00201 return TRUE; 00202 }
|
|
Deinitialise the render region after rendering (exporting).
Implements RenderRegion. Reimplemented in AIEPSGradientScanRenderRegion, CamelotEPSRenderRegion, and PrintPSRenderRegion. Definition at line 214 of file vectrndr.cpp. 00215 { 00216 DeInitAttributes(); 00217 return TRUE; 00218 }
|
|
Reimplemented in CMXRenderRegion. Definition at line 173 of file vectrndr.h. |