MGD::DEVICE_SVG Class Reference

#include <mi32/mg2svg.h>

Inheritance diagram for MGD::DEVICE_SVG:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ERRVALUE BeginGroup (GRE_GROUP *gp)
ERRVALUE Close ()
ERRVALUE Create (const FILEPATH &filename, double height, double width, const UNICODE *title, UINT32 resolution)
 DEVICE_SVG ()
void DoHighPrecisionLines (bool usedoubles)
void EmbedFonts (bool embed)
void EmbedImages (bool embed)
void EmbedWithNameSpacePrefix (const MISTRING &prefix)
ERRVALUE EndElement ()
ERRVALUE EndGroup (GRE_GROUP *gp)
ERRVALUE EndLayer ()
MISTRING Escape (const MISTRING &str)
ERRVALUE GetString (STRUTF8 &str)
void IncludeLayerControls (bool include)
void InitializeDevice (UINT32 height, UINT32 width)
void LinkExternalStyleSheet (bool external)
void LinkStylesheet (bool link)
void SetDataTipOpacity (DOUBLE opacity)
void SetDisplayToView (const Mat3x3 matrix)
void SetEventsForWebClient (bool webscript)
void SetForIllustrator (bool unscaled)
void SetHighlightColor (COLOR color)
void SetIncludeMeasurementTools (bool include)
void SetJPEGQuality (int quality)
void SetLinkToScripts (bool link)
void SetResolution (UINT32 resolution)
void SetSelfValidate (bool validate)
void SetShowDatatips (bool show, bool blink, bool invert)
void SetSourceLayout (GRE_LAYOUT *layout)
void SetSymbolEnlargement (DOUBLE enlargement)
void SetUseAdobeMenu (bool usemenu)
void SetUseEntitiesInDataTips (bool use)
void SetUseFreehandMeasures (bool use)
void SetUseLayerControlPanel (bool usepanel)
void SetUsePNG (bool usepngs)
void ShowCoordinates (bool show)
ERRVALUE StartElement (GRE_LAYER *lp, const RVC::ELEMENT &element)
ERRVALUE StartLayer (GRE_LAYER *lp)
ERRVALUE StartLayer (const UNICODE *layername, bool bIsRaster, GRE_LAYER *lp)
void UseGZIP (bool gzip)
void UseInlineStyles (bool inlines)
ERRVALUE Validate ()
ERRVALUE WriteToFile (const FILEPATH &outpath)
ERRVALUE WriteToFile (const FILEPATH &outpath, const STRUTF8 &str, bool useGzip)
virtual ~DEVICE_SVG ()

Private Member Functions

ERRVALUE ActivateGC (MGD::CONTEXT_SVG *gc)
MISTRING ActivateTC (MGD::CONTEXT_SVG *gc)
int AddClippingPath (MGD::CONTEXT_SVG *gc, const MISTRING &region)
ERRVALUE AddFontToList (const MISTRING &fontfam, const MISTRING &fontname)
ERRVALUE AppendFile (const FILEPATH &filename, bool b_encode64)
int CompressBegin ()
int CompressEnd ()
 DEVICE_SVG (const DEVICE_SVG &)
ERRVALUE Draw3DPNG ()
int DumpFillPattern (SVGPATTERN *pat, COLOR *var, MISTRING &name)
int DumpFillPatternLayer (BITMAPPATTHDR *hdr, UINT8 *bitmap, int c, const COLOR *color)
MISTRING Encode64 (const UINT8 *buff, int len)
INT32 FilterInList (double x, double y, const COLOR &color, double opacity, double height)
int FindCurrentStyle (const MISTRING &code)
int FindEntity (const MISTRING &code)
void FreePrivateData ()
int GetCurveIndex ()
DOUBLE GetGreatestCommonDivisor (DOUBLE a, DOUBLE b)
DOUBLE GetLeastCommonMultiple (DOUBLE a, DOUBLE b)
void IncCurveIndex ()
ERRVALUE InsertFile (FILE_RAW &file1, FILE_RAW &file2, UINT32 offset)
bool IsLatLon (SPATREF::COORDREFSYS CoordRefSys)
int PortWrite (const UINT8 *buf, int len)
int PortWrite (const char *buf, int len)
int putByte (int x)
int SendDouble (DOUBLE num)
int SendEOL ()
int SendGroupHeader (MGD::CONTEXT_SVG *gc, bool isGroup, const MISTRING &name)
int SendLong (INT32 num)
int SendString (const MISTRING &str, UINT32 flags)
int SendString (const char *str, UINT32 flags)
int SendXYCmdDouble (double x, double y, const char *cmd, UINT32 flags)
int SendXYCmdUnscaledLong (INT32 x, INT32 y, const char *cmd, UINT32 flags)
ERRVALUE SetFillPattern (MGD::CONTEXT_SVG *gc)
ERRVALUE StartClipping (MGD::CONTEXT_SVG *gc)
INT32 SymbolInList (INT32 symnum)
void TransCoord (INT32 x, INT32 y, double *dx, double *dy)
virtual bool v_AvoidFillSpans () const
virtual ERRVALUE v_Clear (const COLOR &color)
virtual MGD::CONTEXTv_CreateContext ()
virtual ERRVALUE v_FillSpan (MGD::CONTEXT *gc, INT32 x1, INT32 x2, INT32 y)
virtual MGD::CAPABILITY v_GetCapabilities () const
virtual MGD::PIXEL v_GetColorPixel (const COLOR &color)
virtual COLORSPACE v_GetColorSpace () const
virtual bool v_GetNeedFullImageLine () const
virtual void v_GetPixelColor (MGD::PIXEL pixel, COLOR &color) const
virtual bool v_UseAntiAliasing () const
int WriteString (const MISTRING &str)
int z_put (int x)
int z_putLong (UINT32 x)

Private Attributes

jpeg_compress_struct * cinfo
double hOffset
double hScale
png_info_struct * info_ptr
jpeg_error_mgr * jerr
SIMPLE_ARRAY< UINT8m_3DimageBuffer
RVC::ELEMENT m_ActiveElement
FILE_RAW m_ActiveFile
SVGFILTER m_ActiveFilter
SVGSYMBOL m_ActiveSymbol
SVGPATTERNm_AllPatterns
double m_BaseAngle
DPOINT2D m_BasePoint
bool m_bBeginningGroup
bool m_bBeginningLayer
bool m_bBlinkHighlight
bool m_bClipBounds
bool m_bClipDefine
bool m_bClippingOn
bool m_bClosed
bool m_bColorIsVariable
bool m_bCoordsFound
bool m_bCurLayerIsRaster
bool m_bDisableStyles
bool m_bDoBorder
bool m_bDoFill
bool m_bDoFloat
bool m_bDrawingDataTip
bool m_bDrawingFillPattern
bool m_bDrawingSymbol
bool m_bEmbedFonts
bool m_bEmbedImages
bool m_bExternalScripts
bool m_bExternalStyles
bool m_bForcePNG
bool m_bForIllustrator
bool m_bGroupIs3D
bool m_bGzip
bool m_bGzipping
bool m_bHighlightEnlargePointSymbol
bool m_bHTMLwrap
bool m_bIncludeDatatipScript
bool m_bIncludeLayerCtrlPanel
bool m_bIncludeLayerCtrlScript
bool m_bIncludeMeasurementScript
bool m_bIncludeShowCoordScript
bool m_bInDefinition
bool m_bInGroup
bool m_bInImage
bool m_bInLayer
bool m_bInlineStyles
bool m_bInTextBlock
bool m_bLatLon
bool m_bNeedsInit
bool m_bNoMessages
MISTRING m_Body
bool m_bProjNotFound
bool m_bRendering3DImage
bool m_bScriptDefine
bool m_bSelfValidate
bool m_bSingleLayerGroup
bool m_bStandardCompression
bool m_bStyleDefine
bool m_bStylesAreDefined
bool m_bUseAdobeMenu
bool m_bUseEntitiesInDataTips
bool m_bUseFreehandMeasures
bool m_bUseInverseHighlights
bool m_bUseStyledDataTips
bool m_bUsingPNG
bool m_bWebClient
int m_ClipIndex
MISTRING m_ClipPath
MILIST< MISTRINGm_ClipPaths
LRECTXY m_ClipRect
UINT32 m_crc
int m_CurFillPattern
INT32 m_CurrElem
INT32 m_CurrentDataTip
INT32 m_CurrentDefs
int m_CurrentEntity
int m_CurrentGroupID
int m_CurrentStyle
int m_CurrentSymbol
MISTRING m_DataTip
DOUBLE m_DataTipOpacity
MILIST< MISTRINGm_Defs
MISTRING m_DisplayToView
COLOR m_DrawColor
INT32 m_ElemNum
MILIST< MISTRINGm_Entities
MISTRING m_EntitiesString
TRANS2D_AFFINE m_EquiToLatLon
MISTRING m_EquiToLatLonString
MISTRING m_FilePrefix
COLOR m_FillColor
UINT32 m_filter
MILIST< SVGFILTERm_Filters
MISTRING m_FontName
MILIST< MISTRINGm_Fonts
SIMPLE_ARRAY< UINT32m_GroupChildren
DRECT2D m_GroupExtents
MISTRING m_GroupName
bool m_HasEquiToLatLon
MISTRING m_Head
COLOR m_HighlightColor
double m_hres
int m_ImageCols
FILE * m_ImageFile
int m_ImageFileIndex
FILEPATH m_ImageFilename
int m_ImageLins
int m_ImageLinsSeen
INT32 m_ImageSize
int m_ImageX
int m_ImageY
int m_JPEGQuality
MISTRING m_LastFont
GRE_LAYERm_Layer
MISTRING m_LayerName
MILIST< MISTRINGm_LayerNames
int m_LayerNum
int m_len
MGD::LINECAP m_LineCapStyle
MGD::LINEJOIN m_LineJoinStyle
double m_LineWidth
int m_NumPatterns
double m_Opacity
FILE_RAW m_OutputFile
FILEPATH m_OutputFilename
FILE_RAW m_PatternFile
MILIST< MISTRINGm_PatternNames
SVGPATTERNm_Patterns
INT32 m_PatternStartOffset
int m_PngIndex
MISTRING m_Projname
MISTRING m_Script
FILE_RAW m_ScriptFile
FILE_RAW m_StyleFile
MILIST< MISTRINGm_StyleSet
MISTRING m_StyleSheet
INT32 m_StyleStartOffset
MISTRING m_SVG
SVGLAYER m_SVGGroup
MILIST< SVGLAYERm_SVGLayers
DOUBLE m_SymbolEnlargement
int m_SymbolNum
MILIST< SVGSYMBOLm_Symbols
int m_TextCurveIndex
MISTRING m_TextStyle
int m_TotalPatterns
MISTRING m_ViewToGroup
double m_vres
UINT8 m_zbuf [32768]
FILE_RAW m_ZippedFile
z_stream m_zstream
MISTRING nsPrefix
DOUBLE panelLeft
png_struct_def * png_ptr
double vOffset
double vScale

Constructor & Destructor Documentation

MGD::DEVICE_SVG::DEVICE_SVG  ) 
 

virtual MGD::DEVICE_SVG::~DEVICE_SVG  )  [virtual]
 

MGD::DEVICE_SVG::DEVICE_SVG const DEVICE_SVG  )  [private]
 


Member Function Documentation

ERRVALUE MGD::DEVICE_SVG::ActivateGC MGD::CONTEXT_SVG gc  )  [private]
 

MISTRING MGD::DEVICE_SVG::ActivateTC MGD::CONTEXT_SVG gc  )  [private]
 

int MGD::DEVICE_SVG::AddClippingPath MGD::CONTEXT_SVG gc,
const MISTRING region
[private]
 

ERRVALUE MGD::DEVICE_SVG::AddFontToList const MISTRING fontfam,
const MISTRING fontname
[private]
 

ERRVALUE MGD::DEVICE_SVG::AppendFile const FILEPATH filename,
bool  b_encode64
[private]
 

ERRVALUE MGD::DEVICE_SVG::BeginGroup GRE_GROUP gp  ) 
 

ERRVALUE MGD::DEVICE_SVG::Close  ) 
 

int MGD::DEVICE_SVG::CompressBegin  )  [private]
 

int MGD::DEVICE_SVG::CompressEnd  )  [private]
 

ERRVALUE MGD::DEVICE_SVG::Create const FILEPATH filename,
double  height,
double  width,
const UNICODE title,
UINT32  resolution
 

void MGD::DEVICE_SVG::DoHighPrecisionLines bool  usedoubles  )  [inline]
 

Definition at line 367 of file mg2svg.h.

ERRVALUE MGD::DEVICE_SVG::Draw3DPNG  )  [private]
 

int MGD::DEVICE_SVG::DumpFillPattern SVGPATTERN pat,
COLOR var,
MISTRING name
[private]
 

int MGD::DEVICE_SVG::DumpFillPatternLayer BITMAPPATTHDR hdr,
UINT8 bitmap,
int  c,
const COLOR color
[private]
 

void MGD::DEVICE_SVG::EmbedFonts bool  embed  )  [inline]
 

Definition at line 400 of file mg2svg.h.

void MGD::DEVICE_SVG::EmbedImages bool  embed  )  [inline]
 

Definition at line 404 of file mg2svg.h.

void MGD::DEVICE_SVG::EmbedWithNameSpacePrefix const MISTRING prefix  )  [inline]
 

Parameters:
prefix  ie specific svg technique

Definition at line 355 of file mg2svg.h.

MISTRING MGD::DEVICE_SVG::Encode64 const UINT8 buff,
int  len
[private]
 

ERRVALUE MGD::DEVICE_SVG::EndElement  ) 
 

ERRVALUE MGD::DEVICE_SVG::EndGroup GRE_GROUP gp  ) 
 

ERRVALUE MGD::DEVICE_SVG::EndLayer  ) 
 

MISTRING MGD::DEVICE_SVG::Escape const MISTRING str  ) 
 

Parameters:
str  method returns the string in webworthy form. & and <, > symbols are escaped

INT32 MGD::DEVICE_SVG::FilterInList double  x,
double  y,
const COLOR color,
double  opacity,
double  height
[private]
 

int MGD::DEVICE_SVG::FindCurrentStyle const MISTRING code  )  [private]
 

int MGD::DEVICE_SVG::FindEntity const MISTRING code  )  [private]
 

Parameters:
code  allowing strings to be referred to using xml entities

void MGD::DEVICE_SVG::FreePrivateData  )  [private]
 

int MGD::DEVICE_SVG::GetCurveIndex  )  [inline, private]
 

Definition at line 747 of file mg2svg.h.

DOUBLE MGD::DEVICE_SVG::GetGreatestCommonDivisor DOUBLE  a,
DOUBLE  b
[private]
 

DOUBLE MGD::DEVICE_SVG::GetLeastCommonMultiple DOUBLE  a,
DOUBLE  b
[private]
 

ERRVALUE MGD::DEVICE_SVG::GetString STRUTF8 str  ) 
 

Parameters:
str  svg's are really UTF8.. returns EDeviceNotClosed Error if not device not closed.

void MGD::DEVICE_SVG::IncCurveIndex  )  [inline, private]
 

Definition at line 743 of file mg2svg.h.

void MGD::DEVICE_SVG::IncludeLayerControls bool  include  )  [inline]
 

Definition at line 392 of file mg2svg.h.

void MGD::DEVICE_SVG::InitializeDevice UINT32  height,
UINT32  width
 

ERRVALUE MGD::DEVICE_SVG::InsertFile FILE_RAW file1,
FILE_RAW file2,
UINT32  offset
[private]
 

bool MGD::DEVICE_SVG::IsLatLon SPATREF::COORDREFSYS  CoordRefSys  )  [private]
 

void MGD::DEVICE_SVG::LinkExternalStyleSheet bool  external  )  [inline]
 

Definition at line 412 of file mg2svg.h.

void MGD::DEVICE_SVG::LinkStylesheet bool  link  )  [inline]
 

Definition at line 380 of file mg2svg.h.

int MGD::DEVICE_SVG::PortWrite const UINT8 buf,
int  len
[private]
 

int MGD::DEVICE_SVG::PortWrite const char *  buf,
int  len
[inline, private]
 

Definition at line 841 of file mg2svg.h.

int MGD::DEVICE_SVG::putByte int  x  )  [private]
 

int MGD::DEVICE_SVG::SendDouble DOUBLE  num  )  [private]
 

int MGD::DEVICE_SVG::SendEOL  )  [private]
 

int MGD::DEVICE_SVG::SendGroupHeader MGD::CONTEXT_SVG gc,
bool  isGroup,
const MISTRING name
[private]
 

int MGD::DEVICE_SVG::SendLong INT32  num  )  [private]
 

int MGD::DEVICE_SVG::SendString const MISTRING str,
UINT32  flags
[private]
 

int MGD::DEVICE_SVG::SendString const char *  str,
UINT32  flags
[private]
 

int MGD::DEVICE_SVG::SendXYCmdDouble double  x,
double  y,
const char *  cmd,
UINT32  flags
[private]
 

int MGD::DEVICE_SVG::SendXYCmdUnscaledLong INT32  x,
INT32  y,
const char *  cmd,
UINT32  flags
[private]
 

void MGD::DEVICE_SVG::SetDataTipOpacity DOUBLE  opacity  )  [inline]
 

Definition at line 448 of file mg2svg.h.

void MGD::DEVICE_SVG::SetDisplayToView const Mat3x3  matrix  ) 
 

void MGD::DEVICE_SVG::SetEventsForWebClient bool  webscript  )  [inline]
 

Parameters:
webscript  not really using this yet

Definition at line 351 of file mg2svg.h.

ERRVALUE MGD::DEVICE_SVG::SetFillPattern MGD::CONTEXT_SVG gc  )  [private]
 

void MGD::DEVICE_SVG::SetForIllustrator bool  unscaled  )  [inline]
 

optimize for Illustrator no scaling.

Definition at line 346 of file mg2svg.h.

void MGD::DEVICE_SVG::SetHighlightColor COLOR  color  )  [inline]
 

Definition at line 460 of file mg2svg.h.

void MGD::DEVICE_SVG::SetIncludeMeasurementTools bool  include  )  [inline]
 

Definition at line 396 of file mg2svg.h.

void MGD::DEVICE_SVG::SetJPEGQuality int  quality  )  [inline]
 

Definition at line 422 of file mg2svg.h.

void MGD::DEVICE_SVG::SetLinkToScripts bool  link  )  [inline]
 

Definition at line 408 of file mg2svg.h.

void MGD::DEVICE_SVG::SetResolution UINT32  resolution  )  [inline]
 

Definition at line 371 of file mg2svg.h.

void MGD::DEVICE_SVG::SetSelfValidate