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 #ifndef INC_MI32_MG2KML_H
00172 #define INC_MI32_MG2KML_H
00173
00174 #ifndef INC_MI32_MGD2_H
00175 #include <mi32/mgd2.h>
00176 #endif
00177
00178 #ifndef INC_MI32_FILEPATH_H
00179 #include <mi32/filepath.h>
00180 #endif
00181
00182 #ifndef INC_MI32_FILERAW_H
00183 #include <mi32/fileraw.h>
00184 #endif
00185
00186 #ifndef INC_GRE_BASE_H
00187 #include <gre/base.h>
00188 #endif
00189
00190 #ifndef INC_RVC_ELEMENT_H
00191 #include <rvc/element.h>
00192 #endif
00193
00194 #ifndef INC_MI32_TRANS2DC_H
00195 #include <mi32/trans2dc.h>
00196 #endif
00197
00198 #ifndef INC_RVC_STYLEPATTTERNHATCH_H
00199 #include <rvc/stylepatternhatch.h>
00200 #endif
00201
00202 #ifndef IN_MI32_FILELEGACY_H
00203 #include <mi32/filelegacy.h>
00204 #endif
00205
00206 #ifndef INC_MI32_MISTRINGLIST_H
00207 #include <mi32/mistringlist.h>
00208 #endif
00209
00210
00211 #ifndef GENERATING_DOXYGEN_OUTPUT
00212
00213 class REGION2D;
00214 class SUBREGION2D;
00215 class KML;
00216 class JPEGEXT_FILE;
00217 struct png_struct_def;
00218 struct png_info_struct;
00219 namespace GRE {
00220 class LAYER;
00221 class GROUP;
00222 class LAYOUT;
00223 }
00224 namespace RVC {
00225 class STYLEPATTERN_BITMAP;
00226 }
00227
00228 struct KMLLAYER {
00229 int id;
00230 MISTRING name;
00231 MISTRING description;
00232 bool isGroup;
00233 UINT32 group;
00234 DPOINT2D size;
00235 };
00236
00237 #endif // GENERATING_DOXYGEN_OUTPUT
00238
00239
00240 #ifndef GENERATING_DOXYGEN_OUTPUT
00241 class KMLPATTERN {
00242 public:
00243
00244 KMLPATTERN ();
00245
00246 ~KMLPATTERN ();
00247
00248 void GetName (
00249 MISTRING& name,
00250 const COLOR *var = 0
00251 ) const;
00252
00253 char m_name[32];
00254 bool m_bDefined;
00255 bool m_bHasVarColor;
00256 bool m_bHasTransparent;
00257 int m_OtherColorsUsed;
00258 int m_PatternNum;
00259 int m_Version;
00260 int m_NumVarColorsUsed;
00261 UINT8 m_ColorUsage[32];
00262 UINT8 *m_pattbuf;
00263 int m_size;
00264 COLOR *m_VarColor;
00265 KMLPATTERN *m_alias;
00266 };
00267
00268 #endif // GENERATING_DOXYGEN_OUTPUT
00269
00270
00271 namespace MGD {
00272
00273 #ifndef GENERATING_DOXYGEN_OUTPUT
00274 class CONTEXT_KML;
00275 #endif // GENERATING_DOXYGEN_OUTPUT
00276
00277 class DEVICE_KML : public MGD::DEVICE {
00278
00279 public:
00280
00281 DEVICE_KML ();
00282
00283 virtual ~DEVICE_KML();
00284
00285
00286 void InitializeDevice (
00287 UINT32 height,
00288 UINT32 width
00289 );
00290
00291 ERRVALUE Create (
00292 const FILEPATH& filename,
00293 double height,
00294 double width,
00295 const MIUNICODE* title,
00296 UINT32 resolution
00297 );
00298
00299 ERRVALUE Close (
00300 );
00301
00305 ERRVALUE Finish (
00306 );
00307
00308 void AddScreenOverlay(
00309 const MISTRING& url,
00310 const DPOINT2D& upperleft,
00311 const MISTRING& layername,
00312 const DPOINT2D& size,
00313 const bool visible = true
00314 );
00315
00316
00317
00318 void AddViewPoint(
00319 const GRE::VIEWPOINT3D *viewpt,
00320 const MISTRING& name
00321 );
00322
00323 void AddNetworkLink (
00324 const MISTRING& url,
00325 const DRECT3D& extents,
00326 const MISTRING& layername
00327 );
00328
00329 void AddWMSOverlay(
00330 const MISTRING& url,
00331 const DRECT3D& extents,
00332 const MISTRING& layername
00333 );
00334
00335
00336 ERRVALUE EndLayer (
00337 bool force = false
00338 );
00339
00340 ERRVALUE BeginGroup (
00341 GRE::GROUP* gp
00342 );
00343
00344 ERRVALUE EndGroup (
00345 GRE::GROUP* gp
00346 );
00347
00348 ERRVALUE EndGroup (
00349 );
00350
00351 ERRVALUE Compress (
00352 const FILEPATH& path,
00353 int rate = 9
00354 );
00355
00356 ERRVALUE EndElement (
00357 );
00358
00359 void EndMultiGeometry (
00360 );
00361
00362 void EndPlacemark (
00363 );
00364
00366 MISTRING Escape (
00367 const MISTRING& str
00368 );
00369
00370 int GetPlacemarkCount() {return m_PlacemarkIndex;}
00371
00373 ERRVALUE GetString (
00374 STRUTF8& str
00375 );
00376
00377 ERRVALUE GetString (
00378 STRUTF8* str
00379 );
00380
00381 ERRVALUE InitializeImage (
00382 INT32 h,
00383 INT32 w,
00384 DPOINT2D ul
00385 );
00386
00387 void SetAccuracy (
00388 DOUBLE accuracy
00389 );
00390
00391 void SetColorizeSymbols (
00392 bool colorize
00393 ){
00394 m_bColorizeSymbols = colorize;
00395 }
00396 void SetDrawingScreenOverlay (
00397 bool overlay
00398 );
00399
00400 void SetLineScale (
00401 double scale
00402 ) { m_LineScale = scale; }
00403
00404 void SetMarkerSize (
00405 int size
00406 ) { m_MarkerSize = size; }
00407
00408 void SetMarkerScale (
00409 double scale
00410 ) { m_MarkerScale = scale; }
00411
00413 void SetSelfValidate (
00414 bool validate
00415 ) { m_bSelfValidate = validate;}
00416
00419 void SetResolution (
00420 UINT32 resolution
00421 ) { m_vres = m_hres = resolution; }
00422
00423
00424 void SetJPEGQuality (
00425 int quality
00426 ) { m_JPEGQuality = quality;}
00427
00428 void SetDataTipImgTagWidth (
00429 int width
00430 ) { m_DataTipImgTagWidth = width;}
00431
00432 void SetMakeBuiltInSymbols (
00433 bool makebuiltins
00434 ) { m_bGenerateBuiltInSymbols = makebuiltins;}
00435
00436
00437 void SetMinimumLineWidth (
00438 DOUBLE width
00439 ){ m_MinimumLineWidth = width; }
00440
00441 void SetUseDynamicWMS(
00442 bool useDynamic
00443 ){
00444 m_bDynamicWMS = useDynamic;
00445 };
00446
00448 void SetUsePNG (
00449 bool usepngs
00450 ) { m_bUsingPNG = usepngs;}
00451
00452
00453 void SetSourceLayout (
00454 GRE::LAYOUT *layout
00455 );
00456
00457 void SetViewPoint(
00458 const GRE::VIEWPOINT3D *viewpt,
00459 const MISTRING& name
00460 );
00461
00462 ERRVALUE StartLayer (
00463 const MIUNICODE* layername,
00464 bool bIsRaster,
00465 GRE::LAYER* lp
00466 );
00467
00468 ERRVALUE StartLayer (
00469 GRE::LAYER* lp
00470 );
00471
00472 ERRVALUE StartElement (
00473 GRE::LAYER* lp,
00474 const RVC::ELEMENT &element
00475 );
00476
00478 void UseGZIP (
00479 bool gzip
00480 ) { m_bGzip = gzip; }
00481
00482
00484 ERRVALUE WriteToFile (
00485 const FILEPATH& outpath,
00486 const STRUTF8& str
00487 );
00488
00490 ERRVALUE WriteToFile (
00491 const FILEPATH& outpath,
00492 bool finish = true
00493 );
00494
00495
00496 ERRVALUE Validate (
00497 );
00498
00499 void SetTrans (
00500 TRANS2D_MAPGEN trans
00501 ) {
00502 GeoTrans = trans;
00503 }
00504
00505 ERRVALUE TransForward (
00506 const DRECT2D& rect1,
00507 DRECT2D& rect2
00508 );
00509
00510 ERRVALUE TransForward (
00511 const DPOINT2D& pt1,
00512 DPOINT2D& pt2
00513 );
00514
00515 ERRVALUE TransForward (
00516 const POLYLINE& linein,
00517 POLYLINE& lineout
00518 );
00519
00520
00521 void SetTitle (
00522 const MISTRING& title
00523 );
00524
00525 void SetDescription (
00526 const MISTRING& desc
00527 );
00528
00529 void SetReference (
00530 int ref
00531 ){m_reference = ref;}
00532
00533 void SetSymbolDirectory (
00534 const FILEPATH& dir
00535 ){ m_SymbolDirectory = dir; }
00536
00537 void GetSymbolDirectory (
00538 FILEPATH& dir
00539 ){ dir = m_SymbolDirectory; }
00540
00541 void SetCanvasSize(
00542 DPOINT2D size
00543 ){ m_Size = size; }
00544
00545 TRANS2D_MAPGEN GeoTrans;
00546
00547 class IMAGEDATA {
00548 public:
00549 IMAGEDATA();
00550 IMAGEDATA(FILEPATH& path, MISTRING& name){
00551 m_path = path;
00552 m_name = name;
00553 };
00554 ~IMAGEDATA() {}
00555 FILEPATH GetPath() {return m_path;}
00556 void SetPath(const FILEPATH& path) {m_path = path;}
00557 MISTRING GetName() {return m_name; }
00558 void SetName(const MISTRING& name) {m_name = name;}
00559 private:
00560 FILEPATH m_path;
00561 MISTRING m_name;
00562 };
00563
00564 class KMLSYMBOL {
00565 public:
00566 KMLSYMBOL ();
00567 KMLSYMBOL (UINT32 index, INT32 b, COLOR micolor, bool var, INT32 layer, const MISTRING& pngname, INT32 symangle){
00568 number = index;
00569 built = b;
00570 color = micolor;
00571 hasVariableColor = var;
00572 layernum = layer;
00573 name = pngname;
00574 angle = symangle;
00575 };
00576 ~KMLSYMBOL() {};
00577 INT32 number;
00578 INT32 built;
00579 INT32 angle;
00580 COLOR color;
00581 bool hasVariableColor;
00582 INT32 layernum;
00583 MISTRING name;
00584 FILEPATH path;
00585 };
00586
00587 private:
00588 #ifndef GENERATING_DOXYGEN_OUTPUT
00589
00590 ERRVALUE DrawPNG (
00591 MISTRING& name,
00592 INT32 number = -1,
00593 double angle = 0
00594 );
00595
00596 virtual bool v_AvoidFillSpans () const;
00597
00598
00599 virtual ERRVALUE v_Clear (
00600 const COLOR& color
00601 );
00602
00603 virtual bool v_UseAntiAliasing() const;
00604
00605 virtual MGD::CAPABILITY v_GetCapabilities (
00606 ) const;
00607
00608 virtual MGD::CONTEXT* v_CreateContext (
00609 );
00610
00611 virtual MGD::PIXEL v_GetColorPixel (
00612 const COLOR& color
00613 ) ;
00614
00615 virtual COLORSPACE v_GetColorSpace () const;
00616
00617 virtual bool v_GetNeedFullImageLine () const;
00618
00619 virtual void v_GetPixelColor (
00620 MGD::PIXEL pixel,
00621 COLOR& color
00622 ) const;
00623
00624 MISTRING CreateViewPointString (
00625 const GRE::VIEWPOINT3D *viewpt
00626 );
00627
00628 int m_len;
00629 int m_digits;
00630 DOUBLE m_hres;
00631 DOUBLE m_vres;
00632 DOUBLE m_accuracy;
00633 DOUBLE m_DataTipOpacity;
00634 MGD::LINECAP m_LineCapStyle;
00635 MGD::LINEJOIN m_LineJoinStyle;
00636 int m_LayerNum;
00637 INT32 m_ElemNum;
00638 RVC::ELEMENT m_ActiveElement;
00639 DOUBLE m_MinimumLineWidth;
00640
00641
00642
00643 INT32 m_CurrentDefs;
00644 KMLLAYER m_KMLGroup;
00645
00646 bool m_bHasValid;
00647 bool m_bNeedsInit;
00648 bool m_bNoMessages;
00649 bool m_bDrawingScreenOverlay;
00650 bool m_bExternalStyles;
00651
00652 bool m_bStyleDefine;
00653 bool m_bScriptDefine;
00654 bool m_bClipDefine;
00655
00656 bool m_bBeginningLayer;
00657 bool m_bBeginningGroup;
00658 bool m_bSingleLayerGroup;
00659 bool m_bInLayer;
00660 bool m_bInGroup;
00661 bool m_bInImage;
00662 bool m_bDisableStyles;
00663 bool m_bRenderingImage;
00664 bool m_bGroupIs3D;
00665 bool m_bProjNotFound;
00666 bool m_bLatLon;
00667 bool m_bStylesAreDefined;
00668 bool m_bEmbedFonts;
00669 bool m_bGzip;
00670 bool m_bDynamicWMS;
00671 bool m_bInlineStyles;
00672 bool m_bInTextBlock;
00673 bool m_bCurLayerIsRaster;
00674 bool m_bColorIsVariable;
00675
00676 bool m_bDoBorder;
00677 bool m_bUsingPNG;
00678 bool m_bForcePNG;
00679 bool m_bCoordsFound;
00680 bool m_bDoTitles;
00681 bool m_bSelfValidate;
00682
00683 COLOR m_DrawColor;
00684 COLOR m_FillColor;
00685 COLOR m_HighlightColor;
00686 double m_Opacity;
00687 bool m_bClosed;
00688 bool m_bShowLabels;
00689
00690 png_struct_def *png_ptr;
00691 png_info_struct *info_ptr;
00692 JPEGEXT_FILE* m_pJPEGFile;
00693
00694 MISTRING m_TextStyle,m_FontName;
00695 MISTRING m_Title;
00696 MISTRING m_Description;
00697 double m_BaseAngle;
00698 DPOINT2D m_BasePoint;
00699
00700 int m_MarkerSize;
00701 double m_MarkerScale;
00702
00703 int m_JPEGQuality;
00704 int m_ImageX, m_ImageY, m_ImageLins, m_ImageCols;
00705 INT32 m_ImageSize;
00706 int m_ImageLinsSeen;
00707 int m_reference;
00708
00709
00710 FILE_RAW m_PatternFile;
00711 FILE_RAW m_OutputFile;
00712 FILE_RAW m_StyleFile;
00713 FILE_RAW m_ScriptFile;
00714 FILE_RAW m_ActiveFile;
00715 FILE_RAW m_ZippedFile;
00716
00717 int m_ImageFileIndex;
00718 FILE_LEGACY_STREAM m_ImageFile;
00719 MISTRING m_FilePrefix;
00720
00721 FILEPATH m_OutputFilename;
00722 FILEPATH m_ImageFilename;
00723
00724 INT32 m_StyleStartOffset;
00725 INT32 m_PatternStartOffset;
00726
00727 int m_PngIndex;
00728 int m_CurrentStyle;
00729 int m_CurrentGroupID;
00730 int m_PlacemarkIndex;
00731
00732 MISTRINGLIST m_LayerNames;
00733 MILIST<KMLLAYER> m_KMLLayers;
00734
00735
00736 DRECT2D m_GroupExtents;
00737
00738
00739 MISTRING m_LayerName;
00740 MISTRING m_GroupName;
00741 GRE::LAYER* m_Layer;
00742 GRE::GROUP* m_Group;
00743 INT32 m_CurrentDataTip;
00744 bool m_bDrawingSymbol;
00745 bool m_bInSymbol;
00746 MISTRING m_ActiveSymbol;
00747 int m_SymbolNum, m_CurrentSymbol;
00748
00749 bool m_bInDefinition;
00750 bool m_bInPlacemark;
00751 bool m_bInMultiGeometry;
00752 bool m_IgnoreEndLayer;
00753 bool m_LayerHasContent;
00754
00755 double vScale, hScale, vOffset, hOffset;
00756
00757
00758
00759
00760
00761
00762 MISTRING m_KML;
00763 MISTRING m_Head;
00764
00765 MISTRINGLIST m_ViewPoints;
00766 MISTRINGLIST m_ViewPointNames;
00767
00768 MISTRING m_StyleSheet;
00769 MISTRING m_PathStyle, m_PlaceStyle, m_AreaStyle;
00770
00771 MISTRING m_ActiveTip;
00772 MISTRING m_TipName;
00773 MISTRING m_Geometry;
00774 INT32 m_GeomCount;
00775 INT32 m_ImageCount;
00776
00777 MISTRING m_Placemark;
00778 MISTRING m_LayerBody;
00779 MISTRING m_GroupBody;
00780 MISTRING m_BodyStr;
00781
00782 SIMPLE_ARRAY<UINT8> m_imageBuffer;
00783 MILIST<IMAGEDATA> m_ResultImages;
00784 MILIST<KMLSYMBOL> m_Symbols;
00785
00786
00787
00788 double m_LineScale;
00789 bool m_bGenerateBuiltInSymbols;
00790 bool m_bColorizeSymbols;
00791 int m_DataTipImgTagWidth;
00792 FILEPATH m_SymbolDirectory;
00793 COLOR m_SymbolColor;
00794
00795 INT32 m_HotSpotX;
00796 INT32 m_HotSpotY;
00797 INT32 m_SymbolSizeX;
00798 INT32 m_SymbolSizeY;
00799
00800 DRECT2D m_Size;
00801
00802
00803
00804 DEVICE_KML (const DEVICE_KML&);
00805
00806
00807 int FindCurrentStyle (
00808 const MISTRING& code
00809 );
00810
00811 UINT32 m_crc;
00812 UINT32 m_filter;
00813
00814 virtual ERRVALUE v_FillSpan (
00815 MGD::CONTEXT* gc,
00816 INT32 x1,
00817 INT32 x2,
00818 INT32 y
00819 );
00820
00821
00822
00823
00824
00825 bool IsLatLon (
00826 SPATREF::COORDREFSYS CoordRefSys
00827 );
00828
00829 int PortWrite (
00830 const char *buf,
00831 int len
00832 ) { return (PortWrite(reinterpret_cast<const UINT8*>(buf), len)); }
00833
00834 int PortWrite (
00835 const UINT8 *buf,
00836 int len
00837 );
00838
00839 int SendEOL (
00840 );
00841
00842 int SendString (
00843 const char *str,
00844 UINT32 flags
00845 );
00846
00847 int WriteString (
00848 const MISTRING& str
00849 );
00850
00851 int SendString (
00852 const MISTRING& str,
00853 UINT32 flags
00854 );
00855
00856 int SendLong (
00857 INT32 num
00858 );
00859
00860 int SendDouble (
00861 DOUBLE num
00862 );
00863
00864 int SendXYCmdDouble (
00865 double x,
00866 double y,
00867 const char *cmd,
00868 UINT32 flags
00869 );
00870
00871 int SendXYCmdUnscaledLong (
00872 INT32 x,
00873 INT32 y,
00874 const char *cmd,
00875 UINT32 flags
00876 );
00877
00878 ERRVALUE SetFillPattern (
00879 MGD::CONTEXT_KML* gc
00880 );
00881
00882
00883
00884 INT32 FindSymbol (
00885 INT32 symnum,
00886 INT32 builtin
00887 );
00888
00889
00890 void TransCoord (
00891 INT32 x,
00892 INT32 y,
00893 double *dx,
00894 double *dy
00895 ) {
00896 *dx = (double)x;
00897 *dy = (double)y;
00898 return;
00899 }
00900
00901
00902 int z_putLong (
00903 UINT32 x
00904 );
00905
00906 int z_put (
00907 int x
00908 );
00909
00910 int putByte (
00911 int x
00912 );
00913
00914
00915
00916 ERRVALUE AddFontToList (
00917 const MISTRING& fontfam,
00918 const MISTRING& fontname
00919 );
00920
00921 #endif // GENERATING_DOXYGEN_OUTPUT
00922 friend class MGD::CONTEXT_KML;
00923
00924 };
00925
00926
00927 class CONTEXT_KML : public MGD::CONTEXT {
00928 public:
00929
00930 ~CONTEXT_KML (
00931 ) {}
00932
00933 void AddGroundOverlay (
00934 const MISTRING& url,
00935 const DRECT2D& extents,
00936 const MISTRING& name
00937 );
00938
00939 #ifndef GENERATING_DOXYGEN_OUTPUT
00940
00941 protected:
00942
00943 CONTEXT_KML (
00944 MGD::DEVICE_KML* dev
00945 ) :
00946 MGD::CONTEXT(dev),
00947 m_DevKML(dev),
00948 m_bHasClip(false),
00949 m_bNewClipRegion(false),
00950 m_bDoDash(false),
00951 m_ActiveClip(-1)
00952 {
00953 }
00954
00955 private:
00956 virtual void v_SetColorIsPatternVariable (
00957 bool value
00958 );
00959
00960 virtual void v_UpdateColor (
00961 );
00962
00963 virtual void v_UpdateColor2 (
00964 const COLOR& color
00965 );
00966
00967 void TransCoord (
00968 INT32 x,
00969 INT32 y,
00970 double *dx,
00971 double *dy
00972 ) {
00973 m_DevKML->TransCoord(x,y,dx,dy);
00974 return;
00975 }
00976
00977 virtual void v_UpdateClipRegion (
00978 );
00979
00980 virtual void v_UpdateClipNone (
00981 );
00982
00983 virtual void v_UpdateClipRect (
00984 );
00985
00986 virtual ERRVALUE v_DrawLine (
00987 INT32 x1,
00988 INT32 y1,
00989 INT32 x2,
00990 INT32 y2
00991 );
00992
00993 virtual ERRVALUE v_DrawLine (
00994 double x1,
00995 double y1,
00996 double x2,
00997 double y2
00998 );
00999
01000 virtual ERRVALUE v_DrawGlyph (
01001 MGD::FONT* font,
01002 double x,
01003 double y,
01004 double baseangle,
01005 const MGD::STRINGDATA& gidstr,
01006 int num
01007 );
01008
01009 virtual ERRVALUE v_DrawLinesLow (
01010 const LPOINT2D *lpoint,
01011 INT32 NumPoints
01012 );
01013
01014 virtual ERRVALUE v_FillCircle (
01015 double xcenter,
01016 double ycenter,
01017 double radius
01018 );
01019
01020 virtual ERRVALUE v_DrawCircle (
01021 double xcenter,
01022 double ycenter,
01023 double radius
01024 );
01025
01026 virtual ERRVALUE v_DrawArc (
01027 double xcenter,
01028 double ycenter,
01029 double xradius,
01030 double yradius,
01031 double startangle,
01032 double sweepangle,
01033 double rotangle,
01034 MGD::SHAPECLOSE closemode
01035 );
01036
01037 virtual ERRVALUE v_FillArc (
01038 double xcenter,
01039 double ycenter,
01040 double xradius,
01041 double yradius,
01042 double startangle,
01043 double sweepangle,
01044 double rotangle,
01045 MGD::SHAPECLOSE closemode
01046 );
01047
01048 virtual ERRVALUE v_DrawLinesLow (
01049 const POLYLINE& line
01050 );
01051
01052 virtual ERRVALUE v_FillRectangle (
01053 INT32 x1,
01054 INT32 y1,
01055 INT32 x2,
01056 INT32 y2
01057 );
01058
01059 virtual ERRVALUE v_FillRectangle (
01060 const DRECT2D& rect
01061 );
01062
01063 virtual ERRVALUE v_DrawLinesDashed (
01064 const LPOINT2D* points,
01065 INT32 numpoints,
01066 const double *DashArray,
01067 INT32 DashCount,
01068 double DashOffset = 0.0,
01069 bool close = false
01070 );
01071
01072
01073
01074
01075 virtual ERRVALUE v_DrawPoint (
01076 INT32 x,
01077 INT32 y
01078 );
01079
01080 virtual ERRVALUE v_DrawPoint (
01081 const DPOINT2D& pt
01082 );
01083
01084 virtual ERRVALUE v_DrawStringStraight (
01085 const DPOINT2D& pt,
01086 double baseangle,
01087 const MGD::STRINGDATA& gidstr,
01088 int sindex,
01089 int eindex,
01090 double SpaceExtra,
01091 double GlyphExtra
01092 );
01093
01094 virtual ERRVALUE v_FillRegion (
01095 const REGION2D& polygons,
01096 bool DrawOutline = false
01097 );
01098
01099 virtual ERRVALUE v_FillSubRegion (
01100 const SUBREGION2D& polygons,
01101 bool DrawOutline = false
01102 );
01103
01104 virtual ERRVALUE v_ImageBegin (
01105 INT32 x,
01106 INT32 y,
01107 INT32 cols,
01108 INT32 lins,
01109 COLORSPACE ColorSpace,
01110 const COLOR_ARRAY *colmap,
01111 UINT32 flags
01112 );
01113
01114 virtual ERRVALUE v_ImageEnd (
01115 UINT32 flags
01116 );
01117
01118 virtual ERRVALUE v_PutImageSpanDirect (
01119 INT32 x,
01120 INT32 y,
01121 INT32 len,
01122 const void *data,
01123 const UINT8 *mask
01124 );
01125
01126 virtual ERRVALUE v_PutPixel (
01127 INT32 x,
01128 INT32 y,
01129 MGD::PIXEL pixel
01130 );
01131
01132 virtual void v_SymbolBegin ();
01133 virtual void v_SymbolEnd ();
01134
01135 virtual void v_TextSpanBegin ();
01136 virtual void v_TextSpanEnd ();
01137
01138 virtual void v_TextBlockBegin (
01139 const MGD::TEXTBLOCK& block
01140 );
01141
01142
01143 virtual void v_TextBlockEnd (
01144 const MGD::TEXTBLOCK& block
01145 );
01146
01147 bool m_bHasClip;
01148 bool m_bNewClipRegion;
01149 bool m_bDoDash;
01150 COLOR m_DrawColor;
01151 COLOR m_FillColor;
01152 COLOR m_SymbolColor;
01153 MGD::DEVICE_KML* m_DevKML;
01154 MISTRING m_Style, m_LineStyleCode, m_ActiveFill, m_DashArray;
01155 int m_ActiveClip;
01156 double m_TextHeight;
01157 friend class MGD::DEVICE_KML;
01158
01159 ERRVALUE GenArcLine (
01160 const DPOINT2D& center,
01161 double xradius,
01162 double yradius,
01163 double startangle,
01164 double sweepangle,
01165 double rotangle,
01166 POLYLINE& perimeter,
01167 bool bKeepExistingPoints
01168 );
01169
01170 int FindDefs (
01171 const MISTRING& defs
01172 );
01173
01174 ERRVALUE ComposeLines (
01175 const LPOINT2D *lpoint,
01176 INT32 NumPoints,
01177 bool bClose
01178 );
01179
01180 ERRVALUE ComposeLinesFloat (
01181 const POLYLINE& line
01182 );
01183
01184 ERRVALUE PrepareImage (
01185 );
01186
01187 };
01188
01189 #endif // GENERATING_DOXYGEN_OUTPUT
01190 }
01191
01192
01193
01194 #endif //end define INC_MI32_MG2KML_H