00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182 #ifndef INC_MI32_ELEMSTYL_H
00183 #define INC_MI32_ELEMSTYL_H
00184
00185 #ifndef INC_MI32_STDDEFNS_H
00186 #include <mi32/stddefns.h>
00187 #endif
00188
00189 #ifndef INC_MI32_COLOR_H
00190 #include <mi32/color.h>
00191 #endif
00192
00193 #ifndef INC_STRING_H
00194 #include <string.h>
00195 #define INC_STRING_H
00196 #endif
00197
00198 #ifndef INC_STDLIB_H
00199 #include <stdlib.h>
00200 #define INC_STDLIB_H
00201 #endif
00202
00203 #ifndef INC_MI32_COMPAT_H
00204 #include <mi32/compat.h>
00205 #endif
00206
00207 #ifndef INC_MI32_FIXEDSTR_H
00208 #include <mi32/fixedstr.h>
00209 #endif
00210
00211
00212 namespace MGD {
00213 class DEVICE;
00214 }
00215
00216 #define STYLEFLAG_Fill (0x00000001)
00217 #define STYLEFLAG_ScaleToMap (0x00000002)
00218 #define STYLEFLAG_UseSymbol (0x00000004)
00219 #define STYLEFLAG_UseLinePatt (0x00000008)
00220 #define STYLEFLAG_UseBitmapPatt (0x00000010)
00221 #define STYLEFLAG_UseHatchPatt (0x00000020)
00222 #define STYLEFLAG_DrawPolyBorder (0x00000040)
00223 #define STYLEFLAG_BorderBitmapPatt (0x00000080)
00224 #define STYLEFLAG_LineJoinBevel (0x00000100)
00225 #define STYLEFLAG_LineJoinMiter (0x00000200)
00226 #define STYLEFLAG_LineJoinRound (0x00000300)
00227 #define STYLEFLAG_PointSymbolBuiltIn (0x00000400)
00228 #define STYLEFLAG_LinePatternBuiltIn (0x00000400)
00229 #define STYLEFLAG_PolyFillPattBuiltIn (0x00000400)
00230 #define STYLEFLAG_PolyBorderPattBuiltIn (0x00000800)
00231 #define STYLEFLAG_TextHTML (0x00002000)
00232 #define STYLEFLAG_TextJustifyLeft (0x00000000)
00233 #define STYLEFLAG_TextJustifyRight (0x00004000)
00234 #define STYLEFLAG_TextJustifyCenter (0x00008000)
00235 #define STYLEFLAG_TextJustifyBoth (0x0000C000)
00236 #define STYLEFLAG_TextCenterVert (0x00010000)
00237 #define STYLEFLAG_TextAboveBaseline (0x00020000)
00238 #define STYLEFLAG_TextBelowBaseline (0x00040000)
00239 #define STYLEFLAG_TextMirrorHorz (0x00080000)
00240 #define STYLEFLAG_TextMirrorVert (0x00100000)
00241 #define STYLEFLAG_TextOrientOutput (0x00200000)
00242 #define STYLEFLAG_TextUseStyleHeight (0x00400000)
00243 #define STYLEFLAG_UseLayoutScale (0x00800000)
00244 #define STYLEFLAG_PointDrawCircle (0x01000000)
00245 #define STYLEFLAG_CenterSymbol (0x02000000)
00246 #define STYLEFLAG_PointNoSymbol (0x04000000)
00247 #define STYLEFLAG_BlockInsert (0x08000000)
00248 #define STYLEFLAG_WordWrap (0x10000000)
00249 #define STYLEFLAG_ScaleIsPatternZoom (0x20000000)
00250
00251 #define STYLEFLAGMASK_LineJoin (0x00000300)
00252 #define STYLEFLAGMASK_Patt (STYLEFLAG_UseSymbol | STYLEFLAG_UseLinePatt | STYLEFLAG_UseBitmapPatt | STYLEFLAG_UseHatchPatt | STYLEFLAG_BorderBitmapPatt)
00253 #define STYLEFLAGMASK_PattPlus (STYLEFLAGMASK_Patt | STYLEFLAG_Fill | STYLEFLAG_PointDrawCircle | STYLEFLAG_DrawPolyBorder | STYLEFLAG_PointSymbolBuiltIn | STYLEFLAG_PolyBorderPattBuiltIn)
00254 #define STYLEFLAGMASK_Scale (STYLEFLAG_ScaleToMap | STYLEFLAG_UseLayoutScale)
00255 #define STYLEFLAGMASK_Point (STYLEFLAG_UseSymbol | STYLEFLAG_UseBitmapPatt | STYLEFLAG_Fill | STYLEFLAG_PointDrawCircle | STYLEFLAG_PointNoSymbol | STYLEFLAG_PointSymbolBuiltIn)
00256 #define STYLEFLAGMASK_Line (STYLEFLAG_UseLinePatt | STYLEFLAG_UseBitmapPatt)
00257 #define STYLEFLAGMASK_PolyFill (STYLEFLAG_UseBitmapPatt | STYLEFLAG_UseHatchPatt | STYLEFLAG_Fill)
00258 #define STYLEFLAGMASK_PolyBord (STYLEFLAG_UseLinePatt | STYLEFLAG_BorderBitmapPatt | STYLEFLAG_DrawPolyBorder)
00259 #define STYLEFLAGMASK_Poly (STYLEFLAGMASK_PolyFill | STYLEFLAGMASK_PolyBord)
00260 #define STYLEFLAGMASK_TextVertAlign (STYLEFLAG_TextAboveBaseline | STYLEFLAG_TextCenterVert | STYLEFLAG_TextBelowBaseline)
00261 #define STYLEFLAGMASK_TextJustify (STYLEFLAG_TextJustifyRight|STYLEFLAG_TextJustifyCenter)
00262
00263
00264 #define STYLEFLAG_TextJustifyMask STYLEFLAGMASK_TextJustify
00265 #define STYLEFLAG_LineJoinMask STYLEFLAGMASK_LineJoin
00266
00267
00268
00269
00270
00271
00272
00273
00274 struct POINTSTYLE {
00275
00276 UINT32 StyleFlags;
00277 INT32 SymbolNum;
00278 double ScaleX;
00279 double ScaleY;
00280 double Angle;
00281 COLOR DrawColor;
00282 double MapScale;
00283 UINT8 spare[4];
00284 char *Desc;
00285
00286
00287 POINTSTYLE (
00288 ) {
00289 memset(static_cast<void*>(this),0,sizeof(*this));
00290 }
00291
00292
00293 POINTSTYLE (
00294 const POINTSTYLE& rhs
00295 ): Desc(0) {
00296 Copy(rhs);
00297 }
00298
00299
00300 ~POINTSTYLE (
00301 ) {
00302 if (Desc) free(Desc);
00303 }
00304
00305
00306 POINTSTYLE& operator= (
00307 const POINTSTYLE& rhs
00308 ) {
00309 if (this != &rhs) {
00310 Copy(rhs);
00311 }
00312 return (*this);
00313 }
00314
00315
00316 bool operator== (
00317 const POINTSTYLE& rhs
00318 ) const {
00319 if (StyleFlags != rhs.StyleFlags || SymbolNum != rhs.SymbolNum || ScaleX != rhs.ScaleX || ScaleY != rhs.ScaleY || Angle != rhs.Angle || DrawColor != rhs.DrawColor || MapScale != rhs.MapScale) return (false);
00320 if (Desc == rhs.Desc) return (true);
00321 if (Desc == 0 || rhs.Desc == 0) return (false);
00322 return (!strcmp(Desc,rhs.Desc));
00323 }
00324
00325
00326 bool operator!= (
00327 const POINTSTYLE& rhs
00328 ) const {
00329 return (!(*this == rhs));
00330 }
00331
00332
00333 void Clear (
00334 ) {
00335 if (Desc != 0) free(Desc);
00336 memset(static_cast<void*>(this), 0, sizeof(*this));
00337 }
00338
00339
00340 void Copy (
00341 const POINTSTYLE& rhs
00342 ) {
00343 if (Desc != 0) free(Desc);
00344 memcpy(static_cast<void*>(this), static_cast<const void*>(&rhs), sizeof(*this));
00345 Desc = 0;
00346 if (rhs.Desc) {
00347 Desc = strdup(rhs.Desc);
00348 }
00349 return;
00350 }
00351
00352
00353
00354
00355 bool UsesTransparency (
00356 ) const {
00357 if (DrawColor.GetTransparency() != 0) return (true);
00358
00359 return (false);
00360 }
00361 };
00362
00363
00364 struct POLYSTYLE {
00365
00366 UINT32 StyleFlags;
00367 INT32 FillPatternNum;
00368 INT32 BorderPatternNum;
00369 double BorderScale;
00370 double MapScale;
00371 COLOR BorderColor;
00372 COLOR FillColor;
00373 double Angle;
00374 char *FillDesc;
00375 char *LineDesc;
00376
00377
00378 POLYSTYLE (
00379 ) { memset(static_cast<void*>(this),0,sizeof(*this)); }
00380
00381
00382 POLYSTYLE (
00383 const POLYSTYLE& rhs
00384 ): FillDesc(0), LineDesc(0) { Copy(rhs); }
00385
00386
00387 ~POLYSTYLE (
00388 ) { if (FillDesc) free(FillDesc); if (LineDesc) free(LineDesc); }
00389
00390
00391 POLYSTYLE& operator= (
00392 const POLYSTYLE& rhs
00393 ) { if (this != &rhs) { Copy(rhs); } return (*this); }
00394
00395
00396 bool operator== (
00397 const POLYSTYLE& rhs
00398 ) const {
00399 if (StyleFlags != rhs.StyleFlags || FillPatternNum != rhs.FillPatternNum || BorderPatternNum != rhs.BorderPatternNum || BorderScale != rhs.BorderScale || MapScale != rhs.MapScale || BorderColor != rhs.BorderColor || FillColor != rhs.FillColor) return (false);
00400 if (FillDesc != rhs.FillDesc) {
00401 if (FillDesc == 0 || rhs.FillDesc == 0) return (false);
00402 if (strcmp(FillDesc,rhs.FillDesc) != 0) return (false);
00403 }
00404 if (LineDesc != rhs.LineDesc) {
00405 if (LineDesc == 0 || rhs.LineDesc == 0) return (false);
00406 if (strcmp(LineDesc,rhs.LineDesc) != 0) return (false);
00407 }
00408 return (true);
00409 }
00410
00411
00412 bool operator!= (
00413 const POLYSTYLE& rhs
00414 ) const { return (!(*this == rhs)); }
00415
00416
00417 void Clear (
00418 ) {
00419 if (FillDesc != 0) free(FillDesc);
00420 if (LineDesc != 0) free(LineDesc);
00421 memset(static_cast<void*>(this), 0, sizeof(*this));
00422 }
00423
00424
00425 void Copy (
00426 const POLYSTYLE& rhs
00427 ) {
00428 if (FillDesc != 0) free(FillDesc);
00429 if (LineDesc != 0) free(LineDesc);
00430 memcpy(static_cast<void*>(this), static_cast<const void*>(&rhs), sizeof(*this));
00431 FillDesc = 0;
00432 LineDesc = 0;
00433 if (rhs.FillDesc) {
00434 FillDesc = strdup(rhs.FillDesc);
00435 }
00436 if (rhs.LineDesc) {
00437 LineDesc = strdup(rhs.LineDesc);
00438 }
00439 return;
00440 }
00441
00442
00443
00444
00445 bool UsesTransparency (
00446 ) const {
00447 if ((StyleFlags & STYLEFLAG_Fill) && FillColor.GetTransparency() != 0) return (true);
00448 if ((StyleFlags & STYLEFLAG_DrawPolyBorder) && BorderColor.GetTransparency() != 0) return (true);
00449 return (false);
00450 }
00451 };
00452
00453
00454 struct LINESTYLE {
00455
00456 UINT32 StyleFlags;
00457 INT32 PatternNum;
00458 double Scale;
00459 COLOR DrawColor;
00460 double MapScale;
00461 UINT8 spare[4];
00462 char *Desc;
00463
00464
00465 LINESTYLE (
00466 ) { memset(static_cast<void*>(this),0,sizeof(*this)); }
00467
00468
00469 LINESTYLE (
00470 const LINESTYLE& rhs
00471 ): Desc(0) { Copy(rhs); }
00472
00473
00474 ~LINESTYLE (
00475 ) { if (Desc) free(Desc); }
00476
00477
00478 LINESTYLE& operator= (
00479 const LINESTYLE& rhs
00480 ) { if (this != &rhs) { Copy(rhs); } return (*this); }
00481
00482
00483 LINESTYLE& operator= (
00484 const POLYSTYLE& rhs
00485 ) {
00486 Clear();
00487 StyleFlags = (rhs.StyleFlags & (STYLEFLAG_ScaleToMap | STYLEFLAG_UseLayoutScale | STYLEFLAG_UseLinePatt));
00488 if (rhs.StyleFlags & STYLEFLAG_BorderBitmapPatt) StyleFlags |= STYLEFLAG_UseBitmapPatt;
00489 PatternNum = rhs.BorderPatternNum;
00490 Scale = rhs.BorderScale;
00491 DrawColor = rhs.BorderColor;
00492 MapScale = rhs.MapScale;
00493 if (rhs.LineDesc != 0) Desc = strdup(rhs.LineDesc);
00494 return (*this);
00495 }
00496
00497
00498 bool operator== (
00499 const LINESTYLE& rhs
00500 ) const {
00501 if (StyleFlags != rhs.StyleFlags || PatternNum != rhs.PatternNum || Scale != rhs.Scale || DrawColor != rhs.DrawColor || MapScale != rhs.MapScale) return (false);
00502 if (Desc == rhs.Desc) return (true);
00503 if (Desc == 0 || rhs.Desc == 0) return (false);
00504 return (!strcmp(Desc,rhs.Desc));
00505 }
00506
00507
00508 bool operator!= (
00509 const LINESTYLE& rhs
00510 ) const { return (!(*this == rhs)); }
00511
00512
00513 void Clear (
00514 ) {
00515 if (Desc != 0) free(Desc);
00516 memset(static_cast<void*>(this), 0, sizeof(*this));
00517 }
00518
00519
00520 void Copy (
00521 const LINESTYLE& rhs
00522 ) {
00523 if (Desc != 0) free(Desc);
00524 memcpy(static_cast<void*>(this), static_cast<const void*>(&rhs), sizeof(*this));
00525 Desc = 0;
00526 if (rhs.Desc) {
00527 Desc = strdup(rhs.Desc);
00528 }
00529 return;
00530 }
00531
00532
00533
00534
00535 bool UsesTransparency (
00536 ) const {
00537 if (DrawColor.GetTransparency() != 0) return (true);
00538
00539 return (false);
00540 }
00541 };
00542
00543
00544 #define FONTSTYLE_Normal (0x00000000)
00545 #define FONTSTYLE_Bold (0x00000001)
00546 #define FONTSTYLE_Italic (0x00000002)
00547 #define FONTSTYLE_Shadow (0x00000004)
00548 #define FONTSTYLE_Enhanced (0x00000008)
00549 #define FONTSTYLE_Outline (0x00000010)
00550 #define FONTSTYLE_Underline (0x00000020)
00551 #define FONTSTYLE_Boxed (0x00000040)
00552 #define FONTSTYLE_InvertGlyph (0x00000080)
00553 #define FONTSTYLE_Smooth (0x00000100)
00554 #define FONTSTYLE_RoundWidth (0x00000200)
00555 #define FONTSTYLE_Kerning (0x00000400)
00556 #define FONTSTYLE_InvertCRS (0x00000800)
00557
00558 struct TEXTSTYLE {
00559 UINT32 StyleFlags;
00560 INT32 FontNumber;
00561 COLOR FGColor;
00562 COLOR BGColor;
00563 FLOAT GlyphRotation;
00564 FLOAT GlyphAspect;
00565 FLOAT Shear;
00566 FLOAT Height;
00567 FLOAT LineSpace;
00568 UINT32 FontFlags;
00569 double MapScale;
00570 MISTRING fontname;
00571 UINT16 HeightUnits;
00572 UINT16 SpaceUnits;
00573 UINT16 Predefined;
00574 UINT16 StructSize;
00575 double Width;
00576 double StrokeWidth;
00577 double EnhanceWidth;
00578 double BoldnessWidth;
00579 double UnderlineWidth;
00580 double UnderlineOffset;
00581 double ShadowOffset;
00582 double ShadowAngle;
00583 double ClipWidth;
00584 bool ShadowRelative;
00585 bool m_bInitialized;
00586 UINT16 WidthUnits;
00587
00588
00589 TEXTSTYLE (
00590 ) :
00591 StyleFlags(STYLEFLAG_UseLayoutScale),
00592 FontNumber(0),
00593 GlyphRotation(0.0F),
00594 Height(0.0F),
00595 LineSpace(0.0F),
00596 FontFlags(0),
00597 HeightUnits(0),
00598 SpaceUnits(0),
00599 Predefined(0),
00600 StructSize(sizeof(TEXTSTYLE)),
00601 StrokeWidth(0.0),
00602 EnhanceWidth(0.15),
00603 BoldnessWidth(0.03),
00604 UnderlineWidth(0.0),
00605 UnderlineOffset(0.0),
00606 ShadowOffset(0.1),
00607 ShadowAngle(-PI/4.0),
00608 GlyphAspect(1.0),
00609 Shear(static_cast<float>(20.0 * DEGTORAD)),
00610 ClipWidth(0.2),
00611 MapScale(1.0),
00612 WidthUnits(0),
00613 Width(0.0),
00614 ShadowRelative(false),
00615 m_bInitialized(true)
00616 {
00617 }
00618
00619
00620 TEXTSTYLE(const TEXTSTYLE& rhs) {
00621 Copy(rhs);
00622 }
00623
00624
00625 ~TEXTSTYLE (
00626 ) {}
00627
00628
00629 TEXTSTYLE& operator= (
00630 const TEXTSTYLE& rhs
00631 ) {
00632 if (this != &rhs) {
00633 Copy(rhs);
00634 }
00635 return (*this);
00636 }
00637
00638
00639
00640 bool operator== (
00641 const TEXTSTYLE& rhs
00642 ) const {
00643 return (StyleFlags == rhs.StyleFlags
00644 && FontNumber == rhs.FontNumber
00645 && FGColor == rhs.FGColor
00646 && BGColor == rhs.BGColor
00647 && GlyphRotation == rhs.GlyphRotation
00648 && GlyphAspect == rhs.GlyphAspect
00649 && Shear == rhs.Shear
00650 && Height == rhs.Height
00651 && LineSpace == rhs.LineSpace
00652 && FontFlags == rhs.FontFlags
00653 && MapScale == rhs.MapScale
00654 && fontname == rhs.fontname
00655 && HeightUnits == rhs.HeightUnits
00656 && SpaceUnits == rhs.SpaceUnits
00657 && Predefined == rhs.Predefined
00658 && Width == rhs.Width
00659 && StrokeWidth == rhs.StrokeWidth
00660 && EnhanceWidth == rhs.EnhanceWidth
00661 && BoldnessWidth == rhs.BoldnessWidth
00662 && UnderlineWidth == rhs.UnderlineWidth
00663 && UnderlineOffset == rhs.UnderlineOffset
00664 && ShadowOffset == rhs.ShadowOffset
00665 && ShadowAngle == rhs.ShadowAngle
00666 && ClipWidth == rhs.ClipWidth
00667 && ShadowRelative == rhs.ShadowRelative
00668 && WidthUnits == rhs.WidthUnits);
00669 }
00670
00671
00672 bool operator!= (
00673 const TEXTSTYLE& rhs
00674 ) const {
00675 return (!(*this == rhs));
00676 }
00677
00678
00679
00680
00681
00682 bool UsesTransparency (
00683 const MGD::DEVICE *pDevice = 0
00684 ) const;
00685
00686
00687 bool UsesAntialiasing (
00688 ) const {
00689 return ((FontFlags & FONTSTYLE_Smooth) != 0);
00690 }
00691
00692 private:
00693 #ifndef GENERATING_DOXYGEN_OUTPUT
00694
00695 void Copy (
00696 const TEXTSTYLE& rhs
00697 ) {
00698
00699
00700
00701 StructSize = sizeof(TEXTSTYLE);
00702 StyleFlags = rhs.StyleFlags;
00703 FontNumber = rhs.FontNumber;
00704 FGColor = rhs.FGColor;
00705 BGColor = rhs.BGColor;
00706 GlyphRotation = rhs.GlyphRotation;
00707 GlyphAspect = rhs.GlyphAspect;
00708 Shear = rhs.Shear;
00709 Height = rhs.Height;
00710 LineSpace = rhs.LineSpace;
00711 FontFlags = rhs.FontFlags;
00712 MapScale = rhs.MapScale;
00713 fontname = rhs.fontname;
00714 HeightUnits = rhs.HeightUnits;
00715 SpaceUnits = rhs.SpaceUnits;
00716 Predefined = rhs.Predefined;
00717 Width = rhs.Width;
00718 StrokeWidth = rhs.StrokeWidth;
00719 EnhanceWidth = rhs.EnhanceWidth;
00720 BoldnessWidth = rhs.BoldnessWidth;
00721 UnderlineWidth = rhs.UnderlineWidth;
00722 UnderlineOffset = rhs.UnderlineOffset;
00723 ShadowOffset = rhs.ShadowOffset;
00724 ShadowAngle = rhs.ShadowAngle;
00725 ClipWidth = rhs.ClipWidth;
00726 ShadowRelative = rhs.ShadowRelative;
00727 WidthUnits = rhs.WidthUnits;
00728 m_bInitialized = true;
00729 }
00730
00731 #endif // GENERATING_DOXYGEN_OUTPUT
00732 };
00733
00734 PREVENT_MEMFUNC(TEXTSTYLE);
00735
00736
00737 struct TEXTSTYLEDIFF : public TEXTSTYLE {
00738 enum MEMBERMASK {
00739 MEMBER_NONE = 0x00000000,
00740 MEMBER_StyleFlags = 0x00000001,
00741 MEMBER_FontNumber = 0x00000002,
00742 MEMBER_FGColor = 0x00000004,
00743 MEMBER_BGColor = 0x00000008,
00744 MEMBER_GlyphRotation = 0x00000010,
00745 MEMBER_GlyphAspect = 0x00000020,
00746 MEMBER_Shear = 0x00000040,
00747 MEMBER_Height = 0x00000080,
00748 MEMBER_LineSpace = 0x00000100,
00749 MEMBER_FontFlags = 0x00000200,
00750 MEMBER_MapScale = 0x00000400,
00751 MEMBER_fontname = 0x00000800,
00752 MEMBER_HeightUnits = 0x00001000,
00753 MEMBER_SpaceUnits = 0x00002000,
00754 MEMBER_Predefined = 0x00004000,
00755 MEMBER_Width = 0x00008000,
00756 MEMBER_StrokeWidth = 0x00010000,
00757 MEMBER_EnhanceWidth = 0x00020000,
00758 MEMBER_BoldnessWidth = 0x00040000,
00759 MEMBER_UnderlineWidth = 0x00080000,
00760 MEMBER_UnderlineOffset = 0x00100000,
00761 MEMBER_ShadowOffset = 0x00200000,
00762 MEMBER_ShadowAngle = 0x00400000,
00763 MEMBER_ClipWidth = 0x00800000,
00764 MEMBER_ShadowRelative = 0x01000000,
00765 MEMBER_WidthUnits = 0x02000000,
00766 MEMBER_ALL = 0x03FFFFFF
00767 };
00768
00769 UINT32 StyleFlagMask;
00770 UINT32 FontFlagMask;
00771 MEMBERMASK MemberMask;
00772
00773 TEXTSTYLEDIFF() :
00774 TEXTSTYLE(),
00775 StyleFlagMask(0),
00776 FontFlagMask(0),
00777 MemberMask(MEMBER_NONE)
00778 {
00779 }
00780
00781
00782
00783 TEXTSTYLEDIFF (
00784 const MIUNICODE*
00785 );
00786
00787
00788 TEXTSTYLEDIFF (
00789 const TEXTSTYLE& rhs
00790 ) :
00791 TEXTSTYLE(rhs),
00792 StyleFlagMask(0xFFFFFFFF),
00793 FontFlagMask(0xFFFFFFFF),
00794 MemberMask(MEMBER_ALL)
00795 {
00796 }
00797
00798
00799
00800
00801 TEXTSTYLEDIFF& operator|= (
00802 const TEXTSTYLEDIFF& rhs
00803 );
00804
00805
00806 TEXTSTYLEDIFF& operator+= (
00807 const MIUNICODE* code
00808 );
00809
00810
00811
00812
00813
00814
00815 TEXTSTYLEDIFF& operator&= (
00816 const TEXTSTYLEDIFF& rhs
00817 );
00818
00819
00820
00821
00822
00823
00824 TEXTSTYLEDIFF& operator^= (
00825 const TEXTSTYLEDIFF& rhs
00826 );
00827
00828
00829
00830
00831 void GetTildeCodes (
00832 MISTRING& str,
00833 bool bClearStringFirst = true
00834 ) const;
00835
00836
00837
00838 bool ParseTildeCodes (
00839 const MIUNICODE* commands,
00840 MISTRING* unknowns = 0
00841 );
00842
00843 };
00844 DEFINE_ENUM_OP_BITWISE(TEXTSTYLEDIFF::MEMBERMASK);
00845
00846 struct MULTISTYLE {
00847 POINTSTYLE Point;
00848 LINESTYLE Line;
00849 POLYSTYLE Poly;
00850 TEXTSTYLE Text;
00851 };
00852
00853 #ifndef GENERATING_DOXYGEN_OUTPUT
00854
00855
00856
00857 PREVENT_MEMFUNC(TEXTSTYLE)
00858 PREVENT_MEMCMP(TEXTSTYLE)
00859 PREVENT_MEMFUNC(POINTSTYLE)
00860 PREVENT_MEMFUNC(LINESTYLE)
00861 PREVENT_MEMFUNC(POLYSTYLE)
00862 PREVENT_MEMFUNC(MULTISTYLE)
00863 #endif
00864
00865 #define STYLE_BuiltIn_Point_None 0
00866 #define STYLE_BuiltIn_Point_BoxOpen 1
00867 #define STYLE_BuiltIn_Point_BoxFilled 2
00868 #define STYLE_BuiltIn_Point_CircleOpen 3
00869 #define STYLE_BuiltIn_Point_CircleFilled 4
00870 #define STYLE_BuiltIn_Point_Crosshair 5
00871 #define STYLE_BuiltIn_Point_CrosshairHalo 6
00872 #define STYLE_BuiltIn_Point_Last 6
00873
00874
00875 #define TEXTSTYLEPREDEF_None 0
00876 #define TEXTSTYLEPREDEF_NauticalDepth 1
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886 #if defined(__cplusplus)
00887 extern "C" {
00888 #endif
00889
00890
00891 int MxGetSymbolMinMax (
00892 UINT8 *symbolbuf,
00893 LRECTXY *minmax
00894 );
00895
00896
00897 int MxGetSymbolSize (
00898 UINT8 *symbolbuf
00899 );
00900
00901
00902 int MxParseSymbol (
00903 const char* const istring,
00904 UINT8 **bufp
00905 );
00906
00907
00908 char *MxSymbolToText (
00909 UINT8 *buf
00910 );
00911
00912
00913 int GetStringExtents (
00914 TEXTSTYLE *style,
00915 DPOINT2D *basepts,
00916 INT32 numbasepts,
00917 UINT32 baseflags,
00918 const MIUNICODE *string,
00919 DRECT2D *extents
00920 );
00921
00922
00923 int GetStringExtentsJustify (
00924 TEXTSTYLE *style,
00925 DPOINT2D *basepts,
00926 INT32 numbasepts,
00927 UINT32 baseflags,
00928 const MIUNICODE *string,
00929 DRECT2D *extents
00930 );
00931
00932 #if defined(__cplusplus)
00933 }
00934 #endif
00935
00936
00937
00938 #endif // INC_MI32_ELEMSTYL_H