[mapguide-commits] r9358 - sandbox/jng/common_decouple_v2/Common/Renderers
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Mar 5 05:19:22 PST 2018
Author: jng
Date: 2018-03-05 05:19:22 -0800 (Mon, 05 Mar 2018)
New Revision: 9358
Modified:
sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.cpp
sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.h
Log:
Don't #ifdef out the methods in AGGRenderer.h just #ifdef out their method implementations.
Modified: sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.cpp
===================================================================
--- sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.cpp 2018-03-04 15:49:24 UTC (rev 9357)
+++ sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.cpp 2018-03-05 13:19:22 UTC (rev 9358)
@@ -2901,10 +2901,10 @@
#endif
}
-#ifdef WITH_DWF
//////////////////////////////////////////////////////////////////////////////
void AGGRenderer::AddW2DContent(RS_InputStream* in, CSysTransformer* xformer, const RS_String& w2dfilter)
{
+#ifdef WITH_DWF
WT_Result result;
// initialize state variables, which are needed by W2D rewriter callbacks
@@ -2941,6 +2941,7 @@
// clear the output image if we set it in this function
if (!m_bIsSymbolW2D)
m_imw2d = NULL;
+#endif
}
@@ -2947,6 +2948,7 @@
//////////////////////////////////////////////////////////////////////////////
void AGGRenderer::SetActions(WT_File& file)
{
+#ifdef WITH_DWF
file.set_stream_open_action (agr_open);
file.set_stream_close_action(agr_close);
file.set_stream_read_action (agr_read);
@@ -3023,6 +3025,7 @@
file.set_gouraud_polytriangle_action(agr_process_gouraudPolytriangle);
file.set_gouraud_polyline_action(agr_process_gouraudPolyline);
+#endif
}
@@ -3046,6 +3049,7 @@
int numpts,
bool checkInBounds)
{
+#ifdef WITH_DWF
// This transformer may have been modified if a Viewport
// opcode was encountered in the source W2D. This is needed for
// support for symbols from ACAD, which do not use the
@@ -3147,6 +3151,9 @@
}
return spLB.release();
+#else
+ return NULL;
+#endif
}
@@ -3156,8 +3163,9 @@
// of the destination DWF or be much larger, we need to take that scaling
// into account when carrying over things like line weight, font height,
// etc. This helper function determines and applies that scale.
-double AGGRenderer::ScaleW2DNumber(WT_File& file, WT_Integer32 number)
+double AGGRenderer::ScaleW2DNumber(WT_File& file, long number)
{
+#ifdef WITH_DWF
WT_Matrix xform = file.desired_rendition().drawing_info().units().dwf_to_application_adjoint_transform();
double scale1 = 1.0 / xform(0, 0); // div because we need inverse
@@ -3179,6 +3187,9 @@
dDstSpace *= m_xform.x0;
return dDstSpace;
+#else
+ return 0.0;
+#endif
}
@@ -3185,6 +3196,7 @@
//////////////////////////////////////////////////////////////////////////////
void AGGRenderer::UpdateSymbolTrans(WT_File& /*file*/, WT_Viewport& viewport)
{
+#ifdef WITH_DWF
_ASSERT(m_xformer);
RS_Bounds alternate_extent(0.0, 0.0, -1.0, -1.0);
@@ -3251,6 +3263,7 @@
m_bHaveViewport = true;
}
}
+#endif
}
@@ -3260,5 +3273,4 @@
//// END of DWF Rewrite and related code
////
//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-#endif
\ No newline at end of file
+//////////////////////////////////////////////////////////////
\ No newline at end of file
Modified: sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.h
===================================================================
--- sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.h 2018-03-04 15:49:24 UTC (rev 9357)
+++ sandbox/jng/common_decouple_v2/Common/Renderers/AGGRenderer.h 2018-03-05 13:19:22 UTC (rev 9358)
@@ -32,14 +32,10 @@
#include "RS_FontEngine.h"
#include "BIDIConverter.h"
-#ifdef WITH_DWF
-
class WT_File;
class WT_Viewport;
class WT_Logical_Point;
-#endif
-
struct RS_Font;
class agg_context;
@@ -329,7 +325,6 @@
public:
/*Do not export from DLL*/ void* GetImage() { return c(); } //target map image
/*Do not export from DLL*/ void* GetW2DTargetImage() { return m_imw2d; } //target image for W2D rewriter
-#ifdef WITH_DWF
/*Do not export from DLL*/ bool IsViewportSet() { return m_bHaveViewport; }
/*Do not export from DLL*/ bool IsSymbolW2D() { return m_bIsSymbolW2D; }
/*Do not export from DLL*/ void UpdateSymbolTrans(WT_File& file, WT_Viewport& viewport);
@@ -343,13 +338,10 @@
int numpts,
bool checkInBounds);
/*Do not export from DLL*/ double ScaleW2DNumber(WT_File& file, long number);
-#endif
private:
-#ifdef WITH_DWF
void AddW2DContent(RS_InputStream* in, CSysTransformer* xformer, const RS_String& w2dfilter);
void SetActions(WT_File& file);
-#endif
//////
//State variables for when DWFRenderer is used to keep
//information during DWF rewriting process for symbols
More information about the mapguide-commits
mailing list