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