MouldGeometry Class Reference

An abstract base class for mould shapes. More...

#include <moldshap.h>

Inheritance diagram for MouldGeometry:

CCObject SimpleCCObject MouldEnvelopeBase MouldPerspective MouldEnvelope MouldEnvelope2x2 List of all members.

Public Member Functions

 MouldGeometry ()
 Construct a mould geometry.
virtual BOOL Validate (Path *const pPath, UINT32 &errorID)
virtual BOOL Define (Path *const pPath, DocRect *const pRect)
virtual MouldSpace Describe ()
virtual BOOL MakeValidFrom (Path **Out, Path *In, INT32 *CornersHint=0)
virtual BOOL MouldPathToPath (Path *pSourcePath, Path *PDestinPath)
virtual BOOL MouldBitmapToTile (KernelBitmap *pSourceBlit, KernelBitmap *pDestinBlit)
virtual BOOL MouldPoint (DocCoord p, DocCoord &q)
virtual void MouldPathRender (Path *pPath, RenderRegion *pRegion)
 This function renders a path directly. It uses the current setup manifold and generates a temporary render path.
virtual void MouldBitmapRender (KernelBitmap *pBlit, DocCoord *pParallel, RenderRegion *pRegion)
virtual void RenderControlBlobs (RenderRegion *pRegion)
virtual void RenderDragBlobs (Spread *pSpread)
virtual void DisableControlBlobs ()
virtual void EnableControlBlobs ()
virtual void ToggleControlBlobs (Spread *pSpread)
virtual DocRect GetBlobBoundingRect ()
virtual void GetDebugDetails (StringBase *)
virtual DocRect GetSourceRect ()
virtual BOOL OnClick (DocCoord, ClickType, ClickModifiers, Spread *, NodeMould *)
virtual BOOL OnMouseMove (DocCoord, Spread *, ClickModifiers, INT32 *, INT32 *)
virtual void Transform (Path *const pNewPath, DocRect *const pRect, TransformBase &Trans)
virtual MouldGeometryMakeCopy ()
 Make a copy of this mould geometry object and return it.
virtual ChangeCode RecordContext (UndoableOperation *)
virtual ChangeCode RecordBlobs (UndoableOperation *, Spread *)
virtual UINT32 GetByteSize () const
virtual void SetThreshold (const INT32 t)
 Set the threshold value for this mould object. Thresholds should be in the range 1..4095 inclusive.
INT32 GetThreshold () const

Protected Member Functions

BOOL CopyContents (MouldGeometry *pGeom)
 Make a copy of this mouldgeometry classes private data.
DocRect ConvRectToDocRect (RECT &rect0)
RECT ConvDocRectToRect (DocRect &rect0)

Protected Attributes

INT32 MouldThreshold

Private Member Functions

 CC_DECLARE_DYNAMIC (MouldGeometry)

Detailed Description

An abstract base class for mould shapes.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/10/94

Definition at line 130 of file moldshap.h.


Constructor & Destructor Documentation

MouldGeometry::MouldGeometry  ) 
 

Construct a mould geometry.

MouldGeometry::MouldGeometry()

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/02/94
Parameters:
[INPUTS] 

Definition at line 129 of file moldshap.cpp.

00130 {
00131     MouldThreshold = 32;
00132 }


Member Function Documentation

MouldGeometry::CC_DECLARE_DYNAMIC MouldGeometry   )  [private]
 

RECT MouldGeometry::ConvDocRectToRect DocRect rect0  )  [protected]
 

Definition at line 331 of file moldshap.cpp.

00332 {
00333     RECT rect1;
00334     rect1.left  = rect0.lo.x;
00335     rect1.bottom= rect0.lo.y;
00336     rect1.right = rect0.hi.x;
00337     rect1.top   = rect0.hi.y;
00338     return rect1;
00339 }

DocRect MouldGeometry::ConvRectToDocRect RECT rect0  )  [protected]
 

Definition at line 320 of file moldshap.cpp.

00321 {
00322     DocRect rect1;
00323     rect1.lo.x = rect0.left;
00324     rect1.lo.y = rect0.bottom;
00325     rect1.hi.x = rect0.right;
00326     rect1.hi.y = rect0.top;
00327     return rect1;
00328 }

BOOL MouldGeometry::CopyContents MouldGeometry pGeometry  )  [protected]
 

Make a copy of this mouldgeometry classes private data.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/12/93
Parameters:
pGeometry = a pointer to copy of this geometry data. [INPUTS]
[OUTPUTS] 
Returns:
TRUE if the data has been copied correctly FALSE if failed

Definition at line 245 of file moldshap.cpp.

00246 {
00247     ERROR3IF(pGeometry==NULL, "MouldGeometry::CopyContents() passed a null pointer");
00248         
00249     // copy all our locals here
00250     pGeometry->MouldThreshold = MouldThreshold;
00251 
00252     return TRUE;
00253 }

virtual BOOL MouldGeometry::Define Path *const   pPath,
DocRect *const   pRect
[inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 139 of file moldshap.h.

00139 {return FALSE;}

virtual MouldSpace MouldGeometry::Describe  )  [inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 140 of file moldshap.h.

00140 {return MOULDSPACE_UNDEFINED;}

virtual void MouldGeometry::DisableControlBlobs  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 155 of file moldshap.h.

00155 {};

virtual void MouldGeometry::EnableControlBlobs  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 156 of file moldshap.h.

00156 {};

virtual DocRect MouldGeometry::GetBlobBoundingRect  )  [inline, virtual]
 

Reimplemented in MouldPerspective.

Definition at line 160 of file moldshap.h.

00160 { return DocRect(0,0,0,0); };

virtual UINT32 MouldGeometry::GetByteSize  )  const [inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 171 of file moldshap.h.

00171 { return sizeof(MouldGeometry); };

virtual void MouldGeometry::GetDebugDetails StringBase  )  [inline, virtual]
 

Definition at line 161 of file moldshap.h.

00161 {};

virtual DocRect MouldGeometry::GetSourceRect  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 162 of file moldshap.h.

00162 { return DocRect(0,0,0,0);};

INT32 MouldGeometry::GetThreshold  )  const [inline]
 

Definition at line 174 of file moldshap.h.

00174 { return MouldThreshold; }

MouldGeometry * MouldGeometry::MakeCopy  )  [virtual]
 

Make a copy of this mould geometry object and return it.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/12/93
Parameters:
- [INPUTS]
a pointer to a new mould geometry object. [OUTPUTS] NULL if unable to create the object.

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 213 of file moldshap.cpp.

00214 {
00215     // create a new Geometry
00216     MouldGeometry* pGeometry = new MouldGeometry;
00217     if (pGeometry == NULL)
00218         return NULL;
00219 
00220     BOOL ok = CopyContents(pGeometry);
00221     if (!ok)
00222     {
00223         delete pGeometry;
00224         return NULL;
00225     }
00226 
00227     return (pGeometry);
00228 }

virtual BOOL MouldGeometry::MakeValidFrom Path **  Out,
Path In,
INT32 *  CornersHint = 0
[inline, virtual]
 

Reimplemented in MouldEnvelope, and MouldEnvelope2x2.

Definition at line 141 of file moldshap.h.

00141 {return FALSE;}

void MouldGeometry::MouldBitmapRender KernelBitmap pBlit,
DocCoord pParallel,
RenderRegion pRegion
[virtual]
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/93
Parameters:
pBlit = pointer to a bitmap [INPUTS] pParallel = pointer to a parallelogram pRegion = pointer to a region to render into

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 192 of file moldshap.cpp.

00195 {
00196 }

virtual BOOL MouldGeometry::MouldBitmapToTile KernelBitmap pSourceBlit,
KernelBitmap pDestinBlit
[inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 145 of file moldshap.h.

00145 {return FALSE;};

void MouldGeometry::MouldPathRender Path pPath,
RenderRegion pRegion
[virtual]
 

This function renders a path directly. It uses the current setup manifold and generates a temporary render path.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
pPath = pointer to a path to mould [INPUTS] pRegion = pointer to a region to render into

Reimplemented in MouldPerspective.

Definition at line 166 of file moldshap.cpp.

00167 {
00168     Path RenderPath;
00169     if (!(RenderPath.Initialise(12,12))) return;
00170     if (!MouldPathToPath(pPath,&RenderPath)) return;
00171 
00172     pRegion->DrawPath(&RenderPath);
00173 }

virtual BOOL MouldGeometry::MouldPathToPath Path pSourcePath,
Path PDestinPath
[inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 144 of file moldshap.h.

00144 {return FALSE;};

virtual BOOL MouldGeometry::MouldPoint DocCoord  p,
DocCoord q
[inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 146 of file moldshap.h.

00146 { q=p; return FALSE; }

BOOL MouldGeometry::OnClick DocCoord  Coord,
ClickType  CType,
ClickModifiers  Mods,
Spread pSpread,
NodeMould pNodeMould
[virtual]
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/93
Parameters:
Coord = coordinate of mouse [INPUTS] CType = the type of click (single, double, drag) Mods = the click modifiers pSpread = a pointer to the spread the click occured over pNodeMould = a pointer to the parent mould object

Reimplemented in MouldPerspective.

Definition at line 278 of file moldshap.cpp.

00283 {
00284     // do nothing at the moment.
00285     return FALSE;
00286 }

BOOL MouldGeometry::OnMouseMove DocCoord  Coord,
Spread pSpread,
ClickModifiers  Mods,
INT32 *  ctype,
INT32 *  msgres
[virtual]
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/93
Parameters:
Coord = coordinate of mouse [INPUTS] Mods = the click modifiers pSpread = a pointer to the spread the click occured over
Returns:
ctype = the tool cursor type to use over this point msgres = the message resource type to use over this point

Reimplemented in MouldPerspective.

Definition at line 309 of file moldshap.cpp.

00314 {
00315     // do nothing at the moment.
00316     return FALSE;
00317 }

virtual ChangeCode MouldGeometry::RecordBlobs UndoableOperation ,
Spread
[inline, virtual]
 

Reimplemented in MouldPerspective.

Definition at line 170 of file moldshap.h.

00170 {return CC_OK;}

virtual ChangeCode MouldGeometry::RecordContext UndoableOperation  )  [inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 169 of file moldshap.h.

00169 {return CC_OK;}

virtual void MouldGeometry::RenderControlBlobs RenderRegion pRegion  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 153 of file moldshap.h.

00153 {};

virtual void MouldGeometry::RenderDragBlobs Spread pSpread  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 154 of file moldshap.h.

00154 {};

void MouldGeometry::SetThreshold const INT32  t  )  [virtual]
 

Set the threshold value for this mould object. Thresholds should be in the range 1..4095 inclusive.

MouldGeometry::SetThreshold(const INT32 t)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/02/94
Parameters:
[INPUTS] 

Definition at line 147 of file moldshap.cpp.

00148 {
00149     if (t>0 && t<4096)
00150         MouldThreshold=t;
00151 }

virtual void MouldGeometry::ToggleControlBlobs Spread pSpread  )  [inline, virtual]
 

Reimplemented in MouldEnvelopeBase, and MouldPerspective.

Definition at line 157 of file moldshap.h.

00157 {};

virtual void MouldGeometry::Transform Path *const   pNewPath,
DocRect *const   pRect,
TransformBase Trans
[inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 167 of file moldshap.h.

00167 {};

virtual BOOL MouldGeometry::Validate Path *const   pPath,
UINT32 errorID
[inline, virtual]
 

Reimplemented in MouldEnvelope, MouldEnvelope2x2, and MouldPerspective.

Definition at line 138 of file moldshap.h.

00138 {return FALSE;}


Member Data Documentation

INT32 MouldGeometry::MouldThreshold [protected]
 

Definition at line 182 of file moldshap.h.


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