CMXReferPen Class Reference

#include <cmxexdc.h>

Inheritance diagram for CMXReferPen:

CMXReferListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CMXReferPen (CMXExportDC *pDC)
BOOL SetWidth (MILLIPOINT TWidth)
BOOL AreYouThisWidth (MILLIPOINT CompareWidth)
INT32 IsInWhichDesc (void)
BOOL WriteInDesc (CMXExportDC *pDC)
 writes the description record for pens

Protected Attributes

MILLIPOINT Width

Private Member Functions

 CC_DECLARE_DYNAMIC (CMXReferPen)

Detailed Description

Definition at line 569 of file cmxexdc.h.


Constructor & Destructor Documentation

CMXReferPen::CMXReferPen CMXExportDC pDC  )  [inline]
 

Definition at line 574 of file cmxexdc.h.

00574 : CMXReferListItem(pDC) {Width = -1;};


Member Function Documentation

BOOL CMXReferPen::AreYouThisWidth MILLIPOINT  CompareWidth  )  [inline]
 

Definition at line 578 of file cmxexdc.h.

00578 {return (CompareWidth == Width)?TRUE:FALSE;};

CMXReferPen::CC_DECLARE_DYNAMIC CMXReferPen   )  [private]
 

INT32 CMXReferPen::IsInWhichDesc void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 580 of file cmxexdc.h.

00580 {return cmxDESC_PEN;};

BOOL CMXReferPen::SetWidth MILLIPOINT  TWidth  )  [inline]
 

Definition at line 576 of file cmxexdc.h.

00576                                      {ERROR2IF(Width != -1, FALSE, "width already set");
00577                                         Width = TWidth; return TRUE;};

BOOL CMXReferPen::WriteInDesc CMXExportDC pDC  )  [virtual]
 

writes the description record for pens

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
05/07/96
Parameters:
DC [INPUTS]
Returns:
success

Reimplemented from CMXReferListItem.

Definition at line 1323 of file cmxdcobj.cpp.

01324 {
01325     if(pDC->IsThirtyTwoBit())
01326     {
01327         // write the 32 bit description
01328         if(!pDC->StartTag(cmxTAG_DescrSection_Pen))
01329             return FALSE;
01330 
01331         cmxPen32 pen;
01332 
01333         double scaledwidth = ((double)Width) * CAMCOORD_SCALEFACTOR32;
01334         pen.Width = (DWORD)scaledwidth;
01335         pen.Aspect = 100;       // width is 100% of the height
01336         pen.Angle = 0;
01337         pDC->WriteData(&pen, sizeof(pen));
01338 
01339         // write a matrix (use identity)
01340         if(!pDC->WriteMatrix())
01341             return FALSE;
01342 
01343         // end the tag
01344         if(!pDC->EndTag()
01345             || !pDC->WriteMinEndTag())
01346             return FALSE;
01347     }
01348     else
01349     {
01350         cmxPen16 pen;
01351 
01352         double scaledwidth = ((double)Width) * pDC->GetScaleFactor();
01353         pen.Width = (WORD)scaledwidth;
01354         pen.Aspect = 100;       // width is 100% of the height
01355         pen.Angle = 0;
01356         pDC->WriteData(&pen, sizeof(pen));
01357 
01358         // write a matrix (use identity)
01359         if(!pDC->WriteMatrix())
01360             return FALSE;
01361     }
01362 
01363     return TRUE;
01364 }


Member Data Documentation

MILLIPOINT CMXReferPen::Width [protected]
 

Definition at line 584 of file cmxexdc.h.


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