XPFRenderRegion Class Reference

This is the custom render region for the capabilities conversion. More...

#include <xpfrgn.h>

Inheritance diagram for XPFRenderRegion:

RenderRegion ListItem CCObject SimpleCCObject List of all members.

Protected Attributes

PluginNativeFilterm_pFilter
double m_PixelsPerInch
CommonTransInfom_pTransInfo

Private Member Functions

 CC_DECLARE_DYNAMIC (XPFRenderRegion)
 XPFRenderRegion (PluginNativeFilter *pFilter, CapabilityTree *pPlugCaps, CommonTransInfo *pTransInfo=NULL)
 The Scanning Render Regions constructor. This sets all the member vars of the class to default values (usually 0 or NULL).
 ~XPFRenderRegion ()
 Destructor - It will do something if it needs to but at present this function is empty.
virtual BOOL AttachDevice (View *, CNativeDC *, Spread *SpreadToAttach=NULL)
virtual BOOL StartRender ()
 Called to start the rendering process. Allows the render region to get ready to start rendering.
virtual BOOL StopRender ()
 Called to stop rendering.
virtual void DrawPathToOutputDevice (Path *PathToRender, PathShape shapePath=PATHSHAPE_PATH)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual void DrawRect (DocRect *RectToRender)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual void DrawLine (const DocCoord &StartPoint, const DocCoord &EndPoint)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual void DrawPixel (const DocCoord &Point)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual void DrawBitmap (const DocCoord &Point, KernelBitmap *pBitmap)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual void DrawBitmap (const DocCoord &Point, UINT32 BitmapID, UINT32 ToolID=NULL)
 There is no actual rendering, as this class does not actually render anything to a device.
virtual BOOL DrawTransformedBitmap (NodeBitmap *pNodeBitmap)
 Works out if it can draw a Transformed bitmap.
virtual void DrawDragRect (DocRect *RectToRender)
 None - I just had to overide this function as it is pure virtual. Does nothing.
virtual void DrawBlob (DocCoord p, BlobType type)
 None - I just had to overide this function as it is pure virtual. Does nothing.
virtual void DrawCross (const DocCoord &Point, const UINT32 Size)
 None - I just had to overide this function as it is pure virtual. Does nothing.
virtual void DrawBitmapBlob (const DocCoord &Point, KernelBitmap *BlobShape)
 None - I just had to overide this function as it is pure virtual. Does nothing.
virtual void DrawBitmapBlob (const DocCoord &Point, ResourceID resID)
 None - I just had to overide this function as it is pure virtual. Does nothing.
virtual void InitClipping ()
 Sets up the clipping - does nothing in this class.
virtual void InitAttributes ()
 Sets up the attributes. Does nothing in this class.
virtual void SetLineAttributes ()
 Does nothing in this class.
virtual void SetOSDrawingMode ()
 Does nothing in this class.
virtual void SetQualityLevel ()
 Does nothing in this class.
virtual MILLIPOINT CalcPixelWidth ()
 Does nothing in this class.
virtual MILLIPOINT CalcScaledPixelWidth ()
 Does nothing in this class.
virtual double GetPixelsPerInch ()
virtual BOOL CheckOffscreenBounds ()
virtual void GetRenderRegionCaps (RRCaps *pCaps)
 This function allows render regions to admit to what they can and can not render. This allows other areas of the program to come in and help render regions out in some situations, if they are unable to render everything. eg. an OSRenderRegion can not render transparancy.
virtual BOOL RenderPaperAsInk ()

Detailed Description

This is the custom render region for the capabilities conversion.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/05

Definition at line 122 of file xpfrgn.h.


Constructor & Destructor Documentation

XPFRenderRegion::XPFRenderRegion PluginNativeFilter pFilter,
CapabilityTree pPlugCaps,
CommonTransInfo pTransInfo = NULL
[private]
 

The Scanning Render Regions constructor. This sets all the member vars of the class to default values (usually 0 or NULL).

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Definition at line 149 of file xpfrgn.cpp.

00150 {
00151     m_pFilter = pFilter;
00152     m_PixelsPerInch = pPlugCaps ? pPlugCaps->GetRasteriseDPI() : 96.0;
00153     m_pTransInfo = pTransInfo;
00154 }

XPFRenderRegion::~XPFRenderRegion  )  [private]
 

Destructor - It will do something if it needs to but at present this function is empty.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Definition at line 169 of file xpfrgn.cpp.

00170 {
00171 }


Member Function Documentation

BOOL XPFRenderRegion::AttachDevice View ,
CNativeDC ,
Spread SpreadToAttach = NULL
[private, virtual]
 

Definition at line 174 of file xpfrgn.cpp.

00176 {
00177     BOOL ok = RenderRegion::AttachDevice(ViewToAttach, DCToAttach, SpreadToAttach);
00178     if (ok)
00179     {
00180         
00181 
00182     }
00183 
00184     return(ok);
00185 }

MILLIPOINT XPFRenderRegion::CalcPixelWidth void   )  [private, virtual]
 

Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 582 of file xpfrgn.cpp.

00583 {
00584     return MILLIPOINT( 72000.0 / m_PixelsPerInch);
00585 }

MILLIPOINT XPFRenderRegion::CalcScaledPixelWidth void   )  [private, virtual]
 

Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 598 of file xpfrgn.cpp.

00599 {
00600     const double dpi = 72000.0 / m_PixelsPerInch;
00601 
00602     return (MILLIPOINT)( (dpi / ScaleFactor.MakeDouble()) + 0.5 );
00603 }

XPFRenderRegion::CC_DECLARE_DYNAMIC XPFRenderRegion   )  [private]
 

virtual BOOL XPFRenderRegion::CheckOffscreenBounds  )  [inline, private, virtual]
 

Reimplemented from RenderRegion.

Definition at line 170 of file xpfrgn.h.

00170 { return(FALSE); }

void XPFRenderRegion::DrawBitmap const DocCoord Point,
UINT32  BitmapID,
UINT32  ToolID = NULL
[private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - the position to draw the bitmap at [INPUTS] BitmapID - The ID of the bitmap to render ToolID - the ID of the tool that the bitmap belongs to

Implements RenderRegion.

Definition at line 367 of file xpfrgn.cpp.

00368 {
00369 }

void XPFRenderRegion::DrawBitmap const DocCoord Point,
KernelBitmap pBitmap
[private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - The position to draw the bitmap at [INPUTS] pBitmap - the bitmap that needs drawing

Implements RenderRegion.

Definition at line 347 of file xpfrgn.cpp.

00348 {
00349 }

void XPFRenderRegion::DrawBitmapBlob const DocCoord Point,
ResourceID  resID
[private, virtual]
 

None - I just had to overide this function as it is pure virtual. Does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - A coord [INPUTS] ResourceID - the ID of a bitmap

Implements RenderRegion.

Definition at line 470 of file xpfrgn.cpp.

00471 {
00472 }

void XPFRenderRegion::DrawBitmapBlob const DocCoord Point,
KernelBitmap BlobShape
[private, virtual]
 

None - I just had to overide this function as it is pure virtual. Does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - A Coord [INPUTS] BlobShape - the bitmap to use

Implements RenderRegion.

Definition at line 453 of file xpfrgn.cpp.

00454 {
00455 }

void XPFRenderRegion::DrawBlob DocCoord  p,
BlobType  type
[private, virtual]
 

None - I just had to overide this function as it is pure virtual. Does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
p - A coord [INPUTS] type - The type of blob

Implements RenderRegion.

Definition at line 418 of file xpfrgn.cpp.

00419 {
00420 }

void XPFRenderRegion::DrawCross const DocCoord Point,
const UINT32  Size
[private, virtual]
 

None - I just had to overide this function as it is pure virtual. Does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - a Coord [INPUTS] Size - the size of the cross

Implements RenderRegion.

Definition at line 435 of file xpfrgn.cpp.

00436 {
00437 }

void XPFRenderRegion::DrawDragRect DocRect RectToRender  )  [private, virtual]
 

None - I just had to overide this function as it is pure virtual. Does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
RectToRender - The Rectangle [INPUTS]

Implements RenderRegion.

Definition at line 401 of file xpfrgn.cpp.

00402 {
00403 }

void XPFRenderRegion::DrawLine const DocCoord StartPoint,
const DocCoord EndPoint
[private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
StartPoint,EndPoint - the coords to draw a line between [INPUTS]

Implements RenderRegion.

Definition at line 312 of file xpfrgn.cpp.

00313 {
00314 }

void XPFRenderRegion::DrawPathToOutputDevice Path pPathToRender,
PathShape  shapePath = PATHSHAPE_PATH
[private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
pPathToRender - The path that we want to try and render [INPUTS]

Implements RenderRegion.

Definition at line 242 of file xpfrgn.cpp.

00243 {
00244     if (m_pTransInfo && m_pTransInfo->IsCommonType())
00245     {
00246         // Path rendering happens in two parts, the fill and the stroke
00247         // so these must be checked separately
00248 
00249         if (pPathToRender->IsFilled)
00250         {
00251             // Get the fill attribute
00252             FillGeometryAttribute* pFillAttr = (FillGeometryAttribute*) CurrentAttrs[ATTR_FILLGEOMETRY].pAttr;
00253             
00254             // If it is not a no-colour flat fill then
00255 
00256             if (!IS_A(pFillAttr, FlatFillAttribute) || !(RR_FILLCOLOUR().IsTransparent()))
00257             {
00258                 // Get the current Transparency Fill Geometry
00259                 TranspFillAttribute* pTransAttr = RR_FILLTRANSP();
00260 
00261                 // And update the common type object
00262                 m_pTransInfo->UpdateCommonType(pTransAttr->GetTranspType());
00263             }
00264         }
00265 
00266         if (pPathToRender->IsStroked)
00267         {
00268             // If the stroke colour is not transparent
00269             if (!(RR_STROKECOLOUR().IsTransparent()))
00270             {
00271                 // Get the current Transparency Fill Geometry
00272                 StrokeTranspAttribute* pTransAttr = RR_STROKETRANSP();
00273 
00274                 // And update the common type object
00275                 m_pTransInfo->UpdateCommonType(pTransAttr->GetTranspType());
00276             }
00277         }
00278     }
00279 }

void XPFRenderRegion::DrawPixel const DocCoord Point  )  [private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
Point - the coord to draw the pixel in [INPUTS]

Implements RenderRegion.

Definition at line 329 of file xpfrgn.cpp.

00330 {
00331 }

void XPFRenderRegion::DrawRect DocRect pRectToRender  )  [private, virtual]
 

There is no actual rendering, as this class does not actually render anything to a device.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Parameters:
pRectToRender - The Rectangle that we need to render [INPUTS]

Implements RenderRegion.

Definition at line 294 of file xpfrgn.cpp.

00295 {
00296 }

BOOL XPFRenderRegion::DrawTransformedBitmap NodeBitmap pNodeBitmap  )  [private, virtual]
 

Works out if it can draw a Transformed bitmap.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/7/95
Parameters:
pNodeBitmap - The bitmap to render [INPUTS]
Returns:
TRUE if it worked, FLASE if not

Reimplemented from RenderRegion.

Definition at line 384 of file xpfrgn.cpp.

00385 {
00386     return TRUE;
00387 }

virtual double XPFRenderRegion::GetPixelsPerInch  )  [inline, private, virtual]
 

Reimplemented from RenderRegion.

Definition at line 167 of file xpfrgn.h.

00167 { return(m_PixelsPerInch); }

void XPFRenderRegion::GetRenderRegionCaps RRCaps pCaps  )  [private, virtual]
 

This function allows render regions to admit to what they can and can not render. This allows other areas of the program to come in and help render regions out in some situations, if they are unable to render everything. eg. an OSRenderRegion can not render transparancy.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
pCaps - The details about what types of thing this render region can render [OUTPUTS]

Reimplemented from RenderRegion.

Definition at line 490 of file xpfrgn.cpp.

00491 {
00492     pCaps->CanDoAll();
00493 }

void XPFRenderRegion::InitAttributes void   )  [private, virtual]
 

Sets up the attributes. Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 522 of file xpfrgn.cpp.

00523 {
00524 }

void XPFRenderRegion::InitClipping void   )  [private, virtual]
 

Sets up the clipping - does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 507 of file xpfrgn.cpp.

00508 {
00509 }

virtual BOOL XPFRenderRegion::RenderPaperAsInk  )  [inline, private, virtual]
 

Reimplemented from RenderRegion.

Definition at line 176 of file xpfrgn.h.

00176 { return(TRUE); }

void XPFRenderRegion::SetLineAttributes void   )  [private, virtual]
 

Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Definition at line 537 of file xpfrgn.cpp.

00538 {
00539 }

void XPFRenderRegion::SetOSDrawingMode void   )  [private, virtual]
 

Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 552 of file xpfrgn.cpp.

00553 {
00554 }

void XPFRenderRegion::SetQualityLevel void   )  [private, virtual]
 

Does nothing in this class.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Reimplemented from RenderRegion.

Definition at line 567 of file xpfrgn.cpp.

00568 {
00569 }

BOOL XPFRenderRegion::StartRender void   )  [private, virtual]
 

Called to start the rendering process. Allows the render region to get ready to start rendering.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95
Returns:
TRUE if everything went OK, FALSE if there was a problem
See also:
XPFRenderRegion::StopRender

Reimplemented from RenderRegion.

Definition at line 202 of file xpfrgn.cpp.

00203 {
00204     // Call base class first
00205     if (!RenderRegion::StartRender())
00206         return FALSE;
00207 
00208     // All worked
00209     return TRUE;
00210 }

BOOL XPFRenderRegion::StopRender void   )  [private, virtual]
 

Called to stop rendering.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/4/95

Implements RenderRegion.

Definition at line 223 of file xpfrgn.cpp.

00224 {
00225     return(TRUE);
00226 }


Member Data Documentation

PluginNativeFilter* XPFRenderRegion::m_pFilter [protected]
 

Reimplemented from RenderRegion.

Definition at line 179 of file xpfrgn.h.

double XPFRenderRegion::m_PixelsPerInch [protected]
 

Definition at line 180 of file xpfrgn.h.

CommonTransInfo* XPFRenderRegion::m_pTransInfo [protected]
 

Definition at line 181 of file xpfrgn.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:03:27 2007 for Camelot by  doxygen 1.4.4