#include <cmxexdc.h>
Inheritance diagram for CMXReferPen:
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) |
Definition at line 569 of file cmxexdc.h.
|
Definition at line 574 of file cmxexdc.h. 00574 : CMXReferListItem(pDC) {Width = -1;};
|
|
Definition at line 578 of file cmxexdc.h.
|
|
|
|
Reimplemented from CMXReferListItem. Definition at line 580 of file cmxexdc.h. 00580 {return cmxDESC_PEN;};
|
|
Definition at line 576 of file cmxexdc.h.
|
|
writes the description record for pens
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 }
|
|
|