#include <attr.h>
Inheritance diagram for DashRec:
Public Member Functions | |
DashRec () | |
INT32 | operator== (DashRec &) |
Equality operator, checks that the two dash patterns are the same. | |
INT32 | operator== (StockDash) |
Equality operator, checks that the two dash patterns are the same. | |
DashRec & | operator= (DashRec &) |
Equals operator, makes one dash pattern the same as another. | |
DashRec & | operator= (StockDash) |
Equals operator, makes one dash pattern the same as another. | |
INT32 | GetDashID () |
BOOL | ShouldScaleWithLineWidth () |
void | CheckAndFix () |
Checks a dash pattern, and fixes it if it's not very nice. | |
void | CheckIfDefaultPattern () |
Static Public Member Functions | |
static INT32 | GetNumStockDashes () |
static String_256 | GetStockDashName (StockDash) |
Public Attributes | |
INT32 | Elements |
INT32 | DashStart |
DashElement * | ElementData |
INT32 | LineWidth |
BOOL | ScaleWithLineWidth |
INT32 | DashID |
Definition at line 287 of file attr.h.
|
Definition at line 1040 of file attr.cpp. 01041 { 01042 Elements = 0; 01043 DashStart = 0; 01044 ElementData = NULL; 01045 DashID = 0; 01046 ScaleWithLineWidth = TRUE; 01047 01048 LineWidth = 72000/4; 01049 }
|
|
Checks a dash pattern, and fixes it if it's not very nice.
Definition at line 1081 of file attr.cpp. 01082 { 01083 // check the dash offset 01084 if(DashStart < 0) 01085 DashStart = 0; 01086 01087 if(Elements == 0) 01088 return; 01089 01090 // check the dash pattern elements 01091 INT32 End = 0; 01092 INT32 l; 01093 01094 for(l = 0; l < Elements; l++) 01095 { 01096 01097 // is this element OK? 01098 if(ElementData[l] > 0) 01099 { 01100 // element is OK... 01101 if(End != l) 01102 { 01103 // move it back if something has been deleted before it 01104 ElementData[End] = ElementData[l]; 01105 } 01106 End++; 01107 } 01108 } 01109 01110 // have we got enough elements? 01111 if(End < 1) 01112 { 01113 // no elements - make it a solid outline 01114 Elements = 0; 01115 DashID = SD_SOLID; 01116 } 01117 else 01118 { 01119 Elements = End; 01120 } 01121 }
|
|
|
|
Definition at line 302 of file attr.h. 00302 { return DashID; }
|
|
Definition at line 299 of file attr.h. 00299 { return NUM_STOCK_DASHES; }
|
|
Definition at line 1051 of file attr.cpp. 01052 { 01053 String_256 DashName; 01054 01055 switch (DashType) 01056 { 01057 case SD_SOLID: 01058 DashName.Load(_R(IDS_K_ATTR_SOLIDLINE)); 01059 break; 01060 01061 default: 01062 DashName.Load(_R(IDS_K_ATTR_DASHLINE)); 01063 break; 01064 } 01065 01066 return DashName; 01067 }
|
|
Equals operator, makes one dash pattern the same as another.
Definition at line 1501 of file attr.cpp.
|
|
Equals operator, makes one dash pattern the same as another.
Definition at line 1444 of file attr.cpp. 01445 { 01446 DashID = Other.DashID; 01447 Elements = Other.Elements; 01448 01449 if (Elements == 0) 01450 return *this; 01451 01452 DashStart = Other.DashStart; 01453 LineWidth = Other.LineWidth; 01454 ScaleWithLineWidth = Other.ScaleWithLineWidth; 01455 01456 if (ElementData != NULL) 01457 delete ElementData; 01458 01459 ElementData = new INT32[Elements]; 01460 01461 if (ElementData == NULL) 01462 return *this; 01463 01464 for (INT32 element = 0; element < Elements; element++) 01465 { 01466 ElementData[element] = Other.ElementData[element]; 01467 } 01468 01469 return *this; 01470 }
|
|
Equality operator, checks that the two dash patterns are the same.
Definition at line 1484 of file attr.cpp. 01485 { 01486 return DashID == Other; 01487 }
|
|
Equality operator, checks that the two dash patterns are the same.
Definition at line 1409 of file attr.cpp. 01410 { 01411 if (Elements == 0 && Other.Elements == 0) 01412 return TRUE; 01413 01414 if (Elements != Other.Elements || 01415 DashStart != Other.DashStart) 01416 return FALSE; 01417 01418 if (LineWidth != Other.LineWidth) 01419 return FALSE; 01420 01421 // They both have the same number of elements and the same dash start 01422 // But are all the elements the same ? 01423 for (INT32 element = 0; element < Elements; element++) 01424 { 01425 if (ElementData[element] != Other.ElementData[element]) 01426 return FALSE; 01427 } 01428 01429 return TRUE; 01430 }
|
|
Definition at line 303 of file attr.h. 00303 { return ScaleWithLineWidth; }
|
|
|
|
|
|
|
|
|
|
|
|
|