[mapguide-commits] r9559 - in trunk/MgDev: . Common/MapGuideCommon/Services Common/MapGuideCommon/System Common/Renderers Server/src/Core Server/src/Services/Rendering Server/src/Services/Tile Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Jun 22 01:42:36 PDT 2019


Author: jng
Date: 2019-06-22 01:42:36 -0700 (Sat, 22 Jun 2019)
New Revision: 9559

Removed:
   trunk/MgDev/Common/Renderers/GDFillPatterns.cpp
   trunk/MgDev/Common/Renderers/GDFillPatterns.h
   trunk/MgDev/Common/Renderers/GDRenderer.cpp
   trunk/MgDev/Common/Renderers/GDRenderer.h
   trunk/MgDev/Common/Renderers/GDW2DRewriter.cpp
   trunk/MgDev/Common/Renderers/GDW2DRewriter.h
   trunk/MgDev/Common/Renderers/complex_polygon_gd.cpp
   trunk/MgDev/Common/Renderers/complex_polygon_gd.h
Modified:
   trunk/MgDev/
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.h
   trunk/MgDev/Common/MapGuideCommon/Services/RenderingService.h
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
   trunk/MgDev/Common/Renderers/Renderers.vcxproj
   trunk/MgDev/Common/Renderers/Renderers.vcxproj.filters
   trunk/MgDev/Server/src/Core/serverconfig.ini
   trunk/MgDev/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp
   trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
   trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.h
   trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
   trunk/MgDev/Server/src/Services/Tile/ServerTileService.h
   trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.cpp
   trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.h
   trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.cpp
   trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.h
   trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
Log:
Implement MapGuide RFC 174. Farewell GD renderer.

Index: trunk/MgDev
===================================================================
--- trunk/MgDev	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev	2019-06-22 08:42:36 UTC (rev 9559)

Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -21,6 +21,7 ##
 /sandbox/jng/geos34x:8256-8259
 /sandbox/jng/ogc:9240-9255
 /sandbox/jng/php56x:8975-8985
+/sandbox/jng/remove_gd:9548-9558
 /sandbox/jng/rfc155:8872-8884
 /sandbox/jng/simplify:8814-9141
 /sandbox/jng/tiling:8174-8208
Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1407,7 +1407,6 @@
 MgByteReader* MgProxyRenderingService::RenderTileFromMetaTile(
     MgMap* map,
     MgMetatile* metaTile,
-    CREFSTRING rendererName,
     INT32 subTileX,
     INT32 subTileY)
 {
@@ -1415,14 +1414,13 @@
     cmd.ExecuteCommand(m_connProp,                      // Connection
         MgCommand::knObject,                            // Return type expected
         MgRenderingServiceOpId::RenderTileFromMetaTile, // Command Code
-        9,                                              // No of arguments
+        4,                                              // No of arguments
         Rendering_Service,                              // Service Id
-        BUILD_VERSION(4,0,0),                         // Operation version
+        BUILD_VERSION(4,0,0),                           // Operation version
         MgCommand::knObject, map,                       // Argument#1
         MgCommand::knObject, metaTile,                  // Argument#2
-        MgCommand::knString, &rendererName,             // Argument#3
-        MgCommand::knInt32, subTileX,                   // Argument#4
-        MgCommand::knInt32, subTileY,                   // Argument#5
+        MgCommand::knInt32, subTileX,                   // Argument#3
+        MgCommand::knInt32, subTileY,                   // Argument#4
         MgCommand::knNone);                             // End of arguments
 
     SetWarning(cmd.GetWarningObject());

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyRenderingService.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1233,9 +1233,6 @@
     /// \param metaTile
     /// Input
     /// The meta-tile from which a subtile is being requested for
-    /// \param rendererName
-    /// Input
-    /// The name of the renderer to create for sub-tile slicing
     /// \param subTileX
     /// Input
     /// The x sub-tile coordinate of the meta-tile to request
@@ -1247,7 +1244,7 @@
     /// The requested sub-tile
     ///
     /// \since 4.0
-    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, CREFSTRING rendererName, INT32 subTileX, INT32 subTileY);
+    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, INT32 subTileX, INT32 subTileY);
 
 protected:
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/RenderingService.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/RenderingService.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/MapGuideCommon/Services/RenderingService.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1249,9 +1249,6 @@
     /// \param metaTile
     /// Input
     /// The meta-tile from which a subtile is being requested for
-    /// \param rendererName
-    /// Input
-    /// The name of the renderer to create for sub-tile slicing
     /// \param subTileX
     /// Input
     /// The x sub-tile coordinate of the meta-tile to request
@@ -1263,7 +1260,7 @@
     /// The requested sub-tile
     ///
     /// \since 4.0
-    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, CREFSTRING rendererName, INT32 subTileX, INT32 subTileY) = 0;
+    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, INT32 subTileX, INT32 subTileY) = 0;
 
 protected:
 

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -170,8 +170,6 @@
 const STRING MgConfigProperties::DefaultGeneralPropertyWmsDocumentPath                      = L"Wms/";
 const STRING MgConfigProperties::GeneralPropertyWorkerThreadPoolSize                        = L"WorkerThreadPoolSize"; // for internal use only
 const INT32  MgConfigProperties::DefaultGeneralPropertyWorkerThreadPoolSize                 = 1;
-const STRING MgConfigProperties::GeneralPropertyRenderer                                    = L"Renderer";
-const STRING MgConfigProperties::DefaultGeneralPropertyRenderer                             = L"GD";
 const STRING MgConfigProperties::GeneralPropertyFailoverRetryTime                           = L"FailoverRetryTime"; // for internal use only
 const INT32  MgConfigProperties::DefaultGeneralPropertyFailoverRetryTime                    = 60;
 const STRING MgConfigProperties::GeneralPropertyPreCacheMaps                                = L"PreCacheMaps";

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -142,10 +142,6 @@
     static const STRING GeneralPropertyWmsDocumentPath;                 /// value("WmsDocumentPath")
     static const STRING DefaultGeneralPropertyWmsDocumentPath;          /// value("Wms/")
 
-    /// Sets desired image renderer
-    static const STRING GeneralPropertyRenderer;                        /// value("Renderer")
-    static const STRING DefaultGeneralPropertyRenderer;                 /// value("GD")
-
     /// Sets the maps to precache
     static const STRING GeneralPropertyPreCacheMaps;                    /// value("PreCacheMaps")
     static const STRING DefaultGeneralPropertyPreCacheMaps;             /// value("")

Deleted: trunk/MgDev/Common/Renderers/GDFillPatterns.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/GDFillPatterns.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDFillPatterns.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,3056 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "Renderers.h"
-#include "GDFillPatterns.h"
-
-
-// All these definitions were taken from Envision 9 code which took them from
-// OnSite 6 code
-
-//------------------------------------------------------------------------------
-// AutoCAD, and World/MapInfo fill pattern definitions. The fill patterns are
-// defined as monochrome bitmaps (i.e., one bit per pixel), with the following
-// properties: rows of bits are byte aligned rows, and the bitmaps are defined
-// bottom-up.  The AutoCAD fill pattern definitions were supplied to us by the
-// Actrix SWD team.
-//------------------------------------------------------------------------------
-
-
-static unsigned char SOLID_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
-static unsigned char NONE_BITS[] = {
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ANGLE_BITS[] = {
-                                0xff, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-                                0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-                                0x00, 0x00, 0x00, 0x00};
-
-static unsigned char BOX_BITS[] = {
-                                0xc1, 0x3f, 0xf8, 0x01, 0x41, 0x20, 0x08, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0xc1, 0x3f, 0xf8, 0x01, 0x41, 0x00, 0x00, 0x00,
-                                0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-                                0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-                                0x41, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x0f, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x7f, 0xe0, 0x0f, 0x00,
-                                0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-                                0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-                                0x41, 0x00, 0x00, 0x00};
-
-static unsigned char BRASS_BITS[] = {
-                                0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00};
-
-static unsigned char BRICK_BITS[] = {
-                                0xff, 0xff, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00,
-                                0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-                                0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02,
-                                0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00,
-                                0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,
-                                0x00, 0x02, 0x00};
-
-static unsigned char BRSTONE_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
-                                0x20, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
-                                0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0xe0,
-                                0x01, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
-                                0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x20, 0x01,
-                                0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00,
-                                0x20, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
-                                0x00, 0x00, 0x20, 0x01, 0xff, 0xff, 0xff, 0xff,
-                                0x0f, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x78,
-                                0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
-                                0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00,
-                                0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00,
-                                0x48, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00,
-                                0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x78,
-                                0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00};
-
-static unsigned char CLAY_BITS[] = {
-                                0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff,
-                                0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00};
-
-static unsigned char CORK_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x80,
-                                0x05, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0xa0,
-                                0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xa8, 0x00,
-                                0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x2a, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x80, 0x0a, 0x00,
-                                0x00, 0x40, 0x05, 0x00, 0x00, 0xa0, 0x02, 0x00,
-                                0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x50, 0x01, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
-                                0x54, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00};
-
-static unsigned char CROSS_BITS[] = {
-                                0x7f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00,
-                                0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80,
-                                0x00, 0x00, 0x80, 0x00, 0x00, 0xf0, 0x07, 0x00,
-                                0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-                                0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00};
-
-static unsigned char DASH_BITS[] = {
-                                0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xc1, 0x0f, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char DOLMIT_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x02,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x02, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char DOTS_BITS[] = {
-                                0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char EARTH_BITS[] = {
-                                0xff, 0xff, 0x7f, 0x02, 0x02, 0x02, 0x00, 0x00,
-                                0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
-                                0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00,
-                                0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
-                                0xff, 0xff, 0x7f, 0x02, 0x02, 0x02, 0x00, 0x00,
-                                0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
-                                0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00,
-                                0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02,
-                                0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0xff, 0xff,
-                                0x7f, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x08, 0x08, 0x08, 0x02, 0x02, 0x02,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x00, 0x00, 0x00, 0x09, 0x08, 0xc8, 0xff,
-                                0xff, 0x0f, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00,
-                                0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x00, 0x00, 0x00, 0x09, 0x08, 0xc8, 0xff,
-                                0xff, 0x0f, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00,
-                                0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00,
-                                0x00, 0x00, 0x09, 0x08, 0xc8, 0xff, 0xff, 0x0f,
-                                0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x08, 0x08,
-                                0x08, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02,
-                                0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02};
-
-static unsigned char ESCHER_BITS[] = {
-                                0xf9, 0xff, 0xff, 0x3f, 0x12, 0x00, 0x20, 0x00,
-                                0x12, 0x00, 0x40, 0x3f, 0x24, 0x00, 0xc0, 0x30,
-                                0xe5, 0xff, 0xff, 0x10, 0x89, 0x02, 0x40, 0x08,
-                                0x8a, 0x02, 0x40, 0x08, 0x52, 0x04, 0x20, 0x04,
-                                0x61, 0x04, 0x20, 0x04, 0x3f, 0x08, 0x10, 0x02,
-                                0x42, 0x08, 0x10, 0x22, 0x42, 0x10, 0x08, 0x21,
-                                0x84, 0x10, 0x84, 0x10, 0x04, 0x21, 0x84, 0x10,
-                                0x08, 0x21, 0x42, 0x08, 0x10, 0x42, 0x42, 0x08,
-                                0x10, 0x42, 0x21, 0x04, 0x20, 0x84, 0x21, 0x04,
-                                0x20, 0x84, 0x1f, 0x02, 0x40, 0x08, 0x29, 0x02,
-                                0x80, 0x10, 0x49, 0x01, 0x80, 0x10, 0x45, 0x01,
-                                0xff, 0xa1, 0xf4, 0x3f, 0x80, 0xa1, 0x12, 0x00,
-                                0x80, 0x7e, 0x0a, 0x00, 0x40, 0x00, 0x09, 0x00,
-                                0x40, 0x00, 0x05, 0x00, 0xff, 0xff, 0xfc, 0x3f,
-                                0x40, 0x00, 0x09, 0x00, 0x80, 0x7e, 0x09, 0x00,
-                                0x80, 0xa1, 0x12, 0x00, 0xff, 0xa1, 0xf2, 0x3f,
-                                0x80, 0x10, 0x45, 0x01, 0x80, 0x10, 0x45, 0x01,
-                                0x40, 0x08, 0x29, 0x02, 0x20, 0x84, 0x1f, 0x02,
-                                0x20, 0x84, 0x11, 0x04, 0x10, 0x42, 0x21, 0x04,
-                                0x10, 0x42, 0x22, 0x08, 0x08, 0x21, 0x42, 0x08,
-                                0x04, 0x21, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10,
-                                0x42, 0x10, 0x08, 0x21, 0x42, 0x08, 0x10, 0x21,
-                                0x3f, 0x08, 0x10, 0x02, 0x21, 0x04, 0x20, 0x02,
-                                0x52, 0x04, 0x20, 0x04, 0x4a, 0x02, 0x40, 0x08,
-                                0x89, 0x02, 0x40, 0x08, 0xe5, 0xff, 0xff, 0x10,
-                                0x24, 0x00, 0xc0, 0x30, 0x12, 0x00, 0x40, 0x3f,
-                                0x12, 0x00, 0x20, 0x00};
-
-static unsigned char FLEX_BITS[] = {
-                                0xff, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x00, 0x00, 0x08};
-
-static unsigned char GRASS_BITS[] = {
-                                0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-                                0x00, 0x08, 0x05, 0x00, 0x00, 0x00, 0x04, 0x09,
-                                0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
-                                0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-                                0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00,
-                                0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00};
-
-static unsigned char GRATE_BITS[] = {
-                                0xff, 0xff, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00,
-                                0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00};
-
-static unsigned char HEX_BITS[] = {
-                                0x7f, 0x00, 0xfc, 0x00, 0x00, 0x80, 0x00, 0x00,
-                                0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00,
-                                0x01, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00,
-                                0x02, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x01,
-                                0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x02,
-                                0x80, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00,
-                                0x00, 0x04, 0x7f, 0x00, 0xfc, 0x00, 0x00, 0x00,
-                                0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01,
-                                0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00,
-                                0x01, 0x02, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00,
-                                0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01,
-                                0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
-                                0x00, 0x02, 0x01, 0x00};
-
-static unsigned char HONEY_BITS[] = {
-                                0x7f, 0x00, 0x00, 0x80, 0x00, 0x02, 0x80, 0x00,
-                                0x02, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00,
-                                0xfe, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01,
-                                0x80, 0x00, 0x02, 0x80, 0x00, 0x02};
-
-static unsigned char HOUND_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x3f, 0x10, 0x04, 0x80,
-                                0x20, 0x08, 0x04, 0x01, 0x00, 0x08, 0x02, 0x41,
-                                0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80, 0x20,
-                                0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01, 0x00,
-                                0x08, 0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10,
-                                0x00, 0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08,
-                                0x04, 0x01, 0x00, 0x08, 0x02, 0x41, 0x00, 0x00,
-                                0x82, 0x40, 0x10, 0x00, 0x80, 0x20, 0x10, 0x04,
-                                0x00, 0x20, 0x08, 0x04, 0x01, 0x00, 0x08, 0x02,
-                                0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80,
-                                0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01,
-                                0x00, 0x08, 0x02, 0x41, 0x00, 0x00, 0x82, 0x40,
-                                0x10, 0x00, 0x80, 0x20, 0x10, 0x04, 0x00, 0x20,
-                                0x08, 0x04, 0x01, 0x00, 0x08, 0xfe, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x20, 0x08, 0x04, 0x01, 0x00, 0x08,
-                                0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00,
-                                0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04,
-                                0x01, 0x00, 0x08, 0x02, 0x41, 0x00, 0x00, 0x82,
-                                0x40, 0x10, 0x00, 0x80, 0x20, 0x10, 0x04, 0x00,
-                                0x20, 0x08, 0x04, 0x01, 0x00, 0x08, 0x02, 0x41,
-                                0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80, 0x20,
-                                0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01, 0x00,
-                                0x08, 0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10,
-                                0x00, 0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08,
-                                0x04, 0x01, 0x00, 0x08, 0x02, 0x41, 0x00, 0x00,
-                                0x82, 0x40, 0x10, 0x00, 0x80, 0x20, 0x10, 0x04,
-                                0x00, 0x20, 0x08, 0x04, 0x01, 0x00, 0x08, 0x02,
-                                0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80,
-                                0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01,
-                                0x00, 0x08, 0x02, 0x41, 0x00, 0xf8, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x01, 0x00, 0x08, 0x02, 0x41, 0x00,
-                                0x00, 0x82, 0x40, 0x10, 0x00, 0x80, 0x20, 0x10,
-                                0x04, 0x00, 0x20, 0x08, 0x04, 0x01, 0x00, 0x08,
-                                0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00,
-                                0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04,
-                                0x01, 0x00, 0x08, 0x02, 0x41, 0x00, 0x00, 0x82,
-                                0x40, 0x10, 0x00, 0x80, 0x20, 0x10, 0x04, 0x00,
-                                0x20, 0x08, 0x04, 0x01, 0x00, 0x08, 0x02, 0x41,
-                                0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80, 0x20,
-                                0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01, 0x00,
-                                0x08, 0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10,
-                                0x00, 0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08,
-                                0x04, 0xff, 0xff, 0xff, 0x03, 0x41, 0x00, 0x00,
-                                0x82, 0x40, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x08, 0x02,
-                                0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00, 0x80,
-                                0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04, 0x01,
-                                0x00, 0x08, 0x02, 0x41, 0x00, 0x00, 0x82, 0x40,
-                                0x10, 0x00, 0x80, 0x20, 0x10, 0x04, 0x00, 0x20,
-                                0x08, 0x04, 0x01, 0x00, 0x08, 0x02, 0x41, 0x00,
-                                0x00, 0x82, 0x40, 0x10, 0x00, 0x80, 0x20, 0x10,
-                                0x04, 0x00, 0x20, 0x08, 0x04, 0x01, 0x00, 0x08,
-                                0x02, 0x41, 0x00, 0x00, 0x82, 0x40, 0x10, 0x00,
-                                0x80, 0x20, 0x10, 0x04, 0x00, 0x20, 0x08, 0x04,
-                                0x01, 0x00, 0x08, 0x02, 0x41, 0x00, 0x00, 0x82,
-                                0x40, 0x10, 0x00, 0x80, 0x20, 0x10, 0x04, 0x00,
-                                0x20, 0x08, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x0f, 0x82, 0x40, 0x10, 0x04, 0x80, 0xe0,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x00,
-                                0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10,
-                                0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08,
-                                0x04, 0x41, 0x00, 0x00, 0x02, 0x41, 0x10, 0x00,
-                                0x80, 0x40, 0x10, 0x04, 0x00, 0x20, 0x10, 0x04,
-                                0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00, 0x02,
-                                0x41, 0x10, 0x00, 0x80, 0x40, 0x10, 0x04, 0x00,
-                                0x20, 0x10, 0x04, 0x01, 0x00, 0x08, 0x04, 0x41,
-                                0x00, 0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40,
-                                0x10, 0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00,
-                                0x08, 0x04, 0x41, 0x00, 0x00, 0x02, 0x41, 0x10,
-                                0x00, 0x80, 0x40, 0x10, 0x04, 0x00, 0x20, 0x10,
-                                0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00,
-                                0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10, 0x04,
-                                0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08, 0x04,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x1f, 0x04, 0x00, 0x20, 0x10, 0x04, 0x81,
-                                0xff, 0xff, 0xff, 0x41, 0x00, 0x00, 0x02, 0x41,
-                                0x10, 0x00, 0x80, 0x40, 0x10, 0x04, 0x00, 0x20,
-                                0x10, 0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00,
-                                0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10,
-                                0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08,
-                                0x04, 0x41, 0x00, 0x00, 0x02, 0x41, 0x10, 0x00,
-                                0x80, 0x40, 0x10, 0x04, 0x00, 0x20, 0x10, 0x04,
-                                0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00, 0x02,
-                                0x41, 0x10, 0x00, 0x80, 0x40, 0x10, 0x04, 0x00,
-                                0x20, 0x10, 0x04, 0x01, 0x00, 0x08, 0x04, 0x41,
-                                0x00, 0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40,
-                                0x10, 0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00,
-                                0x08, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x10,
-                                0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00,
-                                0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10, 0x04,
-                                0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08, 0x04,
-                                0x41, 0x00, 0x00, 0x02, 0x41, 0x10, 0x00, 0x80,
-                                0x40, 0x10, 0x04, 0x00, 0x20, 0x10, 0x04, 0x01,
-                                0x00, 0x08, 0x04, 0x41, 0x00, 0x00, 0x02, 0x41,
-                                0x10, 0x00, 0x80, 0x40, 0x10, 0x04, 0x00, 0x20,
-                                0x10, 0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00,
-                                0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10,
-                                0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08,
-                                0x04, 0x41, 0x00, 0x00, 0x02, 0x41, 0x10, 0x00,
-                                0x80, 0x40, 0x10, 0x04, 0x00, 0x20, 0x10, 0x04,
-                                0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00, 0xfe,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x04, 0x41,
-                                0x00, 0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40,
-                                0x10, 0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00,
-                                0x08, 0x04, 0x41, 0x00, 0x00, 0x02, 0x41, 0x10,
-                                0x00, 0x80, 0x40, 0x10, 0x04, 0x00, 0x20, 0x10,
-                                0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00, 0x00,
-                                0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10, 0x04,
-                                0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08, 0x04,
-                                0x41, 0x00, 0x00, 0x02, 0x41, 0x10, 0x00, 0x80,
-                                0x40, 0x10, 0x04, 0x00, 0x20, 0x10, 0x04, 0x01,
-                                0x00, 0x08, 0x04, 0x41, 0x00, 0x00, 0x02, 0x41,
-                                0x10, 0x00, 0x80, 0x40, 0x10, 0x04, 0x00, 0x20,
-                                0x10, 0x04, 0x01, 0x00, 0x08, 0x04, 0x41, 0x00,
-                                0x00, 0x02, 0x41, 0x10, 0x00, 0x80, 0x40, 0x10,
-                                0x04, 0x00, 0x20, 0x10, 0x04, 0x01, 0x00, 0x08,
-                                0x04, 0x41, 0x20, 0x00, 0x02, 0x41, 0x10, 0xf8,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x41, 0x20, 0x00, 0x00,
-                                0x41, 0x10, 0x08, 0x00, 0x40, 0x10, 0x04, 0x02,
-                                0x00, 0x10, 0x04, 0x81, 0x00, 0x00, 0x04, 0x41,
-                                0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40,
-                                0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00,
-                                0x00, 0x04, 0x41, 0x20, 0x00, 0x00, 0x41, 0x10,
-                                0x08, 0x00, 0x40, 0x10, 0x04, 0x02, 0x00, 0x10,
-                                0x04, 0x81, 0x00, 0x00, 0x04, 0x41, 0x20, 0x00,
-                                0x00, 0x41, 0x10, 0x08, 0x00, 0x40, 0x10, 0x04,
-                                0x02, 0x00, 0x10, 0x04, 0x81, 0x00, 0x00, 0x04,
-                                0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00,
-                                0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81,
-                                0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0x03, 0x41,
-                                0x10, 0x08, 0x00, 0x40, 0xf0, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x20,
-                                0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40, 0x10,
-                                0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00, 0x00,
-                                0x04, 0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08,
-                                0x00, 0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04,
-                                0x81, 0x00, 0x00, 0x04, 0x41, 0x20, 0x00, 0x00,
-                                0x41, 0x10, 0x08, 0x00, 0x40, 0x10, 0x04, 0x02,
-                                0x00, 0x10, 0x04, 0x81, 0x00, 0x00, 0x04, 0x41,
-                                0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40,
-                                0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00,
-                                0x00, 0x04, 0x41, 0x20, 0x00, 0x00, 0x41, 0x10,
-                                0x08, 0x00, 0x40, 0x10, 0x04, 0x02, 0x00, 0x10,
-                                0x04, 0x81, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x0f, 0x00, 0x40, 0x10, 0x04,
-                                0x02, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00,
-                                0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81,
-                                0x00, 0x00, 0x04, 0x41, 0x20, 0x00, 0x00, 0x41,
-                                0x10, 0x08, 0x00, 0x40, 0x10, 0x04, 0x02, 0x00,
-                                0x10, 0x04, 0x81, 0x00, 0x00, 0x04, 0x41, 0x20,
-                                0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40, 0x10,
-                                0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00, 0x00,
-                                0x04, 0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08,
-                                0x00, 0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04,
-                                0x81, 0x00, 0x00, 0x04, 0x41, 0x20, 0x00, 0x00,
-                                0x41, 0x10, 0x08, 0x00, 0x40, 0x10, 0x04, 0x02,
-                                0x00, 0x10, 0x04, 0x81, 0x00, 0x00, 0x04, 0x41,
-                                0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40,
-                                0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00,
-                                0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x1f, 0x04, 0x02, 0x00, 0x10,
-                                0x04, 0x81, 0xff, 0xff, 0xff, 0x41, 0x20, 0x00,
-                                0x00, 0x41, 0x10, 0x08, 0x00, 0x40, 0x10, 0x04,
-                                0x02, 0x00, 0x10, 0x04, 0x81, 0x00, 0x00, 0x04,
-                                0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08, 0x00,
-                                0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04, 0x81,
-                                0x00, 0x00, 0x04, 0x41, 0x20, 0x00, 0x00, 0x41,
-                                0x10, 0x08, 0x00, 0x40, 0x10, 0x04, 0x02, 0x00,
-                                0x10, 0x04, 0x81, 0x00, 0x00, 0x04, 0x41, 0x20,
-                                0x00, 0x00, 0x41, 0x10, 0x08, 0x00, 0x40, 0x10,
-                                0x04, 0x02, 0x00, 0x10, 0x04, 0x81, 0x00, 0x00,
-                                0x04, 0x41, 0x20, 0x00, 0x00, 0x41, 0x10, 0x08,
-                                0x00, 0x40, 0x10, 0x04, 0x02, 0x00, 0x10, 0x04,
-                                0x81, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x3f, 0x10, 0x04, 0x81, 0x20, 0x00, 0x04, 0x41,
-                                0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02, 0x00,
-                                0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81, 0x20,
-                                0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10,
-                                0x08, 0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00,
-                                0x04, 0x81, 0x20, 0x00, 0x00, 0x41, 0x20, 0x08,
-                                0x00, 0x40, 0x10, 0x08, 0x02, 0x00, 0x10, 0x04,
-                                0x82, 0x00, 0x00, 0x04, 0x81, 0x20, 0x00, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02,
-                                0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81,
-                                0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40,
-                                0x10, 0x08, 0x02, 0x00, 0x10, 0x04, 0x82, 0x00,
-                                0x00, 0x04, 0x81, 0x20, 0x00, 0x00, 0x41, 0x20,
-                                0x08, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x00,
-                                0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08,
-                                0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04,
-                                0x81, 0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x40, 0x10, 0x08, 0x02, 0x00, 0x10, 0x04, 0x82,
-                                0x00, 0x00, 0x04, 0x81, 0x20, 0x00, 0x00, 0x41,
-                                0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02, 0x00,
-                                0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81, 0x20,
-                                0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10,
-                                0x08, 0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00,
-                                0x04, 0x81, 0x20, 0x00, 0x00, 0x41, 0x20, 0x08,
-                                0x00, 0x40, 0x10, 0x08, 0x02, 0x00, 0x10, 0x04,
-                                0x82, 0x00, 0x00, 0x04, 0x81, 0x20, 0x00, 0x00,
-                                0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02,
-                                0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81,
-                                0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40,
-                                0x10, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x20,
-                                0x08, 0x00, 0x40, 0x10, 0x08, 0x02, 0x00, 0x10,
-                                0x04, 0x82, 0x00, 0x00, 0x04, 0x81, 0x20, 0x00,
-                                0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08,
-                                0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04,
-                                0x81, 0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x40, 0x10, 0x08, 0x02, 0x00, 0x10, 0x04, 0x82,
-                                0x00, 0x00, 0x04, 0x81, 0x20, 0x00, 0x00, 0x41,
-                                0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02, 0x00,
-                                0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81, 0x20,
-                                0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10,
-                                0x08, 0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00,
-                                0x04, 0x81, 0x20, 0x00, 0x00, 0xff, 0xff, 0xff,
-                                0x03, 0x40, 0x10, 0x08, 0x02, 0x00, 0xf0, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08, 0x02,
-                                0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04, 0x81,
-                                0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00, 0x40,
-                                0x10, 0x08, 0x02, 0x00, 0x10, 0x04, 0x82, 0x00,
-                                0x00, 0x04, 0x81, 0x20, 0x00, 0x00, 0x41, 0x20,
-                                0x08, 0x00, 0x40, 0x10, 0x08, 0x02, 0x00, 0x10,
-                                0x04, 0x82, 0x00, 0x00, 0x04, 0x81, 0x20, 0x00,
-                                0x00, 0x41, 0x20, 0x08, 0x00, 0x40, 0x10, 0x08,
-                                0x02, 0x00, 0x10, 0x04, 0x82, 0x00, 0x00, 0x04,
-                                0x81, 0x20, 0x00, 0x00, 0x41, 0x20, 0x08, 0x00,
-                                0x40, 0x10, 0x08, 0x02, 0x00, 0x10, 0x04, 0x82,
-                                0x00, 0x00, 0x04, 0x81, 0x20, 0x00, 0x00, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x82, 0x00,
-                                0x10, 0x04, 0x82, 0xe0, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10,
-                                0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00,
-                                0x00, 0x81, 0x20, 0x08, 0x00, 0x40, 0x20, 0x08,
-                                0x02, 0x00, 0x10, 0x08, 0x82, 0x00, 0x00, 0x04,
-                                0x82, 0x20, 0x00, 0x00, 0x81, 0x20, 0x08, 0x00,
-                                0x40, 0x20, 0x08, 0x02, 0x00, 0x10, 0x08, 0x82,
-                                0x00, 0x00, 0x04, 0x82, 0x20, 0x00, 0x00, 0x81,
-                                0x20, 0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00,
-                                0x10, 0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20,
-                                0x00, 0x00, 0x81, 0x20, 0x08, 0x00, 0x40, 0x20,
-                                0x08, 0x02, 0x00, 0x10, 0x08, 0x82, 0x00, 0x00,
-                                0x04, 0x82, 0x20, 0x00, 0x00, 0x81, 0x20, 0x08,
-                                0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10, 0x08,
-                                0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00, 0x00,
-                                0x81, 0x20, 0x08, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x04, 0x82,
-                                0x20, 0x00, 0x00, 0x81, 0xff, 0xff, 0xff, 0x40,
-                                0x20, 0x08, 0x02, 0x00, 0x10, 0x08, 0x82, 0x00,
-                                0x00, 0x04, 0x82, 0x20, 0x00, 0x00, 0x81, 0x20,
-                                0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10,
-                                0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00,
-                                0x00, 0x81, 0x20, 0x08, 0x00, 0x40, 0x20, 0x08,
-                                0x02, 0x00, 0x10, 0x08, 0x82, 0x00, 0x00, 0x04,
-                                0x82, 0x20, 0x00, 0x00, 0x81, 0x20, 0x08, 0x00,
-                                0x40, 0x20, 0x08, 0x02, 0x00, 0x10, 0x08, 0x82,
-                                0x00, 0x00, 0x04, 0x82, 0x20, 0x00, 0x00, 0x81,
-                                0x20, 0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00,
-                                0x10, 0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20,
-                                0x00, 0x00, 0x81, 0x20, 0x08, 0x00, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x3f, 0x00, 0x00, 0x81, 0x20, 0x08,
-                                0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10, 0x08,
-                                0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00, 0x00,
-                                0x81, 0x20, 0x08, 0x00, 0x40, 0x20, 0x08, 0x02,
-                                0x00, 0x10, 0x08, 0x82, 0x00, 0x00, 0x04, 0x82,
-                                0x20, 0x00, 0x00, 0x81, 0x20, 0x08, 0x00, 0x40,
-                                0x20, 0x08, 0x02, 0x00, 0x10, 0x08, 0x82, 0x00,
-                                0x00, 0x04, 0x82, 0x20, 0x00, 0x00, 0x81, 0x20,
-                                0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10,
-                                0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00,
-                                0x00, 0x81, 0x20, 0x08, 0x00, 0x40, 0x20, 0x08,
-                                0x02, 0x00, 0x10, 0x08, 0x82, 0x00, 0x00, 0x04,
-                                0x82, 0x20, 0x00, 0x00, 0x81, 0x20, 0x08, 0x00,
-                                0x40, 0x20, 0x08, 0xfe, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x20, 0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00,
-                                0x10, 0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20,
-                                0x00, 0x00, 0x81, 0x20, 0x08, 0x00, 0x40, 0x20,
-                                0x08, 0x02, 0x00, 0x10, 0x08, 0x82, 0x00, 0x00,
-                                0x04, 0x82, 0x20, 0x00, 0x00, 0x81, 0x20, 0x08,
-                                0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10, 0x08,
-                                0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00, 0x00,
-                                0x81, 0x20, 0x08, 0x00, 0x40, 0x20, 0x08, 0x02,
-                                0x00, 0x10, 0x08, 0x82, 0x00, 0x00, 0x04, 0x82,
-                                0x20, 0x00, 0x00, 0x81, 0x20, 0x08, 0x00, 0x40,
-                                0x20, 0x08, 0x02, 0x00, 0x10, 0x08, 0x82, 0x00,
-                                0x00, 0x04, 0x82, 0x20, 0x00, 0x00, 0x81, 0x20,
-                                0x08, 0x00, 0x40, 0x20, 0x08, 0x02, 0x00, 0x10,
-                                0x08, 0x82, 0x00, 0x00, 0x04, 0x82, 0x20, 0x00,
-                                0x00, 0x81, 0x20, 0x08, 0x00, 0x41, 0x20, 0x08,
-                                0x02, 0x01, 0x10, 0xf8, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x20, 0x08, 0x02, 0x01, 0x00, 0x08, 0x82,
-                                0x40, 0x00, 0x00, 0x82, 0x20, 0x10, 0x00, 0x80,
-                                0x20, 0x08, 0x04, 0x00, 0x20, 0x08, 0x02, 0x01,
-                                0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20,
-                                0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0x00, 0x20,
-                                0x08, 0x02, 0x01, 0x00, 0x08, 0x82, 0x40, 0x00,
-                                0x00, 0x82, 0x20, 0x10, 0x00, 0x80, 0x20, 0x08,
-                                0x04, 0x00, 0x20, 0x08, 0x02, 0x01, 0x00, 0x08,
-                                0x82, 0x40, 0x00, 0x00, 0x82, 0x20, 0x10, 0x00,
-                                0x80, 0x20, 0x08, 0x04, 0x00, 0x20, 0x08, 0x02,
-                                0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82,
-                                0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0xff,
-                                0xff, 0xff, 0x03, 0x01, 0x00, 0x08, 0x82, 0x40,
-                                0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x00, 0x20, 0x08, 0x02, 0x01, 0x00,
-                                0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20, 0x10,
-                                0x00, 0x80, 0x20, 0x08, 0x04, 0x00, 0x20, 0x08,
-                                0x02, 0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00,
-                                0x82, 0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04,
-                                0x00, 0x20, 0x08, 0x02, 0x01, 0x00, 0x08, 0x82,
-                                0x40, 0x00, 0x00, 0x82, 0x20, 0x10, 0x00, 0x80,
-                                0x20, 0x08, 0x04, 0x00, 0x20, 0x08, 0x02, 0x01,
-                                0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20,
-                                0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0x00, 0x20,
-                                0x08, 0x02, 0x01, 0x00, 0x08, 0x82, 0x40, 0x00,
-                                0x00, 0x82, 0x20, 0x10, 0x00, 0x80, 0x20, 0x08,
-                                0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-                                0x82, 0x40, 0x00, 0x00, 0x82, 0xe0, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x08, 0x02,
-                                0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82,
-                                0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0x00,
-                                0x20, 0x08, 0x02, 0x01, 0x00, 0x08, 0x82, 0x40,
-                                0x00, 0x00, 0x82, 0x20, 0x10, 0x00, 0x80, 0x20,
-                                0x08, 0x04, 0x00, 0x20, 0x08, 0x02, 0x01, 0x00,
-                                0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20, 0x10,
-                                0x00, 0x80, 0x20, 0x08, 0x04, 0x00, 0x20, 0x08,
-                                0x02, 0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00,
-                                0x82, 0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04,
-                                0x00, 0x20, 0x08, 0x02, 0x01, 0x00, 0x08, 0x82,
-                                0x40, 0x00, 0x00, 0x82, 0x20, 0x10, 0x00, 0x80,
-                                0x20, 0x08, 0x04, 0x00, 0x20, 0x08, 0x02, 0x01,
-                                0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20,
-                                0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
-                                0x00, 0x82, 0x20, 0x10, 0x00, 0x80, 0xff, 0xff,
-                                0xff, 0x00, 0x20, 0x08, 0x02, 0x01, 0x00, 0x08,
-                                0x82, 0x40, 0x00, 0x00, 0x82, 0x20, 0x10, 0x00,
-                                0x80, 0x20, 0x08, 0x04, 0x00, 0x20, 0x08, 0x02,
-                                0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00, 0x82,
-                                0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04, 0x00,
-                                0x20, 0x08, 0x02, 0x01, 0x00, 0x08, 0x82, 0x40,
-                                0x00, 0x00, 0x82, 0x20, 0x10, 0x00, 0x80, 0x20,
-                                0x08, 0x04, 0x00, 0x20, 0x08, 0x02, 0x01, 0x00,
-                                0x08, 0x82, 0x40, 0x00, 0x00, 0x82, 0x20, 0x10,
-                                0x00, 0x80, 0x20, 0x08, 0x04, 0x00, 0x20, 0x08,
-                                0x02, 0x01, 0x00, 0x08, 0x82, 0x40, 0x00, 0x00,
-                                0x82, 0x20, 0x10, 0x00, 0x80, 0x20, 0x08, 0x04};
-
-static unsigned char INSUL_BITS[] = {
-                                0xff, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
-                                0x1f, 0x00, 0x00, 0x00};
-
-static unsigned char MUDST_BITS[] = {
-                                0xff, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x01, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char NET3_BITS[] = {
-                                0xff, 0x03, 0x02, 0x02, 0x04, 0x01, 0x04, 0x01,
-                                0x88, 0x00, 0x88, 0x00, 0x50, 0x00, 0x20, 0x00,
-                                0xff, 0x03, 0x50, 0x00, 0x88, 0x00, 0x88, 0x00,
-                                0x04, 0x01, 0x04, 0x01, 0x02, 0x02, 0x01, 0x00};
-
-static unsigned char PLAST_BITS[] = {
-                                0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
-                                0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char PLASTI_BITS[] = {
-                                0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
-                                0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char SACNCR_BITS[] = {
-                                0x21, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x40, 0x00, 0x80, 0x00,
-                                0x00, 0x01, 0x00, 0x02};
-
-static unsigned char SQUARE_BITS[] = {
-                                0x00, 0x00, 0x00, 0x00, 0xF0, 0x90, 0x90, 0xF0};
-
-static unsigned char STARS_BITS[] = {
-                                0x7f, 0xf0, 0x07, 0x02, 0x00, 0x02, 0x02, 0x00,
-                                0x02, 0x04, 0x00, 0x01, 0x04, 0x00, 0x01, 0x08,
-                                0x80, 0x00, 0x08, 0x00, 0x01, 0x04, 0x00, 0x01,
-                                0x04, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00,
-                                0x04, 0x7f, 0xf0, 0x07, 0x80, 0x08, 0x00, 0x80,
-                                0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00,
-                                0x00, 0x02, 0x20, 0x00, 0x00, 0x50, 0x00, 0x00,
-                                0x50, 0x00, 0x00, 0x88, 0x00, 0x00, 0x88, 0x7f,
-                                0xf0, 0x07, 0x20, 0x20, 0x00, 0x20, 0x20, 0x00,
-                                0x10, 0x40, 0x00, 0x10, 0x40, 0x00, 0x08, 0x80,
-                                0x00, 0x10, 0x80, 0x00, 0x10, 0x40, 0x00, 0x20,
-                                0x40, 0x00, 0x20, 0x20, 0x00, 0x40, 0x20, 0x00,
-                                0x7f, 0xf0, 0x07, 0x00, 0x00, 0x88, 0x00, 0x00,
-                                0x88, 0x00, 0x00, 0x50, 0x00, 0x00, 0x50, 0x00,
-                                0x02, 0x20, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00,
-                                0x80, 0x08, 0x00, 0x80, 0x08, 0x00};
-
-static unsigned char STEEL_BITS[] = {
-                                0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10,
-                                0x10, 0x20, 0x21, 0x00, 0x42, 0x00, 0x84, 0x00,
-                                0x08, 0x01, 0x10, 0x02, 0x20, 0x04, 0x40, 0x08,
-                                0x80, 0x10, 0x00, 0x21};
-
-static unsigned char SWAMP_BITS[] = {
-                                0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xba, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x40, 0x17, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char TRANS_BITS[] = {
-                                0xff, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00};
-
-static unsigned char TRIANG_BITS[] = {
-                                0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x00,
-                                0x08, 0x04, 0x00, 0x04, 0x04, 0x00, 0x04, 0x08,
-                                0x00, 0x02, 0x08, 0x00, 0x02, 0x10, 0x00, 0x01,
-                                0x10, 0x00, 0x01, 0x3f, 0x80, 0x0f, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-                                0x00, 0x00, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00,
-                                0x11, 0x00, 0x00, 0x11, 0x00, 0x80, 0x20, 0x00,
-                                0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40,
-                                0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ZIGZAG_BITS[] = {
-                                0xff, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-                                0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-                                0x01, 0xff, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-                                0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00};
-
-static unsigned char AR_B816_BITS[] = {
-                                0xff, 0xff, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x00,
-                                0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-                                0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff,
-                                0x0f, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,
-                                0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
-                                0x00, 0x00, 0x04, 0x00};
-
-static unsigned char AR_B816C_BITS[] = {
-                                0xff, 0xff, 0x0f, 0x00, 0x04, 0x00, 0x00, 0x04,
-                                0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,
-                                0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xff, 0xff,
-                                0x0f, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-                                0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,
-                                0x00, 0x01, 0x00, 0x00};
-
-static unsigned char AR_B88_BITS[] = {
-                                0xff, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-                                0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-                                0x01, 0x00, 0x01, 0x00, 0xff, 0x03, 0x20, 0x00,
-                                0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
-                                0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00};
-
-static unsigned char AR_BRELM_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x07, 0x01, 0x00, 0x00,
-                                0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01,
-                                0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
-                                0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00,
-                                0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04,
-                                0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00,
-                                0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xff, 0xfb,
-                                0x0f, 0x80, 0x02, 0x00, 0x0a, 0x00, 0x80, 0x02,
-                                0x00, 0x0a, 0x00, 0x80, 0x02, 0x00, 0x0a, 0x00,
-                                0x80, 0x02, 0x00, 0x0a, 0x00, 0x80, 0x02, 0x00,
-                                0x0a, 0x00, 0x80, 0x02, 0x00, 0x0a, 0x00, 0x80,
-                                0x02, 0x00, 0x0a, 0x00, 0x80, 0x02, 0x00, 0x0a,
-                                0x00, 0x80, 0x02, 0x00, 0x0a, 0x00, 0xff, 0xfe,
-                                0xff, 0xfb, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char AR_BRSTD_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x00, 0x00,
-                                0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
-                                0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-                                0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-                                0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-                                0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0x0f, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04,
-                                0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-                                0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-                                0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-                                0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00};
-
-static unsigned char AR_CONC_BITS[] = {
-                                0x03, 0x00, 0x80, 0x05, 0x10, 0x00, 0x00, 0x0a,
-                                0x08, 0x0a, 0x00, 0x03, 0x12, 0x00, 0x00, 0x00,
-                                0x4c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
-                                0x0e, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x07, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00,
-                                0x00, 0x00, 0x08, 0x00, 0x28, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x48, 0x02,
-                                0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x04,
-                                0x40, 0x10, 0x40, 0x00, 0x00, 0xa0, 0x60, 0x08,
-                                0x00, 0x40, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x90,
-                                0x00, 0x08, 0xa0, 0x00, 0x00, 0x90, 0x00, 0xe4,
-                                0x00, 0x00, 0x00, 0x20, 0x08, 0xa0, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x90, 0x04, 0xe0, 0x00, 0x00,
-                                0x00, 0x90, 0x00, 0x60, 0x00, 0x48, 0x00, 0x00,
-                                0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-                                0x80, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x82,
-                                0x40, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00,
-                                0x00, 0x11, 0x10, 0x01, 0x80, 0x21, 0x00, 0x02,
-                                0x40, 0x02, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00,
-                                0x80, 0x03, 0x00, 0x00, 0x0a, 0x80, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x08, 0x89, 0x10, 0x00,
-                                0x02, 0x00, 0x01, 0x10, 0x00, 0xd0, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x14,
-                                0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x90,
-                                0x00, 0x00, 0x88, 0x08, 0x00, 0x00, 0x00, 0x0e,
-                                0x00, 0x18, 0xf0, 0x13, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x0c, 0x08, 0x00, 0x00, 0x12,
-                                0x00, 0x00, 0x00, 0x05, 0x00, 0x12, 0x00, 0x1c,
-                                0x00, 0x00, 0x00, 0x10, 0x00, 0x94, 0x00, 0x00,
-                                0x02, 0x00, 0x00, 0x12, 0x40, 0x4d, 0x00, 0x04,
-                                0x40, 0x1a, 0x00, 0x0c, 0x00, 0x00, 0x80, 0x00,
-                                0x00, 0x0c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01,
-                                0x10, 0x00, 0x08, 0x01, 0x01, 0x90, 0x08, 0x00,
-                                0x00, 0x41, 0x10, 0x00, 0x00, 0x70, 0x00, 0x00,
-                                0x00, 0x50, 0x04, 0x01, 0x11, 0x00, 0x00, 0x00,
-                                0x00, 0x20, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
-                                0x02, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x08,
-                                0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24,
-                                0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x20, 0x80,
-                                0x00, 0x04, 0x00, 0x20, 0x12, 0x02, 0x00, 0x00,
-                                0x21, 0x00, 0x02, 0x80, 0x03, 0x00, 0x00, 0x00,
-                                0x82, 0x00, 0x00, 0x41, 0x00, 0x80, 0x42, 0x22,
-                                0x05, 0x00, 0x00, 0x02, 0x60, 0x02, 0x80, 0x0b,
-                                0x02, 0x20, 0x10, 0x02, 0x80, 0x11, 0x00, 0x00,
-                                0x00, 0x00, 0x40, 0x02, 0x80, 0x11, 0x10, 0x00,
-                                0x40, 0x01, 0x80, 0x03, 0x00, 0x1e, 0x10, 0x04,
-                                0x84, 0x01, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00,
-                                0x80, 0x00, 0x19, 0x00, 0x10, 0x00, 0x12, 0x00,
-                                0x00, 0x00, 0x13, 0x00, 0x00, 0x40, 0x0d, 0x00,
-                                0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x08,
-                                0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x20, 0x04,
-                                0x00, 0x00, 0x02, 0x21, 0x60, 0x00, 0x00, 0x00,
-                                0xa0, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-                                0x40, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x01, 0x00,
-                                0x44, 0x00, 0x40, 0x00, 0x60, 0x00, 0x00, 0x10,
-                                0x70, 0x40, 0x08, 0x00, 0x10, 0x00, 0x48, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x48, 0x02, 0x30, 0x00,
-                                0x00, 0x00, 0x20, 0x02, 0x30, 0x00, 0x04, 0x00};
-
-static unsigned char AR_HBONE_BITS[] = {
-                                0x01, 0x10, 0x00, 0x02, 0x20, 0x80, 0x04, 0x40,
-                                0x40, 0x08, 0x80, 0x20, 0x10, 0x00, 0x11, 0x20,
-                                0x00, 0x0a, 0x40, 0x00, 0x04, 0xa0, 0x00, 0x02,
-                                0x10, 0x01, 0x01, 0x08, 0x82, 0x00, 0x04, 0x44,
-                                0x00, 0x02, 0x28, 0x00};
-
-static unsigned char AR_PARQ1_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0xc2, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0xc2, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0xc2, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0xc2, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0xc2, 0xff, 0xff, 0xff, 0x0f,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0x21, 0x84, 0x10, 0x42, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0xff, 0xff, 0xff, 0x7f, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0xff, 0xff, 0xff, 0x7f, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0xff, 0xff, 0xff, 0x7f, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0xff, 0xff, 0xff, 0x7f, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0xff, 0xff, 0xff, 0x7f, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x08, 0x21, 0x84, 0x00};
-
-static unsigned char AR_RROOF_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
-                                0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0xf8,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfe,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x7f, 0x00, 0x80, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xfc,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x1f, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x07, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xf0,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
-                                0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x0f, 0x80, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x1f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
-                                0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff,
-                                0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x0f, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x01, 0x00, 0xfc, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
-                                0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
-                                0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xc0, 0xff,
-                                0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff,
-                                0xff, 0xff, 0xff, 0xc7, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x7f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x07, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
-                                0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
-                                0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0x07, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xfe,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff,
-                                0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0xff,
-                                0xff, 0x3f, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01,
-                                0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xfc,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xfe,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0x7f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00,
-                                0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
-                                0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xe0,
-                                0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8,
-                                0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfc,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
-                                0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x0f, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x01, 0x00, 0xfe, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x0f, 0x00, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
-                                0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfc,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0x3f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                                0x1f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
-                                0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03,
-                                0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char AR_RROOF_90_BITS[] = {
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x28, 0x00, 0x44, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x28, 0x00,
-                                0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x28, 0x00, 0x44, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x28, 0x00, 0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x28, 0x00, 0x04,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x28, 0x00, 0x04, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x28,
-                                0x00, 0x04, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x28, 0x00, 0x44, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x28, 0x00, 0x44, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x28, 0x00,
-                                0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x28, 0x00, 0x44, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x28, 0x04, 0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x04, 0x92, 0x02, 0x28, 0x04, 0x44,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x04,
-                                0x92, 0x02, 0x28, 0x04, 0x44, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x04, 0x92, 0x02, 0x2a,
-                                0x04, 0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x04, 0x90, 0x02, 0x2a, 0x04, 0x44, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x04, 0x90,
-                                0x02, 0x2a, 0x04, 0x44, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x04, 0x90, 0x02, 0x2a, 0x04,
-                                0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x04, 0x90, 0x02, 0x2a, 0x04, 0x44, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x04, 0x90, 0x02,
-                                0x2a, 0x04, 0x44, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x04, 0x90, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa0, 0x80, 0x8a, 0x40, 0x11, 0x04,
-                                0x90, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa0,
-                                0x80, 0x8a, 0x40, 0x11, 0x04, 0x90, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa0, 0x80, 0x8a, 0x40,
-                                0x11, 0x04, 0x90, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa0, 0x80, 0x8a, 0x40, 0x11, 0x04, 0x90,
-                                0x02, 0x22, 0x04, 0x45, 0x04, 0x41, 0xa0, 0x80,
-                                0x8a, 0x40, 0x11, 0x04, 0x90, 0x02, 0x22, 0x04,
-                                0x45, 0x04, 0x41, 0xa0, 0x80, 0x8a, 0x40, 0x11,
-                                0x04, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x41,
-                                0xa0, 0x00, 0x8a, 0x40, 0x11, 0x04, 0x92, 0x02,
-                                0x22, 0x04, 0x45, 0x04, 0x41, 0xa0, 0x00, 0x8a,
-                                0x40, 0x11, 0x04, 0x92, 0x02, 0x22, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x00, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x00, 0x0a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x22,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x00, 0x0a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x00, 0x0a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x22, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x00,
-                                0x02, 0x40, 0x11, 0x05, 0x92, 0x02, 0x22, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x00, 0x02, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x00, 0x02, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x22, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x00, 0x02,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x22, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x00, 0x02, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x00, 0x02, 0x40, 0x11, 0x05, 0x92, 0x02, 0x22,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x00, 0x02, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x00, 0x02, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x22, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x00,
-                                0x82, 0x40, 0x11, 0x05, 0x92, 0x02, 0x22, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x00, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x00, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x22, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x22, 0x04, 0x45,
-                                0x04, 0x01, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x22, 0x04, 0x45, 0x04, 0x01, 0xa4,
-                                0x80, 0x8a, 0x40, 0x01, 0x05, 0x92, 0x02, 0x22,
-                                0x04, 0x45, 0x04, 0x01, 0xa4, 0x80, 0x8a, 0x40,
-                                0x01, 0x05, 0x92, 0x02, 0x22, 0x04, 0x41, 0x04,
-                                0x01, 0xa4, 0x80, 0x8a, 0x40, 0x01, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x41, 0x04, 0x01, 0xa4, 0x80,
-                                0x8a, 0x40, 0x01, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x41, 0x04, 0x01, 0xa4, 0x80, 0x8a, 0x40, 0x01,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x41, 0x00, 0x01,
-                                0xa4, 0x80, 0x8a, 0x40, 0x01, 0x05, 0x12, 0x02,
-                                0x2a, 0x04, 0x41, 0x00, 0x01, 0xa4, 0x80, 0x8a,
-                                0x40, 0x01, 0x05, 0x12, 0x02, 0x2a, 0x04, 0x41,
-                                0x00, 0x01, 0xa4, 0x80, 0x8a, 0x40, 0x01, 0x05,
-                                0x12, 0x02, 0x2a, 0x04, 0x41, 0x00, 0x01, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x12, 0x02, 0x2a,
-                                0x04, 0x41, 0x00, 0x01, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x12, 0x02, 0x2a, 0x04, 0x41, 0x00,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x12,
-                                0x02, 0x2a, 0x04, 0x41, 0x00, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x12, 0x02, 0x2a, 0x04,
-                                0x41, 0x00, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x02, 0x02, 0x2a, 0x04, 0x41, 0x00, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x02, 0x02,
-                                0x2a, 0x04, 0x41, 0x00, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x02, 0x02, 0x2a, 0x04, 0x41,
-                                0x00, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x02, 0x02, 0x2a, 0x04, 0x41, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x02, 0x00, 0x2a,
-                                0x04, 0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x02, 0x00, 0x2a, 0x04, 0x41, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x02,
-                                0x00, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x02, 0x00, 0x28, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x02, 0x00, 0x28, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x12, 0x00,
-                                0x28, 0x04, 0x45, 0x04, 0x41, 0xa0, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x12, 0x00, 0x28, 0x04, 0x45,
-                                0x04, 0x41, 0xa0, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x12, 0x00, 0x28, 0x04, 0x45, 0x04, 0x41, 0xa0,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x12, 0x00, 0x28,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x12, 0x00, 0x08, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x12,
-                                0x00, 0x08, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x12, 0x00, 0x08, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x12, 0x00, 0x08, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x00,
-                                0x08, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x00, 0x0a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x05,
-                                0x92, 0x00, 0x0a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x10, 0x05, 0x92, 0x00, 0x0a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x10, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x82, 0x40, 0x10, 0x00, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x82, 0x40, 0x10, 0x00, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x82, 0x40, 0x10,
-                                0x00, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x10, 0x00, 0x92, 0x02,
-                                0x2a, 0x04, 0x05, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x10, 0x00, 0x92, 0x02, 0x2a, 0x04, 0x04,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x00,
-                                0x92, 0x02, 0x2a, 0x04, 0x04, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x10, 0x00, 0x92, 0x02, 0x2a,
-                                0x04, 0x04, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x10, 0x00, 0x92, 0x02, 0x2a, 0x04, 0x04, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x00, 0x92,
-                                0x02, 0x2a, 0x04, 0x04, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x10, 0x00, 0x92, 0x02, 0x2a, 0x04,
-                                0x04, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10,
-                                0x00, 0x92, 0x02, 0x2a, 0x04, 0x04, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x10, 0x01, 0x92, 0x02,
-                                0x2a, 0x04, 0x04, 0x04, 0x41, 0x24, 0x80, 0x8a,
-                                0x40, 0x10, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x44,
-                                0x04, 0x41, 0x24, 0x80, 0x8a, 0x40, 0x00, 0x01,
-                                0x92, 0x02, 0x2a, 0x04, 0x44, 0x04, 0x41, 0x24,
-                                0x80, 0x8a, 0x40, 0x01, 0x01, 0x92, 0x02, 0x2a,
-                                0x04, 0x44, 0x04, 0x41, 0x24, 0x00, 0x8a, 0x40,
-                                0x01, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0x24, 0x00, 0x8a, 0x40, 0x11, 0x01, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0x24, 0x00,
-                                0x8a, 0x40, 0x11, 0x01, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0x24, 0x00, 0x8a, 0x40, 0x11,
-                                0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0x24, 0x00, 0x8a, 0x40, 0x11, 0x01, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0x24, 0x00, 0x8a,
-                                0x40, 0x11, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0x24, 0x00, 0x8a, 0x40, 0x11, 0x01,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0x24,
-                                0x00, 0x8a, 0x40, 0x11, 0x01, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0x24, 0x00, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0x24, 0x00, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0x24, 0x00,
-                                0x8a, 0x40, 0x11, 0x05, 0x82, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0x24, 0x80, 0x8a, 0x00, 0x11,
-                                0x05, 0x82, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0x24, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x82, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0x24, 0x80, 0x8a,
-                                0x00, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x00, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00,
-                                0x11, 0x05, 0x92, 0x02, 0x22, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x92,
-                                0x02, 0x22, 0x00, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x00, 0x11, 0x05, 0x92, 0x02, 0x22, 0x00,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11,
-                                0x05, 0x92, 0x02, 0x22, 0x00, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x92, 0x02,
-                                0x22, 0x00, 0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x00, 0x11, 0x05, 0x92, 0x02, 0x22, 0x00, 0x41,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05,
-                                0x92, 0x02, 0x22, 0x00, 0x41, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x00, 0x11, 0x05, 0x92, 0x02, 0x02,
-                                0x00, 0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00,
-                                0x11, 0x05, 0x92, 0x02, 0x02, 0x00, 0x41, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x92,
-                                0x02, 0x02, 0x00, 0x41, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x00, 0x11, 0x05, 0x92, 0x02, 0x22, 0x00,
-                                0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11,
-                                0x05, 0x92, 0x02, 0x22, 0x00, 0x41, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x00, 0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x00, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x00, 0x41,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x00, 0x41, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x00, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x00, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x00,
-                                0x11, 0x05, 0x90, 0x02, 0x2a, 0x00, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x05, 0x90,
-                                0x02, 0x2a, 0x00, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x00, 0x11, 0x05, 0x90, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x90, 0x00, 0x2a, 0x04, 0x05, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x90, 0x00,
-                                0x2a, 0x04, 0x05, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x90, 0x00, 0x2a, 0x04, 0x05,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x90, 0x00, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x88, 0x40, 0x11, 0x05, 0x90, 0x00, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x88, 0x40,
-                                0x11, 0x05, 0x90, 0x00, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x88, 0x40, 0x11, 0x05, 0x90,
-                                0x00, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x88, 0x40, 0x11, 0x05, 0x90, 0x00, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x88, 0x40, 0x11,
-                                0x05, 0x90, 0x00, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x88, 0x40, 0x11, 0x05, 0x10, 0x00,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x88,
-                                0x40, 0x11, 0x05, 0x10, 0x00, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x88, 0x40, 0x11, 0x05,
-                                0x10, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x08, 0x40, 0x11, 0x05, 0x10, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x08, 0x40,
-                                0x11, 0x05, 0x10, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x08, 0x40, 0x11, 0x05, 0x12,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x08, 0x40, 0x10, 0x05, 0x12, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x08, 0x40, 0x10,
-                                0x05, 0x12, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa0, 0x80, 0x08, 0x40, 0x10, 0x05, 0x12, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0xa0, 0x80, 0x08,
-                                0x40, 0x10, 0x05, 0x12, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa0, 0x80, 0x08, 0x40, 0x10, 0x05,
-                                0x12, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa0,
-                                0x80, 0x08, 0x40, 0x10, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa0, 0x80, 0x08, 0x40,
-                                0x10, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa0, 0x80, 0x08, 0x40, 0x10, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa0, 0x80,
-                                0x08, 0x40, 0x10, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa0, 0x80, 0x08, 0x40, 0x10,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x08, 0x40, 0x10, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x08,
-                                0x40, 0x10, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x08, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x01, 0xa4,
-                                0x80, 0x0a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x01, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x01, 0x24, 0x80, 0x82, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x01, 0x04, 0x80,
-                                0x82, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x01, 0x04, 0x80, 0x82, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x01,
-                                0x04, 0x80, 0x82, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x00, 0x01, 0x04, 0x80, 0x82,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x00, 0x01, 0x04, 0x80, 0x82, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x00, 0x01, 0x04,
-                                0x80, 0x82, 0x40, 0x11, 0x01, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x00, 0x01, 0x04, 0x80, 0x82, 0x40,
-                                0x11, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x00,
-                                0x01, 0x04, 0x80, 0x8a, 0x40, 0x11, 0x01, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x00, 0x01, 0x04, 0x80,
-                                0x8a, 0x40, 0x11, 0x01, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x00, 0x01, 0x04, 0x80, 0x8a, 0x40, 0x11,
-                                0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x00, 0x01,
-                                0x04, 0x80, 0x8a, 0x40, 0x11, 0x01, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x00, 0x01, 0x84, 0x80, 0x8a,
-                                0x40, 0x01, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x00, 0x01, 0x84, 0x80, 0x8a, 0x40, 0x01, 0x01,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x00, 0x41, 0x84,
-                                0x80, 0x8a, 0x40, 0x01, 0x01, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x00, 0x41, 0x84, 0x80, 0x8a, 0x40,
-                                0x01, 0x01, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x00,
-                                0x41, 0x84, 0x80, 0x8a, 0x40, 0x01, 0x01, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x00, 0x41, 0x84, 0x80,
-                                0x8a, 0x40, 0x01, 0x01, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x00, 0x41, 0x84, 0x80, 0x8a, 0x40, 0x01,
-                                0x05, 0x92, 0x02, 0x28, 0x04, 0x45, 0x00, 0x41,
-                                0x84, 0x80, 0x8a, 0x40, 0x01, 0x05, 0x92, 0x02,
-                                0x28, 0x04, 0x45, 0x04, 0x41, 0x84, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x28, 0x00, 0x45,
-                                0x04, 0x41, 0x84, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x28, 0x00, 0x45, 0x04, 0x41, 0x84,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x28,
-                                0x00, 0x45, 0x04, 0x41, 0x84, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x28, 0x00, 0x45, 0x04,
-                                0x41, 0x84, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x28, 0x00, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x82, 0x02, 0x28, 0x00,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x82, 0x02, 0x28, 0x00, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x82, 0x02,
-                                0x28, 0x00, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x82, 0x02, 0x28, 0x00, 0x45,
-                                0x04, 0x40, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x82, 0x02, 0x28, 0x00, 0x45, 0x04, 0x40, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x82, 0x02, 0x28,
-                                0x00, 0x45, 0x04, 0x40, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x82, 0x02, 0x28, 0x00, 0x45, 0x04,
-                                0x40, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x82,
-                                0x02, 0x28, 0x04, 0x45, 0x04, 0x40, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x04, 0x92, 0x02, 0x28, 0x04,
-                                0x45, 0x04, 0x40, 0xa0, 0x80, 0x8a, 0x00, 0x11,
-                                0x04, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x40,
-                                0xa0, 0x80, 0x8a, 0x00, 0x11, 0x04, 0x90, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x40, 0xa0, 0x80, 0x8a,
-                                0x00, 0x11, 0x04, 0x90, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x40, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x04,
-                                0x90, 0x02, 0x0a, 0x04, 0x45, 0x04, 0x40, 0xa4,
-                                0x80, 0x8a, 0x00, 0x11, 0x04, 0x90, 0x02, 0x0a,
-                                0x04, 0x45, 0x04, 0x40, 0xa4, 0x80, 0x8a, 0x00,
-                                0x11, 0x04, 0x90, 0x02, 0x0a, 0x04, 0x45, 0x04,
-                                0x40, 0xa4, 0x80, 0x8a, 0x00, 0x11, 0x04, 0x90,
-                                0x02, 0x0a, 0x04, 0x45, 0x04, 0x40, 0xa4, 0x80,
-                                0x8a, 0x00, 0x11, 0x04, 0x90, 0x02, 0x0a, 0x04,
-                                0x45, 0x04, 0x40, 0xa4, 0x80, 0x8a, 0x00, 0x11,
-                                0x04, 0x90, 0x02, 0x0a, 0x04, 0x45, 0x04, 0x40,
-                                0xa4, 0x80, 0x8a, 0x00, 0x11, 0x04, 0x90, 0x02,
-                                0x0a, 0x04, 0x45, 0x04, 0x40, 0xa4, 0x80, 0x8a,
-                                0x00, 0x11, 0x04, 0x90, 0x02, 0x0a, 0x04, 0x45,
-                                0x04, 0x40, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x04,
-                                0x90, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x40, 0xa4,
-                                0x80, 0x82, 0x40, 0x11, 0x04, 0x90, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x40, 0xa4, 0x80, 0x82, 0x40,
-                                0x11, 0x04, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x40, 0xa4, 0x00, 0x82, 0x40, 0x11, 0x04, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x40, 0xa4, 0x00,
-                                0x82, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x40, 0xa4, 0x00, 0x0a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x05, 0x04, 0x40,
-                                0xa4, 0x00, 0x0a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x05, 0x04, 0x40, 0xa4, 0x00, 0x0a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x05,
-                                0x04, 0x41, 0xa4, 0x00, 0x0a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x05, 0x04, 0x41, 0xa4,
-                                0x00, 0x0a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x05, 0x04, 0x41, 0xa4, 0x00, 0x0a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x05, 0x04,
-                                0x41, 0xa4, 0x00, 0x0a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x05, 0x04, 0x41, 0xa4, 0x00,
-                                0x0a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x05, 0x04, 0x41, 0xa4, 0x00, 0x0a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x00, 0x0a, 0x40, 0x01, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x00, 0x0a,
-                                0x40, 0x01, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x00, 0x08, 0x40, 0x01, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x00, 0x88, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x00, 0x88, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x88, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x01, 0xa4, 0x80,
-                                0x88, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x01, 0xa4, 0x80, 0x88, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x01,
-                                0xa4, 0x80, 0x88, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x01, 0xa4, 0x80, 0x88,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x41,
-                                0x04, 0x01, 0xa4, 0x80, 0x88, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x41, 0x04, 0x01, 0xa4,
-                                0x80, 0x88, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x41, 0x00, 0x01, 0xa4, 0x80, 0x88, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x41, 0x00,
-                                0x01, 0xa4, 0x80, 0x88, 0x40, 0x11, 0x05, 0x82,
-                                0x02, 0x2a, 0x04, 0x41, 0x00, 0x01, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x82, 0x02, 0x2a, 0x04,
-                                0x41, 0x00, 0x01, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x82, 0x02, 0x2a, 0x04, 0x41, 0x00, 0x01,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x41, 0x00, 0x01, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x41,
-                                0x00, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x41, 0x00, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x41, 0x00, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x41, 0x00,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x41, 0x00, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x41, 0x00, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x41, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x00,
-                                0x2a, 0x04, 0x41, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x00, 0x0a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x00, 0x08, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x00, 0x08,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x00, 0x28, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x00, 0x28, 0x04, 0x45, 0x04, 0x41, 0x84, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x00, 0x28, 0x04,
-                                0x45, 0x04, 0x41, 0x84, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x00, 0x28, 0x04, 0x45, 0x04, 0x41,
-                                0x84, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x00,
-                                0x28, 0x04, 0x45, 0x04, 0x41, 0x84, 0x80, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x00, 0x28, 0x04, 0x45,
-                                0x04, 0x41, 0x84, 0x80, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x00, 0x28, 0x04, 0x45, 0x04, 0x41, 0x84,
-                                0x80, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x00, 0x28,
-                                0x04, 0x45, 0x04, 0x41, 0x84, 0x80, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x00, 0x28, 0x04, 0x45, 0x04,
-                                0x41, 0x84, 0x80, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x00, 0x28, 0x04, 0x45, 0x04, 0x41, 0x84, 0x80,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x00, 0x2a, 0x04,
-                                0x05, 0x04, 0x41, 0x84, 0x80, 0x8a, 0x40, 0x10,
-                                0x05, 0x92, 0x00, 0x2a, 0x04, 0x05, 0x04, 0x41,
-                                0x84, 0x80, 0x8a, 0x40, 0x10, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x05, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x10, 0x04, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x04,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x10, 0x04, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x10, 0x04, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x04, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80,
-                                0x8a, 0x40, 0x10, 0x04, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10,
-                                0x04, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0xa4, 0x80, 0x8a, 0x40, 0x10, 0x04, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a,
-                                0x40, 0x10, 0x04, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x04,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0xa4,
-                                0x80, 0x8a, 0x40, 0x10, 0x04, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x41, 0xa4, 0x80, 0x8a, 0x40,
-                                0x10, 0x04, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x41, 0xa4, 0x80, 0x8a, 0x40, 0x10, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x41, 0x20, 0x80,
-                                0x8a, 0x40, 0x10, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x41, 0x20, 0x80, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x41,
-                                0x20, 0x00, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x40, 0x20, 0x00, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45,
-                                0x04, 0x40, 0x20, 0x00, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x40, 0x20,
-                                0x00, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x45, 0x04, 0x40, 0x20, 0x00, 0x8a, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04,
-                                0x40, 0x20, 0x00, 0x8a, 0x40, 0x11, 0x05, 0x92,
-                                0x02, 0x2a, 0x04, 0x45, 0x04, 0x40, 0x20, 0x00,
-                                0x8a, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04,
-                                0x45, 0x04, 0x40, 0x24, 0x00, 0x8a, 0x40, 0x11,
-                                0x05, 0x92, 0x02, 0x2a, 0x04, 0x45, 0x04, 0x40,
-                                0x24, 0x00, 0x8a, 0x40, 0x11, 0x05, 0x92, 0x02,
-                                0x2a, 0x04, 0x45, 0x04, 0x40, 0x24, 0x00, 0x8a,
-                                0x40, 0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x44,
-                                0x04, 0x40, 0x24, 0x00, 0x8a, 0x40, 0x11, 0x05,
-                                0x92, 0x02, 0x2a, 0x04, 0x44, 0x04, 0x40, 0x24,
-                                0x00, 0x82, 0x40, 0x11, 0x05, 0x92, 0x02, 0x2a,
-                                0x04, 0x44, 0x04, 0x40, 0x24, 0x80, 0x82, 0x40,
-                                0x11, 0x05, 0x92, 0x02, 0x2a, 0x04, 0x44, 0x04};
-
-static unsigned char AR_RSHKE_BITS[] = {
-                                0xff, 0x07, 0xfc, 0x7f, 0xf8, 0xff, 0x07, 0x00,
-                                0x01, 0xfc, 0x07, 0x40, 0x08, 0x00, 0xfc, 0x01,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x04, 0x40, 0x08, 0x00, 0x04, 0x00,
-                                0x01, 0x04, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0xf0, 0xff, 0xe1, 0xff, 0x1f, 0xf8, 0x3f, 0x00,
-                                0x1f, 0x00, 0x21, 0x00, 0xf0, 0x0f, 0xe0, 0x01,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0x10, 0x00, 0x21, 0x00, 0x10, 0x08, 0x20, 0x00,
-                                0xfc, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x00,
-                                0x87, 0xff, 0x7f, 0xe0, 0xff, 0x80, 0xff, 0x01,
-                                0x84, 0x00, 0xc0, 0x3f, 0x80, 0xff, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x84, 0x00, 0x40, 0x20, 0x80, 0x80, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x20, 0x80, 0xf0, 0x03, 0x00,
-                                0xff, 0xc1, 0xff, 0x01, 0xfe, 0x1f, 0xfe, 0x01,
-                                0x00, 0x7f, 0x00, 0xff, 0x03, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x41, 0x00, 0x01, 0x02, 0x10, 0x02, 0x00,
-                                0x00, 0x40, 0x00, 0xc1, 0x0f, 0x00, 0x00, 0x00};
-
-static unsigned char AR_RSHKE_90_BITS[] = {
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0xe8,
-                                0xff, 0xff, 0x01, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0xd0, 0xff,
-                                0xff, 0x03, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0xfa, 0xff, 0x1f,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0xd0, 0xff, 0xff, 0x03, 0x00, 0x10, 0x00, 0x00,
-                                0xfd, 0xff, 0x1f, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
-                                0x00, 0x01, 0x00, 0xf0, 0xff, 0xff, 0x00, 0x00,
-                                0x08, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x80,
-                                0x00, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x80, 0xfe, 0xff, 0x1f, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x80,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0xfd, 0xff, 0x3f,
-                                0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0xa0, 0xff, 0xff, 0x01, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0xfd,
-                                0xff, 0x3f, 0x00, 0x00, 0x01, 0x00, 0xd0, 0xff,
-                                0xff, 0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0xff, 0xff, 0x1f, 0x00, 0x80, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x80, 0x00,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
-                                0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0x08, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0xe8, 0xff, 0xff, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x03, 0x00, 0x08, 0x00,
-                                0x00, 0x01, 0x00, 0xd0, 0xff, 0xff, 0x02, 0x00,
-                                0x08, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x02, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0xfa, 0xff, 0x1f, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x03, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0xd0, 0xff, 0xff,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0xfd, 0xff, 0x1f,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00,
-                                0xf0, 0xff, 0xff, 0x01, 0x00, 0x08, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x08,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x80, 0x00,
-                                0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x80, 0xfe, 0xff, 0x1f, 0x00, 0x00,
-                                0xfd, 0xff, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x80, 0x00,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
-                                0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0xa0, 0xff, 0xff, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0xfd, 0xff, 0x3f, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0xd0, 0xff, 0xff, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x80,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff,
-                                0xff, 0x1f, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x80,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x08,
-                                0x00, 0x80};
-
-static unsigned char AR_RSHKE_180_BITS[] = {
-                                0x81, 0xff, 0x7f, 0xf8, 0xff, 0x80, 0xff, 0x01,
-                                0x00, 0x00, 0xc0, 0x0f, 0x02, 0x08, 0x00, 0x00,
-                                0x00, 0x21, 0x00, 0x00, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0x01, 0x02, 0x08, 0x02, 0x00,
-                                0x00, 0x21, 0x00, 0xff, 0x03, 0xf8, 0x03, 0x00,
-                                0xff, 0xe1, 0xff, 0x01, 0xfe, 0x0f, 0xfe, 0x01,
-                                0x00, 0x3f, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0x04, 0x04, 0x20, 0x08, 0x00, 0x84, 0x00,
-                                0x00, 0xfc, 0x07, 0xe0, 0x0f, 0x00, 0x84, 0x00,
-                                0xff, 0x07, 0xfc, 0x3f, 0xf8, 0xff, 0x87, 0x01,
-                                0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x00, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x10, 0x40, 0x20, 0x00, 0x10, 0x02, 0x20, 0x00,
-                                0x1f, 0xc0, 0x3f, 0x00, 0x10, 0x02, 0xe0, 0x01,
-                                0xf0, 0x7f, 0xe0, 0xff, 0x1f, 0xfe, 0x3f, 0x00,
-                                0x01, 0x00, 0x00, 0x00, 0xf0, 0x83, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x00, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0x81, 0x00, 0x40, 0x08, 0x80, 0x80, 0x00, 0x00,
-                                0xff, 0x00, 0x40, 0x08, 0x80, 0xff, 0x00, 0x00};
-
-static unsigned char AR_RSHKE_270_BITS[] = {
-                                0xff, 0xff, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00,
-                                0x20, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x02, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0xff, 0xff,
-                                0x17, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0xf8,
-                                0xff, 0x7f, 0x01, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x08,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02,
-                                0x00, 0xf8, 0xff, 0x7f, 0x01, 0x00, 0xf0, 0xff,
-                                0xff, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0x20, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x02,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
-                                0x00, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x01, 0x00,
-                                0x20, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0xf0, 0xff, 0x7f, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0xff, 0xff, 0x17, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x80,
-                                0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0xf0,
-                                0xff, 0xff, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x20, 0x00, 0x80, 0xff, 0xff,
-                                0x17, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x80,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0xff,
-                                0xff, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x20,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02,
-                                0x00, 0xf0, 0xff, 0xff, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x00, 0xff, 0xff, 0x17, 0x00, 0x00,
-                                0x01, 0x00, 0xf8, 0xff, 0x7f, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0xff, 0xff,
-                                0x0f, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00,
-                                0x02, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00, 0x02, 0x00, 0xf8, 0xff, 0x7f, 0x01,
-                                0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00,
-                                0x10, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xff, 0xff,
-                                0x02, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20,
-                                0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00,
-                                0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0xff, 0xff,
-                                0x1f, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20,
-                                0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x01,
-                                0x00, 0xf0, 0xff, 0x7f, 0x01, 0x00, 0x10, 0x00,
-                                0x80, 0xff, 0xff, 0x17, 0x00, 0x00, 0x01, 0x00,
-                                0x10, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x10,
-                                0x00, 0x00, 0x01, 0x00, 0xf0, 0xff, 0xff, 0x00,
-                                0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
-                                0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00,
-                                0x20, 0x00, 0x80, 0xff, 0xff, 0x17, 0x00, 0x00,
-                                0x01, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x10,
-                                0x00, 0x00};
-
-static unsigned char AR_SAND_BITS[] = {
-                                0x01, 0x64, 0x00, 0x06, 0x00, 0x02, 0x00, 0x02,
-                                0x00, 0x02, 0x00, 0x02, 0x04, 0x10, 0x08, 0x00,
-                                0x00, 0x00, 0x01, 0x20, 0x00, 0x04, 0x00, 0x01,
-                                0x20, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x80,
-                                0x00, 0x00, 0x08, 0x00, 0x00, 0x06, 0x00, 0x48,
-                                0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x40, 0x00, 0x10, 0x00, 0x42, 0x42, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80,
-                                0x00, 0x80, 0x00, 0xa0, 0x00, 0x90, 0x00, 0x82,
-                                0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x90, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x08,
-                                0x06, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00,
-                                0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00,
-                                0x00, 0x00, 0x01, 0x20, 0x00, 0x04, 0x00, 0x01,
-                                0x20, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
-                                0x01, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80,
-                                0x00, 0xc5, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
-                                0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x20,
-                                0x01, 0x01, 0x00, 0x08, 0x00, 0x00, 0x01, 0x20,
-                                0x10, 0x20, 0x00, 0x20, 0x00, 0x00, 0x40, 0x02,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x02,
-                                0x40, 0x00, 0x10, 0x00, 0x02, 0x40, 0x00, 0x00,
-                                0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00,
-                                0x00, 0x14, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00,
-                                0x00, 0x01};
-
-static unsigned char ANSI31_BITS[] = {
-                                0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00,
-                                0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00,
-                                0x00, 0x01};
-
-static unsigned char ANSI32_BITS[] = {
-                                0x01, 0x02, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
-                                0x04, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00,
-                                0x10, 0x20, 0x00, 0x00, 0x20, 0x40, 0x00, 0x00,
-                                0x40, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x00,
-                                0x00, 0x01, 0x02, 0x00, 0x00, 0x02, 0x04, 0x00,
-                                0x00, 0x04, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00,
-                                0x00, 0x10, 0x20, 0x00, 0x00, 0x20, 0x40, 0x00,
-                                0x00, 0x40, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01,
-                                0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x02, 0x04,
-                                0x01, 0x00, 0x04, 0x00, 0x02, 0x00, 0x08, 0x00,
-                                0x04, 0x00, 0x10, 0x00, 0x08, 0x00, 0x20, 0x00,
-                                0x10, 0x00, 0x40, 0x00, 0x20, 0x00, 0x80, 0x00,
-                                0x40, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x02,
-                                0x00, 0x01, 0x00, 0x04};
-
-static unsigned char ANSI33_BITS[] = {
-                                0x01, 0x02, 0x00, 0x02, 0x04, 0x00, 0x04, 0x08,
-                                0x00, 0x08, 0x10, 0x00, 0x10, 0x20, 0x00, 0x20,
-                                0x40, 0x00, 0x40, 0x00, 0x00, 0x80, 0x00, 0x01,
-                                0x00, 0x01, 0x02, 0x01, 0x02, 0x00, 0x02, 0x04,
-                                0x00, 0x04, 0x08, 0x00, 0x08, 0x10, 0x00, 0x10,
-                                0x20, 0x00, 0x20, 0x40, 0x00, 0x00, 0x80, 0x00,
-                                0x80, 0x00, 0x01, 0x00, 0x01, 0x02};
-
-static unsigned char ANSI34_BITS[] = {
-                                0x01, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x02,
-                                0x04, 0x08, 0x10, 0x00, 0x00, 0x00, 0x04, 0x08,
-                                0x10, 0x20, 0x00, 0x00, 0x00, 0x08, 0x10, 0x20,
-                                0x40, 0x00, 0x00, 0x00, 0x10, 0x20, 0x40, 0x80,
-                                0x00, 0x00, 0x00, 0x20, 0x40, 0x80, 0x00, 0x01,
-                                0x00, 0x00, 0x40, 0x80, 0x00, 0x01, 0x02, 0x00,
-                                0x00, 0x80, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
-                                0x00, 0x01, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00,
-                                0x02, 0x04, 0x08, 0x10, 0x00, 0x00, 0x00, 0x04,
-                                0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x08, 0x10,
-                                0x20, 0x40, 0x00, 0x00, 0x00, 0x10, 0x20, 0x40,
-                                0x80, 0x00, 0x00, 0x00, 0x20, 0x40, 0x80, 0x00,
-                                0x01, 0x00, 0x00, 0x40, 0x80, 0x00, 0x01, 0x02,
-                                0x00, 0x00, 0x80, 0x00, 0x01, 0x02, 0x04, 0x00,
-                                0x00, 0x00, 0x01, 0x02, 0x04, 0x08, 0x00, 0x00,
-                                0x00, 0x02, 0x04, 0x08, 0x10, 0x00, 0x00, 0x00,
-                                0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x08,
-                                0x10, 0x20, 0x40, 0x00, 0x00, 0x00, 0x10, 0x20,
-                                0x40, 0x80, 0x00, 0x00, 0x00, 0x20, 0x40, 0x80,
-                                0x00, 0x01, 0x00, 0x00, 0x40, 0x80, 0x00, 0x01,
-                                0x02, 0x00, 0x00, 0x80, 0x00, 0x01, 0x02, 0x04,
-                                0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x08, 0x00,
-                                0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x00, 0x00,
-                                0x00, 0x04, 0x08, 0x10, 0x20, 0x01, 0x00, 0x00,
-                                0x08, 0x10, 0x20, 0x00, 0x02, 0x00, 0x00, 0x10,
-                                0x20, 0x40, 0x00, 0x04, 0x00, 0x00, 0x20, 0x40,
-                                0x80, 0x00, 0x08, 0x00, 0x00, 0x40, 0x80, 0x00,
-                                0x01, 0x10, 0x00, 0x00, 0x80, 0x00, 0x01, 0x02,
-                                0x20, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x40,
-                                0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x80, 0x00,
-                                0x00, 0x00, 0x04, 0x08, 0x10, 0x00, 0x01, 0x00,
-                                0x00, 0x08, 0x10, 0x20, 0x01, 0x02, 0x00, 0x00,
-                                0x10, 0x20, 0x00, 0x02, 0x04, 0x00, 0x00, 0x20,
-                                0x40, 0x00, 0x04, 0x08, 0x00, 0x00, 0x40, 0x80,
-                                0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x00, 0x01,
-                                0x10, 0x20, 0x00, 0x00, 0x00, 0x01, 0x02, 0x20,
-                                0x40, 0x00, 0x00, 0x00, 0x02, 0x04, 0x40, 0x80,
-                                0x00, 0x00, 0x00, 0x04, 0x08, 0x80, 0x00, 0x01,
-                                0x00, 0x00, 0x08, 0x10, 0x00, 0x01, 0x02, 0x00,
-                                0x00, 0x10, 0x20, 0x01, 0x02, 0x04, 0x00, 0x00,
-                                0x20, 0x00, 0x02, 0x04, 0x08, 0x00, 0x00, 0x40,
-                                0x00, 0x04, 0x08, 0x10, 0x00, 0x00, 0x80, 0x00,
-                                0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x01, 0x10,
-                                0x20, 0x40, 0x00, 0x00, 0x00, 0x02, 0x20, 0x40,
-                                0x80, 0x00, 0x00, 0x00, 0x04, 0x40, 0x80, 0x00,
-                                0x01, 0x00, 0x00, 0x08, 0x80, 0x00, 0x01, 0x02,
-                                0x00, 0x00, 0x10, 0x00, 0x01, 0x02, 0x04, 0x00,
-                                0x00, 0x20};
-
-static unsigned char ANSI35_BITS[] = {
-                                0x01, 0x02, 0x04, 0x08, 0x00, 0x02, 0x04, 0x08,
-                                0x10, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x08,
-                                0x10, 0x20, 0x00, 0x00, 0x10, 0x20, 0x40, 0x00,
-                                0x00, 0x20, 0x40, 0x80, 0x00, 0x01, 0x40, 0x80,
-                                0x00, 0x01, 0x00, 0x80, 0x00, 0x01, 0x02, 0x04,
-                                0x00, 0x01, 0x02, 0x04, 0x08, 0x01, 0x02, 0x04,
-                                0x08, 0x00, 0x02, 0x04, 0x08, 0x10, 0x00, 0x04,
-                                0x08, 0x10, 0x20, 0x00, 0x08, 0x10, 0x00, 0x40,
-                                0x00, 0x10, 0x20, 0x00, 0x80, 0x00, 0x20, 0x40,
-                                0x80, 0x00, 0x01, 0x40, 0x80, 0x00, 0x00, 0x02,
-                                0x80, 0x00, 0x01, 0x02, 0x04, 0x00, 0x01, 0x02,
-                                0x04, 0x08, 0x01, 0x02, 0x04, 0x08, 0x00, 0x02,
-                                0x04, 0x08, 0x10, 0x00, 0x04, 0x08, 0x10, 0x20,
-                                0x00, 0x08, 0x00, 0x20, 0x40, 0x00, 0x10, 0x00,
-                                0x40, 0x80, 0x00, 0x20, 0x40, 0x80, 0x00, 0x01,
-                                0x40, 0x00, 0x00, 0x01, 0x02, 0x80, 0x00, 0x01,
-                                0x02, 0x04, 0x00, 0x01, 0x02, 0x04, 0x08, 0x01,
-                                0x02, 0x04, 0x08, 0x00, 0x02, 0x04, 0x08, 0x10,
-                                0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x10,
-                                0x20, 0x40, 0x00, 0x00, 0x20, 0x40, 0x80, 0x00,
-                                0x20, 0x40, 0x80, 0x00, 0x01, 0x00, 0x80, 0x00,
-                                0x01, 0x02, 0x80, 0x00, 0x01, 0x02, 0x04, 0x00,
-                                0x01, 0x02, 0x04, 0x08};
-
-static unsigned char ANSI36_BITS[] = {
-                                0x01, 0x00, 0x02, 0x04, 0x04, 0x00, 0x08, 0x10,
-                                0x10, 0x20, 0x20, 0x40, 0x40, 0x00, 0x80, 0x00,
-                                0x00, 0x01, 0x00, 0x02, 0x02, 0x04, 0x00, 0x08,
-                                0x08, 0x00, 0x10, 0x20, 0x20, 0x00};
-
-static unsigned char ANSI37_BITS[] = {
-                                0x01, 0x00, 0x02, 0x01, 0x84, 0x00, 0x48, 0x00,
-                                0x30, 0x00, 0x30, 0x00, 0x48, 0x00, 0x84, 0x00,
-                                0x02, 0x01};
-
-static unsigned char ANSI38_BITS[] = {
-                                0x01, 0x02, 0x00, 0x02, 0x05, 0x02, 0x84, 0x08,
-                                0x01, 0x48, 0x10, 0x00, 0x30, 0x20, 0x00, 0x30,
-                                0x40, 0x00, 0x48, 0x80, 0x00, 0x84, 0x00, 0x01,
-                                0x00, 0x01, 0x02, 0x01, 0x02, 0x00, 0x02, 0x05,
-                                0x00, 0x84, 0x08, 0x03, 0x48, 0x90, 0x00, 0x30,
-                                0x60, 0x00, 0x30, 0x60, 0x00, 0x48, 0x90, 0x00,
-                                0x84, 0x08, 0x01, 0x02, 0x01, 0x02};
-
-static unsigned char ACAD_ISO02W100_BITS[] = {
-                                0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO03W100_BITS[] = {
-                                0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO04W100_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x1f, 0x02, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO05W100_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x1f, 0xc2, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO06W100_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x1f, 0x43, 0x18, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO07W100_BITS[] = {
-                                0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO08W100_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0x07, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO09W100_BITS[] = {
-                                0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xc7, 0xff,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO10W100_BITS[] = {
-                                0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO11W100_BITS[] = {
-                                0xff, 0xff, 0xc7, 0xff, 0xff, 0x61, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO12W100_BITS[] = {
-                                0xff, 0xff, 0x87, 0x30, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO13W100_BITS[] = {
-                                0xff, 0xff, 0x87, 0xff, 0xff, 0x63, 0x08, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO14W100_BITS[] = {
-                                0xff, 0xff, 0xc7, 0x10, 0x06, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-static unsigned char ACAD_ISO15W100_BITS[] = {
-                                0xff, 0xff, 0x87, 0xff, 0xff, 0x63, 0x0c, 0x01,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-//------------------------------------------------------------------------------
-// AutoCAD fill patterns defined as a series of line segments. The first element
-// in each array specifies the number of segments, and subsequent quads of
-// elements specify the line segment endpoints. These arrays were supplied to
-// us by the Actrix SWD team.
-//------------------------------------------------------------------------------
-
-// Removed..... we use bitmaps
-
-
-static unsigned char SHAPEFILL12_BITS[] = {0xff, 0xef, 0xff, 0xfe, 0xff, 0xef, 0xff, 0xfe};
-static unsigned char SHAPEFILL13_BITS[] = {0xff, 0xee, 0xff, 0xbb, 0xff, 0xee, 0xff, 0xbb};
-static unsigned char SHAPEFILL14_BITS[] = {0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb, 0xee, 0xbb};
-static unsigned char SHAPEFILL15_BITS[] = {0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55};
-static unsigned char SHAPEFILL16_BITS[] = {0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11};
-static unsigned char SHAPEFILL17_BITS[] = {0x00, 0x44, 0x00, 0x11, 0x00, 0x44, 0x00, 0x11};
-static unsigned char SHAPEFILL18_BITS[] = {0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x00, 0x01};
-static unsigned char SHAPEFILL19_BITS[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff};
-static unsigned char SHAPEFILL20_BITS[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff};
-static unsigned char SHAPEFILL21_BITS[] = {0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff};
-static unsigned char SHAPEFILL22_BITS[] = {0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff};
-static unsigned char SHAPEFILL23_BITS[] = {0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff};
-static unsigned char SHAPEFILL24_BITS[] = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
-static unsigned char SHAPEFILL25_BITS[] = {0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03};
-static unsigned char SHAPEFILL26_BITS[] = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11};
-static unsigned char SHAPEFILL27_BITS[] = {0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33};
-static unsigned char SHAPEFILL28_BITS[] = {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
-static unsigned char SHAPEFILL29_BITS[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
-static unsigned char SHAPEFILL30_BITS[] = {0x81, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0};
-static unsigned char SHAPEFILL31_BITS[] = {0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88};
-static unsigned char SHAPEFILL32_BITS[] = {0x99, 0x33, 0x66, 0xcc, 0x99, 0x33, 0x66, 0xcc};
-static unsigned char SHAPEFILL33_BITS[] = {0xee, 0xdd, 0xbb, 0x77, 0xee, 0xdd, 0xbb, 0x77};
-static unsigned char SHAPEFILL34_BITS[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
-static unsigned char SHAPEFILL35_BITS[] = {0x81, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03};
-static unsigned char SHAPEFILL36_BITS[] = {0x88, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11};
-static unsigned char SHAPEFILL37_BITS[] = {0x99, 0xcc, 0x66, 0x33, 0x99, 0xcc, 0x66, 0x33};
-static unsigned char SHAPEFILL38_BITS[] = {0x77, 0xbb, 0xdd, 0xee, 0x77, 0xbb, 0xdd, 0xee};
-static unsigned char SHAPEFILL39_BITS[] = {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff};
-static unsigned char SHAPEFILL40_BITS[] = {0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff};
-static unsigned char SHAPEFILL41_BITS[] = {0x11, 0x11, 0x11, 0xff, 0x11, 0x11, 0x11, 0xff};
-static unsigned char SHAPEFILL42_BITS[] = {0x33, 0x33, 0xff, 0xff, 0x33, 0x33, 0xff, 0xff};
-static unsigned char SHAPEFILL43_BITS[] = {0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff};
-static unsigned char SHAPEFILL44_BITS[] = {0x80, 0x41, 0x22, 0x14, 0x08, 0x14, 0x22, 0x41};
-static unsigned char SHAPEFILL45_BITS[] = {0x81, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3};
-static unsigned char SHAPEFILL46_BITS[] = {0x88, 0x55, 0x22, 0x55, 0x88, 0x55, 0x22, 0x55};
-static unsigned char SHAPEFILL47_BITS[] = {0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33};
-static unsigned char SHAPEFILL48_BITS[] = {0xb1, 0x30, 0x03, 0x1b, 0xd8, 0xc0, 0x0c, 0x8d};
-static unsigned char SHAPEFILL49_BITS[] = {0x20, 0x02, 0x10, 0x80, 0x04, 0x40, 0x08, 0x01};
-static unsigned char SHAPEFILL50_BITS[] = {0x00, 0x55, 0x00, 0x55, 0x00, 0x55, 0x00, 0x55};
-static unsigned char SHAPEFILL51_BITS[] = {0x00, 0x10, 0x20, 0x40, 0x00, 0x04, 0x02, 0x01};
-static unsigned char SHAPEFILL52_BITS[] = {0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01};
-static unsigned char SHAPEFILL53_BITS[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
-static unsigned char SHAPEFILL54_BITS[] = {0x80, 0x80, 0x80, 0x41, 0x22, 0x9c, 0x22, 0x41};
-static unsigned char SHAPEFILL55_BITS[] = {0x8e, 0x44, 0xe8, 0xf1, 0xe2, 0x44, 0x2e, 0x1f};
-static unsigned char SHAPEFILL56_BITS[] = {0x20, 0x20, 0x50, 0xaa, 0x02, 0x02, 0x05, 0xaa};
-static unsigned char SHAPEFILL57_BITS[] = {0x40, 0xa0, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04};
-static unsigned char SHAPEFILL58_BITS[] = {0x0d, 0x0d, 0x0d, 0x0d, 0xfd, 0xfd, 0x00, 0xfd};
-static unsigned char SHAPEFILL59_BITS[] = {0x10, 0x10, 0x10, 0xff, 0x01, 0x01, 0x01, 0xff};
-static unsigned char SHAPEFILL60_BITS[] = {0x00, 0x01, 0x00, 0x11, 0x00, 0x01, 0x00, 0x55};
-static unsigned char SHAPEFILL61_BITS[] = {0x20, 0x40, 0x80, 0x01, 0x83, 0x44, 0x38, 0x10};
-static unsigned char SHAPEFILL62_BITS[] = {0x00, 0x55, 0x00, 0x11, 0x82, 0x44, 0x28, 0x11};
-static unsigned char SHAPEFILL63_BITS[] = {0x00, 0x00, 0x50, 0x20, 0x00, 0x00, 0x05, 0x02};
-static unsigned char SHAPEFILL64_BITS[] = {0x80, 0x80, 0x40, 0x30, 0x0c, 0x12, 0x21, 0xc0};
-static unsigned char SHAPEFILL65_BITS[] = {0xc7, 0x28, 0x10, 0x10, 0x7c, 0x82, 0x01, 0x01};
-static unsigned char SHAPEFILL66_BITS[] = {0x10, 0x20, 0x40, 0xff, 0x55, 0x2a, 0x04, 0x08};
-static unsigned char SHAPEFILL67_BITS[] = {0x1f, 0x1f, 0x19, 0xee, 0xf1, 0xf1, 0x91, 0xee};
-static unsigned char SHAPEFILL68_BITS[] = {0x10, 0x28, 0x54, 0xaa, 0x54, 0x28, 0x10, 0x00};
-static unsigned char SHAPEFILL69_BITS[] = {0x22, 0x49, 0x9c, 0x39, 0x92, 0x44, 0x28, 0x14};
-static unsigned char SHAPEFILL70_BITS[] = {0x00, 0x06, 0x06, 0x06, 0x00, 0x60, 0x60, 0x60};
-static unsigned char SHAPEFILL71_BITS[] = {0x8f, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x88};
-
-// fill pattern definitions (bit patterns and segments)
-struct FillPattern
-{
-    int m_width;          // width of the pattern in pixels
-    int m_height;         // height of the pattern in pixels
-    unsigned char* m_bits;// pointer to the pixel pattern array
-};
-
-static FillPattern s_fillPattern[] = {
-    {  8,   8, NONE_BITS},             // none
-    {  8,   8, SOLID_BITS},            // solid
-    {  8,   8, SHAPEFILL14_BITS},      // hatch
-    {  8,   8, SHAPEFILL19_BITS},      // horizontal shapefill19
-    {  8,   8, SHAPEFILL24_BITS},      // vertical shapefill24
-    {  8,   8, SHAPEFILL29_BITS},      // diagonal45 shapefill29
-    {  8,   8, SHAPEFILL34_BITS},      // diagonal135 shapefill34
-    {  8,   8, SHAPEFILL39_BITS},      // cross shapefill39
-    {  8,   8, SHAPEFILL44_BITS},      // diagonalcross shapefill44
-    { 10,  10, ANGLE_BITS},
-    { 25,  25, BOX_BITS},
-    { 10,  13, BRASS_BITS},
-    { 17,  17, BRICK_BITS},
-    { 36,  24, BRSTONE_BITS},
-    { 20,  12, CLAY_BITS},
-    { 32,  32, CORK_BITS},
-    { 24,  24, CROSS_BITS},
-    { 12,  12, DASH_BITS},
-    { 96,  96, DOLMIT_BITS},
-    {  8,  16, DOTS_BITS},
-    { 44,  44, EARTH_BITS},
-    { 30,  53, ESCHER_BITS},
-    { 20,  10, FLEX_BITS},
-    { 36,  36, GRASS_BITS},
-    { 19,   5, GRATE_BITS},
-    { 35,  20, HEX_BITS},
-    { 18,  10, HONEY_BITS},
-    {152, 152, HOUND_BITS},
-    {  8,  12, INSUL_BITS},
-    { 32,  16, MUDST_BITS},
-    { 10,  16, NET3_BITS},
-    { 16,  16, PLAST_BITS},
-    { 16,  16, PLASTI_BITS},
-    { 10,  10, SACNCR_BITS},
-    {  8,   8, SQUARE_BITS},
-    { 24,  42, STARS_BITS},
-    { 14,  14, STEEL_BITS},
-    { 58, 100, SWAMP_BITS},
-    {  8,   8, TRANS_BITS},
-    { 20,  36, TRIANG_BITS},
-    { 16,  16, ZIGZAG_BITS},
-    { 20,  20, AR_B816_BITS},
-    { 20,  20, AR_B816C_BITS},
-    { 10,  20, AR_B88_BITS},
-    { 36,  24, AR_BRELM_BITS},
-    { 36,  24, AR_BRSTD_BITS},
-    { 64,  64, AR_CONC_BITS},
-    { 24,  12, AR_HBONE_BITS},
-    { 60,  60, AR_PARQ1_BITS},
-    {288, 100, AR_RROOF_BITS},
-    {100, 288, AR_RROOF_90_BITS},
-    { 57,  80, AR_RSHKE_BITS},
-    { 80,  57, AR_RSHKE_90_BITS},
-    { 57,  80, AR_RSHKE_180_BITS},
-    { 80,  57, AR_RSHKE_270_BITS},
-    {100,  18, AR_SAND_BITS},
-    {  9,   9, ANSI31_BITS},
-    { 27,  27, ANSI32_BITS},
-    { 18,  18, ANSI33_BITS},
-    { 54,  54, ANSI34_BITS},
-    { 36,  36, ANSI35_BITS},
-    { 15,  15, ANSI36_BITS},
-    {  9,   9, ANSI37_BITS},
-    { 18,  18, ANSI38_BITS},
-    { 23,   8, ACAD_ISO02W100_BITS},
-    { 45,   8, ACAD_ISO03W100_BITS},
-    { 46,   8, ACAD_ISO04W100_BITS},
-    { 51,   8, ACAD_ISO05W100_BITS},
-    { 56,   8, ACAD_ISO06W100_BITS},
-    {  5,   8, ACAD_ISO07W100_BITS},
-    { 54,   8, ACAD_ISO08W100_BITS},
-    { 68,   8, ACAD_ISO09W100_BITS},
-    { 28,   8, ACAD_ISO10W100_BITS},
-    { 50,   8, ACAD_ISO11W100_BITS},
-    { 33,   8, ACAD_ISO12W100_BITS},
-    { 56,   8, ACAD_ISO13W100_BITS},
-    { 38,   8, ACAD_ISO14W100_BITS},
-    { 61,   8, ACAD_ISO15W100_BITS},
-    {  8,   8, SHAPEFILL12_BITS},
-    {  8,   8, SHAPEFILL13_BITS},
-    {  8,   8, SHAPEFILL14_BITS},
-    {  8,   8, SHAPEFILL15_BITS},
-    {  8,   8, SHAPEFILL16_BITS},
-    {  8,   8, SHAPEFILL17_BITS},
-    {  8,   8, SHAPEFILL18_BITS},
-    {  8,   8, SHAPEFILL19_BITS}, // duplicates Horizontal hatch
-    {  8,   8, SHAPEFILL20_BITS},
-    {  8,   8, SHAPEFILL21_BITS},
-    {  8,   8, SHAPEFILL22_BITS},
-    {  8,   8, SHAPEFILL23_BITS},
-    {  8,   8, SHAPEFILL24_BITS}, // duplicates Vertical hatch
-    {  8,   8, SHAPEFILL25_BITS},
-    {  8,   8, SHAPEFILL26_BITS},
-    {  8,   8, SHAPEFILL27_BITS},
-    {  8,   8, SHAPEFILL28_BITS},
-    {  8,   8, SHAPEFILL29_BITS}, // duplicate Diagonal45 hatch
-    {  8,   8, SHAPEFILL30_BITS},
-    {  8,   8, SHAPEFILL31_BITS},
-    {  8,   8, SHAPEFILL32_BITS},
-    {  8,   8, SHAPEFILL33_BITS},
-    {  8,   8, SHAPEFILL34_BITS}, // duplicate Diagonal135 hatch
-    {  8,   8, SHAPEFILL35_BITS},
-    {  8,   8, SHAPEFILL36_BITS},
-    {  8,   8, SHAPEFILL37_BITS},
-    {  8,   8, SHAPEFILL38_BITS},
-    {  8,   8, SHAPEFILL39_BITS}, // duplicate Cross hatch
-    {  8,   8, SHAPEFILL40_BITS},
-    {  8,   8, SHAPEFILL41_BITS},
-    {  8,   8, SHAPEFILL42_BITS},
-    {  8,   8, SHAPEFILL43_BITS},
-    {  8,   8, SHAPEFILL44_BITS}, // duplicate DiagonalCross hatch
-    {  8,   8, SHAPEFILL45_BITS},
-    {  8,   8, SHAPEFILL46_BITS},
-    {  8,   8, SHAPEFILL47_BITS},
-    {  8,   8, SHAPEFILL48_BITS},
-    {  8,   8, SHAPEFILL49_BITS},
-    {  8,   8, SHAPEFILL50_BITS},
-    {  8,   8, SHAPEFILL51_BITS},
-    {  8,   8, SHAPEFILL52_BITS},
-    {  8,   8, SHAPEFILL53_BITS},
-    {  8,   8, SHAPEFILL54_BITS},
-    {  8,   8, SHAPEFILL55_BITS},
-    {  8,   8, SHAPEFILL56_BITS},
-    {  8,   8, SHAPEFILL57_BITS},
-    {  8,   8, SHAPEFILL58_BITS},
-    {  8,   8, SHAPEFILL59_BITS},
-    {  8,   8, SHAPEFILL60_BITS},
-    {  8,   8, SHAPEFILL61_BITS},
-    {  8,   8, SHAPEFILL62_BITS},
-    {  8,   8, SHAPEFILL63_BITS},
-    {  8,   8, SHAPEFILL64_BITS},
-    {  8,   8, SHAPEFILL65_BITS},
-    {  8,   8, SHAPEFILL66_BITS},
-    {  8,   8, SHAPEFILL67_BITS},
-    {  8,   8, SHAPEFILL68_BITS},
-    {  8,   8, SHAPEFILL69_BITS},
-    {  8,   8, SHAPEFILL70_BITS},
-    {  8,   8, SHAPEFILL71_BITS}
-};
-
-
-static wchar_t* fillPatternNames[] = {
-        L"None",
-        L"Solid",
-        L"Square",
-        L"Line",
-        L"Line_90",
-        L"Line_45",
-        L"Line_135",
-        L"Net",
-        L"Net_45",
-        L"ANGLE",
-        L"BOX",
-        L"BRASS",
-        L"BRICK",
-        L"BRSTONE",
-        L"CLAY",
-        L"CORK",
-        L"CROSS",
-        L"DASH",
-        L"DOLMIT",
-        L"DOTS",
-        L"EARTH",
-        L"ESCHER",
-        L"FLEX",
-        L"GRASS",
-        L"GRATE",
-        L"HEX",
-        L"HONEY",
-        L"HOUND",
-        L"INSUL",
-        L"MUDST",
-        L"NET3",
-        L"PLAST",
-        L"PLASTI",
-        L"SACNCR",
-        L"SQUARE",
-        L"STARS",
-        L"STEEL",
-        L"SWAMP",
-        L"TRANS",
-        L"TRIANG",
-        L"ZIGZAG",
-        L"AR_B816",
-        L"AR_B816C",
-        L"AR_B88",
-        L"AR_BRELM",
-        L"AR_BRSTD",
-        L"AR_CONC",
-        L"AR_HBONE",
-        L"AR_PARQ1",
-        L"AR_RROOF",
-        L"AR_RROOF_90",
-        L"AR_RSHKE",
-        L"AR_RSHKE_90",
-        L"AR_RSHKE_180",
-        L"AR_RSHKE_270",
-        L"AR_SAND",
-        L"ANSI31",
-        L"ANSI32",
-        L"ANSI33",
-        L"ANSI34",
-        L"ANSI35",
-        L"ANSI36",
-        L"ANSI37",
-        L"ANSI38",
-        L"ACAD_ISO02W100",
-        L"ACAD_ISO03W100",
-        L"ACAD_ISO04W100",
-        L"ACAD_ISO05W100",
-        L"ACAD_ISO06W100",
-        L"ACAD_ISO07W100",
-        L"ACAD_ISO08W100",
-        L"ACAD_ISO09W100",
-        L"ACAD_ISO10W100",
-        L"ACAD_ISO11W100",
-        L"ACAD_ISO12W100",
-        L"ACAD_ISO13W100",
-        L"ACAD_ISO14W100",
-        L"ACAD_ISO15W100",
-        L"ShapeFill12",
-        L"ShapeFill13",
-        L"ShapeFill14",
-        L"ShapeFill15",
-        L"ShapeFill16",
-        L"ShapeFill17",
-        L"ShapeFill18",
-        L"ShapeFill19",
-        L"ShapeFill20",
-        L"ShapeFill21",
-        L"ShapeFill22",
-        L"ShapeFill23",
-        L"ShapeFill24",
-        L"ShapeFill25",
-        L"ShapeFill26",
-        L"ShapeFill27",
-        L"ShapeFill28",
-        L"ShapeFill29",
-        L"ShapeFill30",
-        L"ShapeFill31",
-        L"ShapeFill32",
-        L"ShapeFill33",
-        L"ShapeFill34",
-        L"ShapeFill35",
-        L"ShapeFill36",
-        L"ShapeFill37",
-        L"ShapeFill38",
-        L"ShapeFill39",
-        L"ShapeFill40",
-        L"ShapeFill41",
-        L"ShapeFill42",
-        L"ShapeFill43",
-        L"ShapeFill44",
-        L"ShapeFill45",
-        L"ShapeFill46",
-        L"ShapeFill47",
-        L"ShapeFill48",
-        L"ShapeFill49",
-        L"ShapeFill50",
-        L"ShapeFill51",
-        L"ShapeFill52",
-        L"ShapeFill53",
-        L"ShapeFill54",
-        L"ShapeFill55",
-        L"ShapeFill56",
-        L"ShapeFill57",
-        L"ShapeFill58",
-        L"ShapeFill59",
-        L"ShapeFill60",
-        L"ShapeFill61",
-        L"ShapeFill62",
-        L"ShapeFill63",
-        L"ShapeFill64",
-        L"ShapeFill65",
-        L"ShapeFill66",
-        L"ShapeFill67",
-        L"ShapeFill68",
-        L"ShapeFill69",
-        L"ShapeFill70",
-        L"ShapeFill71"
-};
-
-
-gdImagePtr GDFillPatterns::CreatePatternBitmap(const wchar_t* name, int fgColor, int bgColor)
-{
-    int index = 1; //Solid by default
-
-    //find the index
-    for (int i=0; i<sizeof(fillPatternNames) / sizeof(wchar_t*);  i++)
-    {
-        if (_wcsicmp(name, fillPatternNames[i]) == 0)
-        {
-            index = i;
-            break;
-        }
-    }
-
-    FillPattern fp = s_fillPattern[index];
-
-    gdImagePtr ret = gdImageCreateTrueColor(fp.m_width, fp.m_height);
-    gdImageAlphaBlending(ret, 0);
-
-    for (int row=0; row<fp.m_height; row++)
-    {
-        for (int col=0; col < fp.m_width; col++)
-        {
-            int bytesPerRow =  (fp.m_width + 7) / 8;
-            int baseIndex = (fp.m_height - row - 1) * bytesPerRow;
-            int byteIndex =  baseIndex + col / 8;
-            int bitIndex = col % 8;
-
-            if ((fp.m_bits[byteIndex] & 0x01 << bitIndex) != 0)
-                gdImageSetPixel(ret, col, row, fgColor);
-            else
-                gdImageSetPixel(ret, col, row, bgColor);
-        }
-    }
-
-    gdImageAlphaBlending(ret, 1);
-
-    return ret;
-}

Deleted: trunk/MgDev/Common/Renderers/GDFillPatterns.h
===================================================================
--- trunk/MgDev/Common/Renderers/GDFillPatterns.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDFillPatterns.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,29 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GDFILLPATTERNS_H
-#define GDFILLPATTERNS_H
-
-#include "gd.h"
-
-class GDFillPatterns
-{
-public:
-    static gdImagePtr CreatePatternBitmap(const wchar_t* name, int fgColor, int bgColor);
-};
-
-#endif

Deleted: trunk/MgDev/Common/Renderers/GDRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/GDRenderer.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDRenderer.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,2703 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-
-#include "GDRenderer.h"
-#include "LineStyle.h"
-#include "SLDSymbols.h"
-#include "LineStyleDef.h"
-
-#include "dwfcore/File.h"
-#include "dwfcore/String.h"
-#include "dwfcore/Exception.h"
-#include "dwfcore/MIME.h"
-#include "dwfcore/StreamFileDescriptor.h"
-#include "dwfcore/InputStream.h"
-#include "dwfcore/FileInputStream.h"
-#include "dwfcore/BufferOutputStream.h"
-#include "dwfcore/BufferInputStream.h"
-
-#include "dwf/Version.h"
-#include "dwf/package/Constants.h"
-#include "dwf/package/Manifest.h"
-#include "dwf/package/EPlotSection.h"
-#include "dwf/package/GlobalSection.h"
-#include "dwf/package/DefinedObject.h"
-#include "dwf/package/writer/PackageWriter.h"
-#include "dwf/package/reader/PackageReader.h"
-
-//GD headers
-#include "gd.h"
-
-#include "FontManager.h"
-#include "GDUtils.h"
-
-#include "GDFillPatterns.h"
-#include "GDW2DRewriter.h"
-#include "DWFRSInputStream.h"
-#include "RSDWFInputStream.h"
-#include "LabelRenderer.h"
-#include "LabelRendererLocal.h"
-#include "complex_polygon_gd.h"
-
-#include "SymbolTrans.h"
-#include "RenderUtil.h"
-#include "SE_SymbolDefProxies.h"
-
-using namespace DWFToolkit;
-using namespace DWFCore;
-
-#define ROUND(x) (int)(floor(x+0.5))
-
-#define SYMBOL_BITMAP_SIZE 128
-#define SYMBOL_BITMAP_MAX 1024
-
-// maximum allowed size for images
-#define IMAGE_SIZE_MAX 2048.0*2048.0
-
-
-// Dummy class used to automate initialization/uninitialization of GD.
-class CInitGD
-{
-public:
-    CInitGD()
-    {
-        // initialize font cache
-        gdFontCacheSetup();
-    }
-
-    ~CInitGD()
-    {
-        // free GD resources
-        gdFontCacheShutdown();
-    }
-};
-
-static CInitGD sg_InitGD;
-
-
-bool GDRenderer::s_bGeneralizeData = false;
-
-
-//default constructor
-GDRenderer::GDRenderer(int width,
-                       int height,
-                       RS_Color& bgColor,
-                       bool requiresClipping,
-                       bool localOverposting,
-                       double tileExtentOffset)
-:
-m_width(width),
-m_height(height),
-m_bgcolor(bgColor),
-m_extents(0.0, 0.0, 0.0, 0.0),
-m_wtPointBuffer(NULL),
-m_wtPointLen(0),
-m_symbolManager(NULL),
-m_mapInfo(NULL),
-m_layerInfo(NULL),
-m_featureClassInfo(NULL),
-m_bRequiresClipping(requiresClipping),
-m_bIsSymbolW2D(false),
-m_bHaveViewport(false),
-m_imsym(NULL),
-m_input(NULL),
-m_xformer()
-{
-    if (m_width <= 0)
-        m_width = 1;
-    if (m_height <= 0)
-        m_height = 1;
-
-    //set max line width to the screen diagonal
-    m_maxLineWidth = (int)(0.5 + sqrt((double)(m_width * m_width + m_height * m_height)));
-
-    gdImagePtr img = gdImageCreateTrueColor(m_width, m_height);
-    m_imout = img;
-
-    int bgc = ConvertColor(img, bgColor);
-
-    // initialize the image to the supplied color (temporarily turn
-    // off alpha blending so the fill has the supplied alpha)
-    gdImageAlphaBlending(img, 0);
-    gdImageFilledRectangle(img, 0, 0, gdImageSX(img)-1, gdImageSY(img)-1, bgc);
-    gdImageAlphaBlending(img, 1);
-
-    // set any transparent color
-    if (bgColor.alpha() != 255)
-        gdImageColorTransparent(img, bgc);
-
-    if (!localOverposting)
-        m_labeler = new LabelRenderer(this);
-    else
-        m_labeler = new LabelRendererLocal(this, tileExtentOffset);
-
-    m_polyrasterizer = new complex_polygon_gd();
-}
-
-
-GDRenderer::~GDRenderer()
-{
-    gdImageDestroy((gdImagePtr)m_imout);
-
-    if (m_imsym)
-        gdImageDestroy((gdImagePtr)m_imsym);
-
-    delete [] m_wtPointBuffer;
-    delete m_labeler;
-    delete m_polyrasterizer;
-}
-
-
-void GDRenderer::Save(const RS_String& filename, const RS_String& format)
-{
-    Save(filename, format, m_width, m_height);
-}
-
-
-void GDRenderer::Save(const RS_String& filename, const RS_String& format, int width, int height)
-{
-    //get the in-memory image stream
-    auto_ptr<RS_ByteData> data;
-    data.reset(Save(format, width, height));
-
-    if (NULL == data.get())
-    {
-        return;
-    }
-
-    //We write to a file to avoid sending a FILE* across DLL
-    //boundary, which is not always safe.
-
-    //TODO: take care of this string conversion -- shouldn't matter
-    //since it is only a temp file name anyway, and they are ascii
-    char mbfilename[1024];
-    wcstombs(mbfilename, filename.c_str(), 1024);
-
-    FILE* out = fopen(mbfilename, "wb");
-    _ASSERT(out);
-
-    if (out)
-    {
-        unsigned char* bytes = data->GetBytes();
-        unsigned int numBytes = data->GetNumBytes();
-        if (fwrite(bytes, 1, numBytes, out) != numBytes)
-            _ASSERT(false);
-    }
-
-    fclose(out);
-}
-
-
-RS_ByteData* GDRenderer::Save(const RS_String& format, int width, int height)
-{
-    gdImagePtr im = NULL;
-
-    if (width <= 0)
-        width = 1;
-    if (height <= 0)
-        height = 1;
-
-    //do we need to stretch to non-square pixels?
-    if (width != m_width || height != m_height || format == L"PNG8")
-    {
-        if(format == L"PNG8")
-            im = gdImageCreate(width, height);
-        else
-            im = gdImageCreateTrueColor(width, height);
-
-        int bgc = ConvertColor(im, m_bgcolor);
-
-        // initialize the destination image to the bg color (temporarily turn
-        // off alpha blending so the fill has the supplied alpha)
-        gdImageAlphaBlending(im, 0);
-        gdImageFilledRectangle(im, 0, 0, gdImageSX(im)-1, gdImageSY(im)-1, bgc);
-
-        // set any transparent color
-        if (m_bgcolor.alpha() != 255)
-            gdImageColorTransparent(im, bgc);
-
-        gdImageCopyResized(im, (gdImagePtr)m_imout, 0, 0, 0, 0, width, height, m_width, m_height);
-        gdImageAlphaBlending(im, 1);
-    }
-    else
-        im = (gdImagePtr)m_imout;
-
-    // Make output image non-interlaced --- it's a little faster to compress that way.
-    gdImageInterlace(im, 0);
-
-    // Make sure the alpha values get saved -- but only if required
-    // it is faster not to save them and makes a smaller PNG
-    if (m_bgcolor.alpha() != 255)
-        gdImageSaveAlpha(im, 1);
-    else
-        gdImageSaveAlpha(im, 0);
-
-    //get an in-memory image stream
-    int size = 0;
-    unsigned char* data = NULL;
-
-    // TODO: Tiff
-    if (format == L"GIF")       // MgImageFormats::Gif
-        data = (unsigned char*)gdImageGifPtr(im, &size);
-    else if (format == L"JPG")  // MgImageFormats::Jpeg
-        data = (unsigned char*)gdImageJpegPtr(im, &size, 75);
-//  else if (format == L"TIF")  // MgImageFormats::Tiff
-//      data = (unsigned char*)gdImageTiffPtr(im, &size);
-    else if (format == L"PNG"
-        || format == L"PNG8")   // MgImageFormats::Png || MgImageFormats::Png8
-        data = (unsigned char*)gdImagePngPtr(im, &size);
-    else                        // PNG is the default
-        data = (unsigned char*)gdImagePngPtr(im, &size);
-
-    auto_ptr<RS_ByteData> byteData;
-
-    byteData.reset((NULL == data)? NULL : new RS_ByteData(data, size));
-
-    gdFree(data);
-
-    //if we allocated a temporary image to stretch-blit, destroy it
-    if (im != m_imout)
-        gdImageDestroy(im);
-
-    return byteData.release();
-}
-
-
-void GDRenderer::Combine(const RS_String& fileIn1, const RS_String& fileIn2, const RS_String& fileOut)
-{
-    char mbfileIn1[1024];
-    char mbfileIn2[1024];
-    char mbfileOut[1024];
-    wcstombs(mbfileIn1, fileIn1.c_str(), 1024);
-    wcstombs(mbfileIn2, fileIn2.c_str(), 1024);
-    wcstombs(mbfileOut, fileOut.c_str(), 1024);
-
-    // read in the images
-    FILE* fIn1 = fopen(mbfileIn1, "rb");
-    FILE* fIn2 = fopen(mbfileIn2, "rb");
-    gdImagePtr img1 = gdImageCreateFromPng(fIn1);
-    gdImagePtr img2 = gdImageCreateFromPng(fIn2);
-    fclose(fIn1);
-    fclose(fIn2);
-
-    // composite the 2nd image onto the 1st
-    gdImageSetTile(img1, img2);
-    gdImageFilledRectangle(img1, 0, 0, gdImageSX(img1)-1, gdImageSY(img1)-1, gdTiled);
-    gdImageSaveAlpha(img1, 1);
-
-    // save the merged image
-    FILE* out = fopen(mbfileOut, "wb");
-    gdImagePng(img1, out);
-    fclose(out);
-
-    // clean up
-    gdImageDestroy(img1);
-    gdImageDestroy(img2);
-}
-
-
-void GDRenderer::StartMap(RS_MapUIInfo* mapInfo,
-                          RS_Bounds&    extents,
-                          double        mapScale,
-                          double        dpi,
-                          double        metersPerUnit,
-                          CSysTransformer* /*xformToLL*/)
-{
-    m_mapScale = mapScale;
-    m_dpi = dpi;
-    m_metersPerUnit = metersPerUnit;
-    m_extents = extents;
-
-    //compute drawing scale
-    //drawing scale is map scale converted to [mapping units] / [pixels]
-    double metersPerPixel = METERS_PER_INCH / m_dpi;
-    m_drawingScale = m_mapScale * metersPerPixel / m_metersPerUnit;
-
-    //find scale used to convert to pixel coordinates
-    //need to take aspect ratios into account
-    double arDisplay = (double)m_width / (double)m_height;
-    double arMap = m_extents.width() / m_extents.height();
-
-    if (arDisplay > arMap)
-        m_scale = (double)m_height / m_extents.height();
-    else
-        m_scale = (double)m_width / m_extents.width();
-
-    m_invScale = 1.0 / m_scale;
-
-    m_offsetX = m_extents.minx;
-    m_offsetY = m_extents.miny;
-
-    m_labeler->StartLabels();
-
-    // remember the map info
-    m_mapInfo = mapInfo;
-
-    // make sure that the mapInfo is in sync with the background member variable
-    if (m_mapInfo)
-        m_mapInfo->bgcolor() = this->m_bgcolor;
-
-    // do it here, since we will need the renderer's map scales, which are computed above
-    InitFontEngine(this);
-}
-
-
-void GDRenderer::EndMap()
-{
-    // turn off selection mode so the labels draw normal
-    SetRenderSelectionMode(false);
-
-    // finally draw all the labels
-    m_labeler->BlastLabels();
-
-    // clear the map info
-    m_mapInfo = NULL;
-}
-
-
-void GDRenderer::StartLayer(RS_LayerUIInfo*      layerInfo,
-                            RS_FeatureClassInfo* classInfo)
-{
-    // remember the layer/feature info
-    m_layerInfo = layerInfo;
-    m_featureClassInfo = classInfo;
-}
-
-
-void GDRenderer::EndLayer()
-{
-    // clear the layer/feature info
-    m_layerInfo = NULL;
-    m_featureClassInfo = NULL;
-}
-
-
-void GDRenderer::StartFeature(RS_FeatureReader* /*feature*/,
-                              bool              /*initialPass*/,
-                              const RS_String*  /*tooltip*/,
-                              const RS_String*  /*url*/,
-                              const RS_String*  /*theme*/,
-                              double            /*zOffset*/,
-                              double            /*zExtrusion*/,
-                              RS_ElevationType  /*zOffsetType*/)
-{
-}
-
-
-void GDRenderer::ProcessPolygon(LineBuffer* lb, RS_FillStyle& fill)
-{
-    _ASSERT(NULL != lb);
-    RS_FillStyle* use_fill = &fill;
-
-    //should we use selection style?
-    if (m_bSelectionMode)
-        use_fill = &m_selFill;
-
-    if (lb->point_count() == 0)
-        return;
-
-    //render any polygon fill
-    if (use_fill->color().alpha() != 0)
-    {
-        _TransformPointsNoClamp(lb);
-
-        int gdc = ConvertColor((gdImagePtr)m_imout, use_fill->color());
-        int gdcbg = ConvertColor((gdImagePtr)m_imout, use_fill->background());
-
-        gdImagePtr fillpat = NULL;
-
-        if (wcscmp(use_fill->pattern().c_str(), L"Solid") != 0)
-        {
-            fillpat = GDFillPatterns::CreatePatternBitmap(use_fill->pattern().c_str(), gdc, gdcbg);
-            gdImageSetTile((gdImagePtr)m_imout, fillpat);
-        }
-
-        //call the new rasterizer
-        m_polyrasterizer->FillPolygon((Point*)m_wtPointBuffer, lb->point_count(), lb->cntrs(), lb->cntr_count(),
-            fillpat? gdTiled : gdc, (gdImagePtr)m_imout);
-
-        if (fillpat)
-        {
-            gdImageSetTile((gdImagePtr)m_imout, NULL);
-            gdImageDestroy(fillpat);
-        }
-    }
-
-    //render any polygon outline
-    RS_LineStroke& use_lsym = use_fill->outline();
-    if (use_lsym.color().alpha() == 0)
-        return;
-
-    LineBuffer* workbuffer = lb;
-    std::unique_ptr<LineBuffer> spLB;
-
-    if (s_bGeneralizeData)
-    {
-        if (workbuffer->point_count() > 6)
-        {
-            LineBuffer* optbuffer = workbuffer->Optimize(m_drawingScale, m_pPool);
-            if (optbuffer)
-            {
-                workbuffer = optbuffer;
-                spLB.reset(workbuffer);
-            }
-        }
-    }
-
-    //apply line style if needed
-    if ((wcscmp(use_lsym.style().c_str(), L"Solid") != 0))
-    {
-        //TODO: we should simplify the math that does all that pixel-based stuff
-        LineBuffer* newbuffer = ApplyLineStyle(workbuffer, (wchar_t*)use_lsym.style().c_str(),
-            use_lsym.width() * m_dpi / METERS_PER_INCH,     // LineStyle works in pixels
-            m_drawingScale,                                 // pixels per map unit
-            m_dpi);                                         // dpi
-
-        if (newbuffer)
-        {
-            if (spLB.get())
-                LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-
-            workbuffer = newbuffer;
-            spLB.reset(workbuffer);
-        }
-    }
-
-    if (workbuffer)
-    {
-        WritePolylines(workbuffer, use_lsym, true);
-
-        if (spLB.get())
-            LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-    }
-}
-
-
-void GDRenderer::ProcessPolyline(LineBuffer* lb, RS_LineStroke& lsym)
-{
-    _ASSERT(NULL != lb);
-    RS_LineStroke* use_lsym = &lsym;
-
-    //are we drawing a selection?
-    if (m_bSelectionMode)
-        use_lsym = &(m_selFill.outline());
-
-    if (lb->point_count() == 0)
-        return;
-
-    //render any polyline outline
-    if (use_lsym->color().alpha() == 0)
-        return;
-
-    LineBuffer* workbuffer = lb;
-    std::unique_ptr<LineBuffer> spLB;
-
-    if (s_bGeneralizeData)
-    {
-        if (workbuffer->point_count() > 6)
-        {
-            LineBuffer* optbuffer = workbuffer->Optimize(m_drawingScale, m_pPool);
-            if (optbuffer)
-            {
-                workbuffer = optbuffer;
-                spLB.reset(workbuffer);
-            }
-        }
-    }
-
-    //apply line style if needed
-    if ((wcscmp(use_lsym->style().c_str(), L"Solid") != 0))
-    {
-        //TODO: we should simplify the math that does all that pixel-based stuff
-        LineBuffer* newbuffer = ApplyLineStyle(workbuffer, (wchar_t*)use_lsym->style().c_str(),
-            use_lsym->width() * m_dpi / METERS_PER_INCH,    // LineStyle works in pixels
-            m_drawingScale,                                 // pixels per map unit
-            m_dpi);                                         // dpi
-
-        if (newbuffer)
-        {
-            if (spLB.get())
-                LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-
-            workbuffer = newbuffer;
-            spLB.reset(workbuffer);
-        }
-    }
-
-    if (workbuffer)
-    {
-        WritePolylines(workbuffer, *use_lsym, true);
-
-        if (spLB.get())
-            LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-    }
-}
-
-
-void GDRenderer::ProcessRaster(unsigned char* data,
-                               int length,
-                               RS_ImageFormat format,
-                               int width, int height,
-                               RS_Bounds& extents,
-                               TransformMesh* /*xformMesh*/)
-{
-    // TODO: use xformMesh and call AGGRenderer::DrawScreenRasterTransformed
-    //
-
-    double cx = 0.5 * (extents.minx + extents.maxx);
-    double cy = 0.5 * (extents.miny + extents.maxy);
-    WorldToScreenPoint(cx, cy, cx, cy);
-
-    //pass to the screen space render function
-    DrawScreenRaster(data, length, format, width, height, cx, cy, extents.width() * m_scale, extents.height() * m_scale, 0.0);
-}
-
-
-void GDRenderer::ProcessMarker(LineBuffer* srclb, RS_MarkerDef& mdef, bool allowOverpost, RS_Bounds* bounds)
-{
-    RS_MarkerDef use_mdef = mdef;
-
-    //use the selection style to draw
-    if (m_bSelectionMode)
-        use_mdef = RS_MarkerDef(RS_MarkerType_Marker,
-                                mdef.width(),
-                                mdef.height(),
-                                mdef.insx(), mdef.insy(),
-                                mdef.rotation(),
-                                mdef.units(),
-                                SLDType_Square,
-                                L"", L"",
-                                m_selFill);
-
-    for (int i=0; i<srclb->point_count(); i++)
-    {
-        //if marker is processed from here it should be added to the
-        //feature W2D, not the labeling W2D -- need the API to reflect that.
-        ProcessOneMarker(srclb->x_coord(i), srclb->y_coord(i), use_mdef, allowOverpost, (i==0)? bounds : NULL);
-    }
-}
-
-
-void GDRenderer::ProcessOneMarker(double x, double y, RS_MarkerDef& mdef, bool allowOverpost, RS_Bounds* bounds)
-{
-    RS_InputStream* symbol = NULL;
-
-    //attempt to retrieve the symbol
-    if (m_symbolManager && (mdef.type() == RS_MarkerType_W2D))
-    {
-        // BOGUS:
-        // We need to pass in "symbols" as the name of the data for the
-        // symbol library resource. This is hardcoded right now.
-        // If it ever changes, we will need to update it
-        symbol = (RS_InputStream*)m_symbolManager->GetSymbolData(mdef.library().c_str(), L"symbols.dwf");
-    }
-
-    //symbol in mapping space units
-    double iw = _MeterToMapSize(mdef.units(), mdef.width());
-    double ih = _MeterToMapSize(mdef.units(), mdef.height());
-
-    //unrotated symbol bounding box (mapping space)
-    RS_Bounds dst(x, y, x+iw, y+ih);
-
-    //convert to pixel size
-    iw *= m_scale;
-    ih *= m_scale;
-
-    //if it's too big, make it smaller
-    //it cannot be too big since we allocate iw * ih * 4 bytes of
-    //memory to cache the symbol image -- this code simply truncates
-    //the size, ignoring changes in aspect ratio
-    const double MAX_SIZE = 4096.0;
-    if (iw > MAX_SIZE)
-    {
-        iw = MAX_SIZE;
-        dst.maxx = dst.minx + iw / m_scale;
-    }
-    if (ih > MAX_SIZE)
-    {
-        ih = MAX_SIZE;
-        dst.maxy = dst.miny + ih / m_scale;
-    }
-
-    int devwidth = ROUND(iw);
-    int devheight = ROUND(ih);
-
-    //get insertion point
-    double refX = mdef.insx();
-    double refY = mdef.insy();
-
-    //rotation angle
-    double angleRad = mdef.rotation() * M_PI180;
-
-    if (mdef.type() == RS_MarkerType_Font)
-    {
-        //case where we are using a font symbol
-
-        // TODO: cannot easily check for font symbol repetition
-        //       since we forward to the labeling logic...
-        // check to see if the last symbol we got was the same
-//      if (   mdef.type() != m_lastSymbol.type()
-//          || mdef.height() != m_lastSymbol.height()
-//          || mdef.insx() != m_lastSymbol.insx()
-//          || mdef.insy() != m_lastSymbol.insy()
-//          || mdef.rotation() != m_lastSymbol.rotation()
-//          || mdef.units() != m_lastSymbol.units()
-//          || mdef.library() != m_lastSymbol.library()
-//          || mdef.name() != m_lastSymbol.name()
-//          || mdef.style().color().argb() != m_lastSymbol.style().color().argb()
-//          || mdef.fontstyle() != m_lastSymbol.fontstyle())
-//      {
-            m_lastSymbol = mdef;
-
-        //convert font symbol to a simple label
-        RS_TextDef tdef(RS_HAlignment_Center, RS_VAlignment_Half);
-        RS_FontDef fdef(mdef.library(), mdef.height(), mdef.fontstyle(), mdef.units());
-
-        tdef.font() = fdef;
-        tdef.textcolor() = mdef.style().color();
-        tdef.rotation() = mdef.rotation();
-
-        //compute placement position for character centerpoint, taking into
-        //account the insertion point.
-        //TODO: is this way of computing insertion point offset correct, when
-        //compared to what SymbolTrans does? Is rotation applied before the symbol
-        //is moved to its insertion point or after? Need to check that.
-        double posx = dst.minx + (0.5 - refX) * dst.width();
-        double posy = dst.miny + (0.5 - refY) * dst.height();
-
-        // transform insertion point into pixel space
-        WorldToScreenPoint(posx, posy, posx, posy);
-
-        // draw the character
-        RS_TextMetrics tm;
-        if (GetTextMetrics(mdef.name(), tdef, tm, false))
-            DrawScreenText(tm, tdef, posx, posy, NULL, 0, 0.0);
-    }
-    else
-    {
-        //for non-font symbols we will draw into a temporary image
-        //which we can reuse if the symbol is not changing from one
-        //feature to the next
-
-        //check to see if the last symbol we got was different or if it
-        //is not cached yet
-        if (   mdef.type() != m_lastSymbol.type()
-            || mdef.width() != m_lastSymbol.width()
-            || mdef.height() != m_lastSymbol.height()
-            || mdef.insx() != m_lastSymbol.insx()
-            || mdef.insy() != m_lastSymbol.insy()
-            || mdef.rotation() != m_lastSymbol.rotation()
-            || mdef.markernum() != m_lastSymbol.markernum()
-            || mdef.library() != m_lastSymbol.library()
-            || mdef.name() != m_lastSymbol.name()
-            || mdef.style().color().argb() != m_lastSymbol.style().color().argb()
-            || mdef.style().outline().color().argb() != m_lastSymbol.style().outline().color().argb()
-            || mdef.style().background().argb() != m_lastSymbol.style().background().argb()
-            || !m_imsym)
-        {
-            m_lastSymbol = mdef;
-
-            int imsymw = devwidth;
-            int imsymh = devheight;
-
-            if (imsymw > SYMBOL_BITMAP_MAX || imsymh > SYMBOL_BITMAP_MAX)
-            {
-                //symbol will be too big so we will draw it as
-                //geometry directly into the map image instead.
-                //So we need to destroy the cached symbol image if any
-                if (m_imsym)
-                {
-                    gdImageDestroy((gdImagePtr)m_imsym);
-                    m_imsym = NULL;
-                }
-            }
-            else
-            {
-                //otherwise allocate a second bitmap where
-                //we will cache the symbol image for reuse
-
-                //did we cache an image previously, but it was different size?
-                if (m_imsym
-                    && (   gdImageSX((gdImagePtr)m_imsym) != imsymw
-                        || gdImageSY((gdImagePtr)m_imsym) != imsymh))
-                {
-                    gdImageDestroy((gdImagePtr)m_imsym);
-                    m_imsym = NULL;
-                }
-
-                //allocate the symbol image
-                if (!m_imsym)
-                    m_imsym = gdImageCreateTrueColor(imsymw, imsymh);
-            }
-
-            if (symbol)
-            {
-                //case where we are using a W2D symbol from the library
-                _ASSERT(mdef.type() == RS_MarkerType_W2D);
-
-                //default bounds of symbol data in W2D
-                //for symbols created by MapGuide Studio
-                RS_Bounds src(0.0, 0.0, SYMBOL_MAX, SYMBOL_MAX);
-                SymbolTrans st = SymbolTrans(src, dst, refX, refY, angleRad);
-
-                if (m_imsym)
-                {
-                    //case where we will cache the symbol image
-
-                    //we will use unrotated symbol bounding box
-                    //since rotation will be done by the image copy
-                    //also we will use a slight boundary offset
-                    //hardcoded to 1 pixel so that geometry exactly on the edge
-                    //draws just inside the image
-                    RS_Bounds dst1(1.0, 1.0, (double)(imsymw-1), (double)(imsymh-1));
-                    st = SymbolTrans(src, dst1, 0.0, 0.0, 0.0);
-
-                    m_imw2d = m_imsym;
-
-                    // initialize the temporary symbol image to a transparent background
-                    gdImageAlphaBlending((gdImagePtr)m_imsym, 0);
-                    gdImageFilledRectangle((gdImagePtr)m_imsym, 0, 0, gdImageSX((gdImagePtr)m_imsym)-1, gdImageSY((gdImagePtr)m_imsym)-1, 0x7f000000);
-                    gdImageAlphaBlending((gdImagePtr)m_imsym, 1);
-                }
-                else
-                {
-                    //case where we will draw the W2D directly into
-                    //the destination image because the symbol is too big
-                    m_imw2d = m_imout;
-                }
-
-                //also set flags controlling how W2D are rewritten
-                //into the destination DWF
-                m_bIsSymbolW2D = true;
-                m_mdOverrideColors = mdef;
-
-                //copy symbol W2D into destination
-                AddDWFContent(symbol, &st, mdef.name(), RS_String(L""), RS_String(L""));
-
-                //make sure we zero out the W2D symbol flags
-                m_bIsSymbolW2D = false;
-                m_imw2d = NULL;
-            }
-            else
-            {
-                //case where we are using an SLD symbol, and fall-through for other cases
-
-                //determine which SLD symbol we need to draw
-                //and pick up its polygon point definition
-                RS_F_Point* poly = NULL;
-                int npts = 0;
-                bool found = true;
-
-                if (mdef.markernum() == SLDType_Square)
-                {
-                    poly = (RS_F_Point*)SLD_SQUARE;
-                    npts = sizeof(SLD_SQUARE) / (2 * sizeof(double));
-                }
-                else if (mdef.markernum() == SLDType_Circle)
-                {
-                    poly = (RS_F_Point*)SLD_CIRCLE;
-                    npts = sizeof(SLD_CIRCLE) / (2 * sizeof(double));
-                }
-                else if (mdef.markernum() == SLDType_Triangle)
-                {
-                    poly = (RS_F_Point*)SLD_TRIANGLE;
-                    npts = sizeof(SLD_TRIANGLE) / (2 * sizeof(double));
-                }
-                else if (mdef.markernum() == SLDType_Star)
-                {
-                    poly = (RS_F_Point*)SLD_STAR;
-                    npts = sizeof(SLD_STAR) / (2 * sizeof(double));
-                }
-                else if (mdef.markernum() == SLDType_Cross)
-                {
-                    poly = (RS_F_Point*)SLD_CROSS;
-                    npts = sizeof(SLD_CROSS) / (2 * sizeof(double));
-                }
-                else if (mdef.markernum() == SLDType_X)
-                {
-                    poly = (RS_F_Point*)SLD_X;
-                    npts = sizeof(SLD_X) / (2 * sizeof(double));
-                }
-                else
-                {
-                    //default or error
-                    poly = (RS_F_Point*)SLD_ERROR;
-                    npts = sizeof(SLD_ERROR) / (2 * sizeof(double));
-                    found = false;
-                }
-
-                //fill color
-                RS_Color fill = mdef.style().color();
-                int gdcfill = ConvertColor((gdImagePtr)m_imout, fill);
-
-                //outline color
-                RS_Color outline = mdef.style().outline().color();
-                int gdcline = ConvertColor((gdImagePtr)m_imout, outline);
-
-                //see if symbol will be small enough to draw in cached image
-                if (m_imsym)
-                {
-                    int superw = imsymw;
-                    int superh = imsymh;
-
-                    //if it is too small, make it bigger
-                    //so that we get an antialiased effect -- only
-                    //do this for SLD symbols since DWF symbols are too
-                    //varied and not all of them look good with smoothing applied
-                    if (!symbol && superw < SYMBOL_BITMAP_SIZE/2 && superh < SYMBOL_BITMAP_SIZE/2)
-                        superw = superh = SYMBOL_BITMAP_SIZE;
-
-                    gdImagePtr tmp = gdImageCreateTrueColor(superw, superh);
-
-                    //transform to coordinates of temporary image where we
-                    //draw symbol before transfering to the map
-                    EnsureBufferSize(npts);
-                    RS_D_Point* pts = m_wtPointBuffer;
-
-                    double tempx, tempy;
-                    for (int i=0; i<npts; i++)
-                    {
-                        tempx = poly[i].x;
-                        tempy = poly[i].y;
-
-                        pts[i].x = (int)(tempx * (superw - 10.0) + 5.0);
-                        pts[i].y = (int)((superh - 10.0) - tempy * (superh - 10.0) + 5.0);
-                    }
-
-                    // initialize the temporary supersampled symbol image to a transparent background
-                    gdImageAlphaBlending(tmp, 0);
-                    gdImageFilledRectangle(tmp, 0, 0, gdImageSX(tmp)-1, gdImageSY(tmp)-1, 0x7f000000);
-                    gdImageAlphaBlending(tmp, 1);
-
-                    if (!found)
-                    {
-                        //unknown symbol
-                        RS_Color red(255, 0, 0, 255);
-                        int line_weight = rs_min(superw, superh) / 17;
-                        // line_weight cannot be zero
-                        gdImagePtr brush1 = rs_gdImageThickLineBrush((line_weight > 1)? line_weight : 2, red);
-                        gdImageSetBrush(tmp, brush1);
-
-                        gdImageOpenPolygon(tmp, (gdPointPtr)pts, npts, gdBrushed);
-
-                        gdImageSetBrush(tmp, NULL);
-                        gdImageDestroy(brush1);
-                    }
-                    else
-                    {
-                        //draw fill
-                        // TODO: When a filled polygon image is down-sampled, a gray false edge is created.
-                        // This edge can only be seen when the real edge is not being drawn.
-                        gdImageFilledPolygon(tmp, (gdPointPtr)pts, npts, gdcfill);
-                        //draw outline with a thickness set so that when scaled down to
-                        //th destination image, the outline is still fully visible
-
-                        int line_weight = rs_min(superw, superh) / 17;
-                        // line_weight cannot be zero
-                        gdImagePtr brush1 = rs_gdImageThickLineBrush((line_weight > 1)? line_weight : 2, outline);
-                        gdImageSetBrush(tmp, brush1);
-
-                        gdImageOpenPolygon(tmp, (gdPointPtr)pts, npts, gdBrushed);
-
-                        gdImageSetBrush(tmp, NULL);
-                        gdImageDestroy(brush1);
-                    }
-
-                    // initialize the real cached symbol image to a transparent background
-                    gdImageAlphaBlending((gdImagePtr)m_imsym, 0);
-                    gdImageFilledRectangle((gdImagePtr)m_imsym, 0, 0, gdImageSX((gdImagePtr)m_imsym)-1, gdImageSY((gdImagePtr)m_imsym)-1, 0x7f000000);
-                    gdImageAlphaBlending((gdImagePtr)m_imsym, 1);
-
-                    //resample the supersampled temporary image into the cached image
-                    gdImageCopyResampled((gdImagePtr)m_imsym, tmp, 0, 0, 0, 0, imsymw, imsymh, superw, superh);
-
-                    gdImageDestroy(tmp);
-                }
-                else
-                {
-                    //otherwise symbol was too big and must be drawn as a regular polygon
-
-                    //construct transformer
-                    RS_Bounds src(0.0, 0.0, 1.0, 1.0);
-                    SymbolTrans trans(src, dst, refX, refY, angleRad);
-
-                    //transform to coordinates of temporary image where we
-                    //draw symbol before transfering to the map
-                    EnsureBufferSize(npts);
-                    RS_D_Point* pts = m_wtPointBuffer;
-
-                    double tempx, tempy;
-                    for (int i=0; i<npts; i++)
-                    {
-                        tempx = poly[i].x;
-                        tempy = poly[i].y;
-
-                        //unit square to world
-                        trans.TransformPoint(tempx, tempy);
-
-                        //world to device
-                        pts[i].x = _TX(tempx);
-                        pts[i].y = _TY(tempy);
-                    }
-
-                    if (!found)
-                    {
-                        //unknown symbol
-                        RS_Color red(255, 0, 0, 255);
-                        int gdcred = ConvertColor((gdImagePtr)m_imout, red);
-
-                        gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)pts, npts, gdcred);
-                    }
-                    else
-                    {
-                        //draw fill
-                        gdImageSetAntiAliased((gdImagePtr)m_imout, gdcfill);
-                        gdImageFilledPolygon((gdImagePtr)m_imout, (gdPointPtr)pts, npts, gdAntiAliased);
-
-                        //draw outline
-                        gdImageSetAntiAliased((gdImagePtr)m_imout, gdcline);
-                        gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)pts, npts, gdAntiAliased);
-                    }
-                }
-            }
-        }
-
-        if (m_imsym)
-        {
-            //in case we cached a symbol image, draw it to the main
-            //map image
-
-            //get the source image size
-            int imsymw = gdImageSX((gdImagePtr)m_imsym);
-            int imsymh = gdImageSY((gdImagePtr)m_imsym);
-
-            //construct transformer from cached image space
-            //to rotated map space -- we need this in order to
-            //take into account the insertion point
-            RS_Bounds src(0.0, 0.0, imsymw, imsymh);
-            SymbolTrans trans(src, dst, refX, refY, angleRad);
-
-            //initialize 4 corner points of symbol -- we will
-            //destructively transform this array to destination map space
-            RS_F_Point b[4];
-            b[0].x =    0.0; b[0].y =    0.0;
-            b[1].x = imsymw; b[1].y =    0.0;
-            b[2].x = imsymw; b[2].y = imsymh;
-            b[3].x =    0.0; b[3].y = imsymh;
-
-            for (int i=0; i<4; i++)
-            {
-                //to world space
-                trans.TransformPoint(b[i].x, b[i].y);
-
-                //world to screen space
-                WorldToScreenPoint(b[i].x, b[i].y, b[i].x, b[i].y);
-            }
-
-            //copy symbol image into destination image
-            if (mdef.rotation() == 0.0)
-            {
-                //upper left point
-                int ulx = (int)floor(b[3].x);
-                int uly = (int)floor(b[3].y);
-
-                //straight copy without resampling since we are
-                //guaranteed for the source image size to equal the
-                //symbol pixel size
-                gdImageCopy((gdImagePtr)m_imout, (gdImagePtr)m_imsym, ulx, uly, 0, 0, imsymw, imsymh);
-            }
-            else
-            {
-                //for rotated copy, we need to scale down the image first
-                //allocating an extra image here should not be too much of
-                //an overhead since it is usually small
-                gdImagePtr tmp = gdImageCreateTrueColor(imsymw+2, imsymh+2);
-
-                //make it transparent
-                gdImageAlphaBlending(tmp, 0);
-                gdImageFilledRectangle(tmp, 0, 0, imsymw+1, imsymh+1, 0x7f000000);
-                gdImageAlphaBlending(tmp, 1);
-
-                //straight copy without resampling since we are
-                //guaranteed for the source image size to equal the
-                //symbol pixel size
-                gdImageCopy(tmp, (gdImagePtr)m_imsym, 1, 1, 0, 0, imsymw, imsymh);
-
-                //for rotated gd copy, we need the midpoint of
-                //the destination bounds
-                double mx = floor(0.5 * (b[0].x + b[2].x));
-                double my = floor(0.5 * (b[0].y + b[2].y));
-
-                //draw rotated symbol onto final destination image
-                gdImageCopyRotated((gdImagePtr)m_imout, tmp, mx, my, 0, 0, imsymw+2, imsymh+2, ROUND(mdef.rotation()));
-
-                gdImageDestroy(tmp);
-            }
-        }
-    }
-
-    if (!allowOverpost)
-    {
-        //now add an exclusion region to the file so that
-        //labels do not overlap the symbol
-
-        //default bounds of symbol data in W2D
-        //for symbols created by MapGuide Studio
-        RS_Bounds src(0.0, 0.0, SYMBOL_MAX, SYMBOL_MAX);
-
-        //a square that we will transform into the dst bounds
-        RS_F_Point box[4];
-        box[0].x = 0.0;
-        box[0].y = 0.0;
-        box[1].x = SYMBOL_MAX;
-        box[1].y = 0.0;
-        box[2].x = SYMBOL_MAX;
-        box[2].y = SYMBOL_MAX;
-        box[3].x = 0.0;
-        box[3].y = SYMBOL_MAX;
-
-        //construct transformer -- same as the
-        //one used for the actual symbol drawables
-        SymbolTrans boxtrans(src, dst, refX, refY, angleRad);
-
-        RS_F_Point pts[4];
-
-        double tempx, tempy;
-
-        for (int i=0; i<4; i++)
-        {
-            tempx = box[i].x;
-            tempy = box[i].y;
-
-            boxtrans.TransformPoint(tempx, tempy);
-
-            pts[i].x = _TX(tempx);
-            pts[i].y = _TY(tempy);
-        }
-
-        AddExclusionRegion(pts, 4);
-    }
-
-    //set actual (unrotated) bounds with new insertion point if a pointer was passed in
-    if (bounds)
-    {
-        bounds->minx =       -refX  * mdef.width();
-        bounds->maxx = (1.0 - refX) * mdef.width();
-        bounds->miny =       -refY  * mdef.height();
-        bounds->maxy = (1.0 - refY) * mdef.height();
-    }
-}
-
-
-void GDRenderer::ProcessLabelGroup(RS_LabelInfo*    labels,
-                                   int              nlabels,
-                                   const RS_String& text,
-                                   RS_OverpostType  type,
-                                   bool             exclude,
-                                   LineBuffer*      path,
-                                   double           scaleLimit)
-{
-    //check if we are rendering a selection -- bail if so
-    if (m_bSelectionMode)
-        return;
-
-    //forward it to the label renderer
-    m_labeler->ProcessLabelGroup(labels, nlabels, text, type, exclude, path, scaleLimit);
-}
-
-
-void GDRenderer::AddExclusionRegion(RS_F_Point* fpts, int npts)
-{
-    m_labeler->AddExclusionRegion(fpts, npts);
-}
-
-
-void GDRenderer::SetSymbolManager(RS_SymbolManager* manager)
-{
-    m_symbolManager = manager;
-}
-
-
-RS_MapUIInfo* GDRenderer::GetMapInfo()
-{
-    return m_mapInfo;
-}
-
-
-RS_LayerUIInfo* GDRenderer::GetLayerInfo()
-{
-    return m_layerInfo;
-}
-
-
-RS_FeatureClassInfo* GDRenderer::GetFeatureClassInfo()
-{
-    return m_featureClassInfo;
-}
-
-
-double GDRenderer::GetMapScale()
-{
-    return m_mapScale;
-}
-
-
-double GDRenderer::GetDrawingScale()
-{
-    return m_drawingScale;
-}
-
-
-double GDRenderer::GetMetersPerUnit()
-{
-    return m_metersPerUnit;
-}
-
-
-RS_Bounds& GDRenderer::GetBounds()
-{
-    return m_extents;
-}
-
-
-double GDRenderer::GetDpi()
-{
-    return m_dpi;
-}
-
-
-bool GDRenderer::RequiresClipping()
-{
-    return m_bRequiresClipping;
-}
-
-
-bool GDRenderer::RequiresLabelClipping()
-{
-    // always the same value as RequiresClipping
-    return m_bRequiresClipping;
-}
-
-
-bool GDRenderer::SupportsZ()
-{
-    // Z values in feature geometry are ignored
-    return false;
-}
-
-
-bool GDRenderer::SupportsTooltips()
-{
-    // set to false to disable processing of tooltips
-    return false;
-}
-
-
-bool GDRenderer::SupportsHyperlinks()
-{
-    // set to false to disable processing of hyperlinks
-    return false;
-}
-
-
-void GDRenderer::WritePolylines(LineBuffer* srclb, RS_LineStroke& stroke, bool aa)
-{
-    //apply the stroke first
-    int gdc = ConvertColor((gdImagePtr)m_imout, stroke.color());
-    gdImageSetAntiAliased((gdImagePtr)m_imout, gdc);
-
-    double thickness = stroke.width();
-
-    //convert thickness to pixels
-    int line_weight = (int)(_MeterToMapSize(stroke.units(), fabs(thickness)) * m_scale);
-    if (line_weight > m_maxLineWidth)
-        line_weight = m_maxLineWidth;
-
-    gdImagePtr brush1 = NULL;
-    if (line_weight > 1)
-        brush1 = rs_gdImageThickLineBrush(line_weight, stroke.color());
-
-    //draw the lines
-    for (int i=0; i<srclb->cntr_count(); i++)
-    {
-        int cntr_size = srclb->cntr_size(i);
-
-        if (cntr_size > 1)
-        {
-            _TransformContourPointsNoClamp(srclb, i);
-
-            //draw antialiased only if thickness is single pixel
-            if (aa && line_weight <= 1)
-                gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)m_wtPointBuffer, cntr_size, gdAntiAliased);
-            else
-            {
-                gdImageSetBrush((gdImagePtr)m_imout, brush1);
-                gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)m_wtPointBuffer, cntr_size, brush1? gdBrushed : gdc);
-            }
-        }
-    }
-
-    //unset the stroke
-    gdImageSetBrush((gdImagePtr)m_imout, NULL);
-
-    if (brush1)
-        gdImageDestroy(brush1);
-}
-
-
-//transforms an x coordinate from mapping to screen space
-inline int GDRenderer::_TX(double x)
-{
-    return (int)floor((x - m_offsetX) * m_scale);
-}
-
-//transforms a y coordinate from mapping to screen space
-inline int GDRenderer::_TY(double y)
-{
-//  return (int)floor(m_height - (y - m_offsetY) * m_scale);
-    return m_height + (int)floor((m_offsetY - y) * m_scale);  // avoids converting m_height to double
-}
-
-
-//transforms an array of input mapping space points into pixel
-//coordinates and places them in the point buffer m_wtPointBuffer
-void GDRenderer::_TransformPointsNoClamp(LineBuffer* plb)
-{
-    EnsureBufferSize(plb->point_count());
-    int* wpts = (int*)m_wtPointBuffer;
-
-    for (int i=0; i<plb->point_count(); i++)
-    {
-        *wpts++ = _TX(plb->x_coord(i));
-        *wpts++ = _TY(plb->y_coord(i));
-    }
-}
-
-
-//transforms an array of input mapping space points into pixel
-//coordinates and places them in the point buffer m_wtPointBuffer
-void GDRenderer::_TransformContourPointsNoClamp(LineBuffer* plb, int cntr)
-{
-    EnsureBufferSize(plb->cntr_size(cntr));
-    int* wpts = (int*)m_wtPointBuffer;
-    int end = plb->contour_end_point(cntr);
-    for (int i=plb->contour_start_point(cntr); i<=end; i++)
-    {
-        *wpts++ = _TX(plb->x_coord(i));
-        *wpts++ = _TY(plb->y_coord(i));
-    }
-}
-
-
-void GDRenderer::EnsureBufferSize(int len)
-{
-    if (!m_wtPointBuffer)
-    {
-        m_wtPointLen = len;
-        m_wtPointBuffer = new RS_D_Point[m_wtPointLen];
-    }
-    else if (len > m_wtPointLen)
-    {
-        delete [] m_wtPointBuffer;
-        m_wtPointLen = len;
-        m_wtPointBuffer = new RS_D_Point[m_wtPointLen];
-    }
-}
-
-
-//WARNING: caller responsible for deleting resulting line buffer
-LineBuffer* GDRenderer::ApplyLineStyle(LineBuffer* srcLB, wchar_t* lineStyle, double lineWidthPixels, double drawingScale, double dpi)
-{
-    // if there are less than two indices then we can't style
-    int lenInds = srcLB->point_count();
-    if (lenInds < 2)
-        return NULL;
-
-    // configure the line style definition to use
-    LineStyleDef lineStyleDef;
-    LineStyle style = lineStyleDef.FindLineStyle(lineStyle);
-    lineStyleDef.SetStyle(style, drawingScale, dpi, lineWidthPixels);
-
-    // the starting pixel run
-    int pixelRunInd = 0;
-    PixelRun pixelRun = lineStyleDef.m_pixelRuns[pixelRunInd];
-
-    // create the destination line buffer
-    LineBuffer* destLB = LineBufferPool::NewLineBuffer(m_pPool, 8);
-    std::unique_ptr<LineBuffer> spDestLB(destLB);
-
-    // special code for Fenceline1 style
-    int numCapSegs = 0;
-    double csCapAng = 0.0, snCapAng = 0.0;
-    if (style == LineStyle_FENCELINE1)
-    {
-        // get the size in screen units of the circular decoration
-        double decorSize = lineStyleDef.m_pixelRuns[1].m_decorSize / drawingScale;
-
-        numCapSegs = (int)ceil(M_PI * sqrt(0.5*decorSize));
-
-        // restrict this value to be safe - 64 is enough to handle the
-        // case of the decoration filling the whole screen
-        if (numCapSegs > 64)
-            numCapSegs = 64;
-
-        // angle increment
-        double dAngle = 2.0*M_PI / numCapSegs;
-        csCapAng = cos(dAngle);
-        snCapAng = sin(dAngle);
-    }
-
-    // loop over the source buffer's segments
-    double walkLen = 0.0;
-    double sumdLen = 0.0;
-    for (int j=1; j<lenInds; ++j)
-    {
-        // get the vertex and index arrays from the line
-        // buffer - these are inside the loop because they
-        // change if the line buffer resizes itself
-
-        // don't style if current segment is empty (a move-to)
-        if (srcLB->point_type(j) == (unsigned char)LineBuffer::stMoveTo)
-            continue;
-
-        // get the data for the segment
-        double p0x, p0y, p1x, p1y;
-        srcLB->get_point(j-1, p0x, p0y);
-        srcLB->get_point(j  , p1x, p1y);
-
-        double dx = p1x - p0x;
-        double dy = p1y - p0y;
-
-        // detect a previous move-to
-        if (srcLB->point_type(j-1) == (unsigned char)LineBuffer::stMoveTo)
-        {
-            // reset the distances
-            walkLen = 0.0;
-            sumdLen = 0.0;
-
-            // reset the pixel run
-            pixelRunInd = 0;
-            pixelRun    = lineStyleDef.m_pixelRuns[pixelRunInd];
-        }
-
-        // skip zero-length segments
-        if (dx == 0.0 && dy == 0.0)
-            continue;
-
-        // get the length and normalized direction
-        double lineLen = sqrt(dx*dx + dy*dy);
-        double lineInv = 1.0 / lineLen;
-        dx *= lineInv;
-        dy *= lineInv;
-
-        // traverse this segment (in model units)
-        bool doneSeg = false;
-        double x0 = p0x;
-        double y0 = p0y;
-        double x1, y1;
-        do
-        {
-            // f gives the parametric position on the line
-            // corresponding to the end of the pixel run
-            double f = walkLen - sumdLen + pixelRun.m_nPixels;
-            if (f < lineLen)
-            {
-                // somewhere before the end of the line
-                x1 = p0x + f*dx;
-                y1 = p0y + f*dy;
-            }
-            else
-            {
-                // only go to the end of the line
-                x1 = p1x;
-                y1 = p1y;
-                doneSeg = true;
-            }
-
-            // draw any dash
-            if (pixelRun.m_isOn && destLB != srcLB)
-            {
-                destLB->MoveTo(x0, y0);
-                destLB->LineTo(x1, y1);
-            }
-            x0 = x1;
-            y0 = y1;
-
-            // draw any decoration
-            if (pixelRun.m_decor != Decoration_None)
-            {
-                double g = walkLen - sumdLen + pixelRun.m_decorOffset;
-                if (g >= 0.0 && g < lineLen)
-                {
-                    double dxw = 0.5*pixelRun.m_decorSize*dx;
-                    double dyw = 0.5*pixelRun.m_decorSize*dy;
-
-                    double xd = p0x + g*dx;
-                    double yd = p0y + g*dy;
-
-                    if (pixelRun.m_decor == Decoration_CrossTick)
-                    {
-                        destLB->MoveTo(xd - dyw, yd + dxw);
-                        destLB->LineTo(xd + dyw, yd - dxw);
-                    }
-                    else if (pixelRun.m_decor == Decoration_Square)
-                    {
-                        double dxyp = dxw + dyw;
-                        double dxym = dxw - dyw;
-                        destLB->MoveTo(xd + dxym, yd + dxyp);
-                        destLB->LineTo(xd - dxyp, yd + dxym);
-                        destLB->LineTo(xd - dxym, yd - dxyp);
-                        destLB->LineTo(xd + dxyp, yd - dxym);
-                        destLB->LineTo(xd + dxym, yd + dxyp);
-                    }
-                    else if (pixelRun.m_decor == Decoration_Circle)
-                    {
-                        // set the first point
-                        destLB->MoveTo(xd + dxw, yd + dyw);
-
-                        // set the intermediate points
-                        double xc = dxw;
-                        double yc = dyw;
-                        for (int i=1; i<numCapSegs; i++)
-                        {
-                            double xt = xc;
-                            xc = csCapAng*xc - snCapAng*yc;
-                            yc = snCapAng*xt + csCapAng*yc;
-                            destLB->LineTo(xd + xc, yd + yc);
-                        }
-
-                        // set the final point
-                        destLB->LineTo(xd + dxw, yd + dyw);
-                    }
-                }
-            }
-
-            if (!doneSeg)
-            {
-                // update the walk length
-                walkLen += pixelRun.m_nPixels;
-
-                // move to the next pixel run
-                ++pixelRunInd;
-                if (pixelRunInd == lineStyleDef.m_nRuns)
-                    pixelRunInd = 0;
-                pixelRun = lineStyleDef.m_pixelRuns[pixelRunInd];
-            }
-        }
-        while (!doneSeg);
-
-        // update the summed line length
-        sumdLen += lineLen;
-    }
-
-    return spDestLB.release();
-}
-
-
-//-----------------------------------------------------------------------------
-//scale an input number in meters to a mapping
-//space number given a device or mapping space unit.
-//-----------------------------------------------------------------------------
-double GDRenderer::_MeterToMapSize(RS_Units unit, double number)
-{
-    double scale_factor;
-
-    if (unit == RS_Units_Device) // in meters, fixed size
-        scale_factor = m_mapScale / m_metersPerUnit;
-    else
-        scale_factor = 1.0 / m_metersPerUnit;
-
-    return number * scale_factor;
-}
-
-
-void GDRenderer::SetRenderSelectionMode(bool mode)
-{
-    SetRenderSelectionMode(mode, 0x0000FFFF);
-}
-
-
-void GDRenderer::SetRenderSelectionMode(bool mode, int rgba)
-{
-    SE_Renderer::SetRenderSelectionMode(mode, rgba);
-
-    //initialize the selection styles if needed
-    if (mode)
-    {
-        RS_Color selLineColor = RS_Color((rgba & 0xFFFFFF00) | 200);
-        RS_Color selFillColor(rgba & 0xFFFFFFFF);
-        //For backward compatibility, only do the override if we have a fully opaque alpha component, otherwise respect the value defined
-        if (selFillColor.alpha() == 255)
-            selFillColor = RS_Color((rgba & 0xFFFFFF00) | 160);
-        RS_Color selBgColor(0, 0, 0, 0);
-        RS_LineStroke selStroke = RS_LineStroke(selLineColor, 0.001, L"Solid", RS_Units_Device);
-        m_selFill = RS_FillStyle(selStroke, selFillColor, selBgColor, L"Solid");
-    }
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-// Text drawing
-//////////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-// RS_FontEngine implementation
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-
-
-void GDRenderer::MeasureString(const RS_String& s,
-                               double           height,
-                               const RS_Font*   font,
-                               double           angleRad,
-                               RS_F_Point*      res,       // assumes length equals 4 points
-                               float*           offsets)   // assumes length equals length of string
-{
-    //gd likes height in points rather than pixels
-    height *= 72.0 / m_dpi;
-
-    // The computed height can have roundoff in it, and the rendering code is
-    // very sensitive to it.  Remove this roundoff by rounding the height to
-    // the nearest 1/65536ths of a point.
-    height = floor(height * 65536.0 + 0.5) / 65536.0;
-
-    // If the supplied font height is too large GD can't measure it.  We'll
-    // use a reasonable font height for measuring, and then scale the result.
-    double measureHeight = rs_min(5000.0, height);
-    double measureScale = height / measureHeight;
-
-    // Do any BIDI conversion.  If the offset array is supplied (i.e. for path
-    // text) then assume the conversion was already performed on the input string.
-    const RS_String* pStrToUse;
-    if (offsets)
-    {
-        pStrToUse = &s;
-    }
-    else
-    {
-        const RS_String& sConv = m_bidiConverter.ConvertString(s);
-
-        // ConvertString returns either the converter-owned string or the input
-        // string - in either case we can temporarily hold on to the pointer
-        pStrToUse = &sConv;
-    }
-
-    //convert input to UTF8, which is what GD uses
-    size_t len = pStrToUse->length();
-    size_t lenbytes = len*4+1;
-    char* sutf8 = (char*)alloca(lenbytes);
-    DWFString::EncodeUTF8(pStrToUse->c_str(), len * sizeof(wchar_t), sutf8, lenbytes);
-
-    //convert font path to utf8 also
-    size_t lenf = font->m_filename.length();
-    size_t lenbytesf = lenf * 4 + 1;
-    char* futf8 = (char*)alloca(lenbytesf);
-    DWFString::EncodeUTF8(font->m_filename.c_str(), lenf * sizeof(wchar_t), futf8, lenbytesf);
-
-    int extent[8];
-    gdFTStringExtra extra;
-    memset(&extra, 0, sizeof(gdFTStringExtra));
-    if (offsets)
-        extra.flags |= gdFTEX_XSHOW;
-    extra.flags |= gdFTEX_RESOLUTION;
-    extra.hdpi = (int)m_dpi;
-    extra.vdpi = (int)m_dpi;
-    char* err = NULL;
-    err = gdImageStringFTEx(NULL, extent, 0, futf8, measureHeight, angleRad, 0, 0, sutf8, &extra);
-
-#ifdef _DEBUG
-    if (err) printf("gd text error : %s\n", err);
-#endif
-
-    //scale the result
-    for (int i=0; i<4; ++i)
-    {
-        res[i].x = measureScale*extent[2*i];
-        res[i].y = measureScale*extent[2*i+1];
-    }
-
-    if (extra.xshow && offsets)
-    {
-        //copy over character spacings into result array
-        for (size_t i=0; i<len; ++i)
-            offsets[i] = (float)(measureScale*extra.xshow[i]);
-
-        //and then release the gd allocated xshow pointer
-        gdFree(extra.xshow);
-    }
-}
-
-
-void GDRenderer::DrawString(const RS_String& s,
-                            double           x,
-                            double           y,
-                            double           /*width*/,
-                            double           height,
-                            const RS_Font*   font,
-                            RS_Color&        color,
-                            double           angleRad)
-{
-    if (font == NULL)
-        return;
-
-    // Don't draw the text if height > 16384 pixels, since memory usage in the call
-    // to gdImageStringFTEx below starts to get too large.  16394 pixels should be
-    // more than enough (e.g. this allows 13" high text on a 1200dpi device).
-    if (height > 16384.0)
-        return;
-
-    //gd likes height in points rather than pixels
-    height *= 72.0 / m_dpi;
-
-    // The computed height can have roundoff in it, and the rendering code is
-    // very sensitive to it.  Remove this roundoff by rounding the height to
-    // the nearest 1/65536ths of a point.
-    height = floor(height * 65536.0 + 0.5) / 65536.0;
-
-    // do BIDI conversion
-    const RS_String& sConv = m_bidiConverter.ConvertString(s);
-
-    //convert input to UTF8, which is what GD uses
-    size_t len = sConv.length();
-    size_t lenbytes = len*4+1;
-    char* sutf8 = (char*)alloca(lenbytes);
-    DWFString::EncodeUTF8(sConv.c_str(), len * sizeof(wchar_t), sutf8, lenbytes);
-
-    //convert font path to utf8 also
-    size_t lenf = font->m_filename.length();
-    size_t lenbytesf = lenf * 4 + 1;
-    char* futf8 = (char*)alloca(lenbytesf);
-    DWFString::EncodeUTF8(font->m_filename.c_str(), lenf * sizeof(wchar_t), futf8, lenbytesf);
-
-    //draw the string
-    int gdc = ConvertColor((gdImagePtr)m_imout, color);
-    gdFTStringExtra extra;
-    memset(&extra, 0, sizeof(gdFTStringExtra));
-    extra.flags |= gdFTEX_RESOLUTION;
-    extra.hdpi = (int)m_dpi;
-    extra.vdpi = (int)m_dpi;
-    char* err = NULL;
-    err = gdImageStringFTEx((gdImagePtr)m_imout, NULL, gdc, futf8, height, angleRad, ROUND(x), ROUND(y), sutf8, &extra);
-
-#ifdef _DEBUG
-    if (err) printf("gd text error : %s\n", err);
-#endif
-}
-
-
-const RS_Font* GDRenderer::FindFont(RS_FontDef& def)
-{
-    const RS_Font* pFont = FontManager::Instance()->FindFont(def.name().c_str(),
-                          (def.style() & RS_FontStyle_Bold) != 0,
-                          (def.style() & RS_FontStyle_Italic) != 0);
-
-    return pFont;
-}
-
-
-// Called when applying a line style on a feature geometry.  Line styles can
-// only be applied to linestring and polygon feature geometry types.
-void GDRenderer::ProcessLine(SE_ApplyContext* ctx, SE_RenderLineStyle* style)
-{
-    LineBuffer* featGeom = ctx->geometry;
-    std::unique_ptr<LineBuffer> spLB;
-
-    if (s_bGeneralizeData)
-    {
-        // if the geometry bounds is less than one sixteenth pixel it is too small to try drawing
-//      RS_Bounds bds = featGeom->bounds();
-//      if ((bds.width() < 0.25*m_drawingScale) && (bds.height() < 0.25*m_drawingScale))
-//          return;
-
-        if (featGeom->point_count() > 6)
-        {
-            featGeom = featGeom->Optimize(0.5*m_drawingScale, m_pPool);
-            if (featGeom != ctx->geometry)
-                spLB.reset(featGeom);
-        }
-    }
-
-    SE_ApplyContext local_ctx = *ctx;
-    local_ctx.geometry = featGeom;
-    SE_Renderer::ProcessLine(&local_ctx, style);
-
-    // cleanup
-    if (spLB.get())
-        LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-}
-
-
-// Called when applying an area style on a feature geometry.  Area styles can
-// can only be applied to polygon feature geometry types.
-void GDRenderer::ProcessArea(SE_ApplyContext* ctx, SE_RenderAreaStyle* style)
-{
-    LineBuffer* featGeom = ctx->geometry;
-    std::unique_ptr<LineBuffer> spLB;
-
-    // can't apply an area style to point and linestring geometry types
-    switch (featGeom->geom_type())
-    {
-        case FdoGeometryType_Point:
-        case FdoGeometryType_MultiPoint:
-        case FdoGeometryType_LineString:
-        case FdoGeometryType_MultiLineString:
-        case FdoGeometryType_CurveString:
-        case FdoGeometryType_MultiCurveString:
-            return;
-    }
-
-    if (s_bGeneralizeData)
-    {
-        // if the geometry bounds is less than one quarter pixel, then it is too small to try drawing
-//      RS_Bounds bds = featGeom->bounds();
-//      if ((bds.width() < 0.5*m_drawingScale) && (bds.height() < 0.5*m_drawingScale))
-//          return;
-
-        if (featGeom->point_count() > 6)
-        {
-            featGeom = featGeom->Optimize(0.5*m_drawingScale, m_pPool);
-            if (featGeom != ctx->geometry)
-                spLB.reset(featGeom);
-        }
-    }
-
-    SE_ApplyContext local_ctx = *ctx;
-    local_ctx.geometry = featGeom;
-    SE_Renderer::ProcessArea(&local_ctx, style);
-
-    // cleanup
-    if (spLB.get())
-        LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-}
-
-
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-////
-////             DWF Rewrite and related code
-////
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-
-
-//Inserts the contents of a given DWF input stream
-//into the current output W2D. The given coord sys
-//transformation is applied and geometry will be clipped
-//to the RS_Bounds context of the DWFRenderer
-void GDRenderer::AddDWFContent(RS_InputStream*   in,
-                               CSysTransformer*  xformer,
-                               const RS_String&  section,
-                               const RS_String&  passwd,
-                               const RS_String&  w2dfilter)
-{
-    try
-    {
-        if (in->available() == 0)
-            return;
-
-        //go to beginning of stream
-        in->seek(SEEK_SET, 0);
-
-        DWFRSInputStream rsin(in);
-
-        DWFPackageReader oReader(rsin, passwd.c_str());
-
-        DWFPackageReader::tPackageInfo tInfo;
-        oReader.getPackageInfo(tInfo);
-
-        if (tInfo.eType != DWFPackageReader::eDWFPackage)
-        {
-            return; //throw exception?
-        }
-
-        bool checkSection = (wcslen(section.c_str()) > 0);
-
-        //read the manifest
-        DWFManifest& rManifest = oReader.getManifest();
-
-        //now read the sections
-        DWFSection* pSection = NULL;
-        DWFManifest::SectionIterator* iSection = (&rManifest)->getSections();
-
-        if (iSection)
-        {
-            for (; iSection->valid(); iSection->next())
-            {
-                pSection = iSection->get();
-
-                //call this so that the resource data (like transforms and roles) is read in
-                pSection->readDescriptor();
-
-                //DWFGlobalSection* pGlobal = dynamic_cast<DWFGlobalSection*>(pSection);
-                DWFEPlotSection* pEPlot = dynamic_cast<DWFEPlotSection*>(pSection);
-
-                if (pEPlot)
-                {
-                    if (checkSection)
-                    {
-                        //compare name stored in section to user requested
-                        //section
-                        //Used for point symbols
-                        DWFString name = pEPlot->title();
-
-                        //skip current section if its name does
-                        //not match the name of the one we need
-                        if (name != section.c_str())
-                            continue;
-                    }
-
-                    // Get the resources for the section
-
-                    //first do primary W2D resources
-                    DWFIterator<DWFResource*>* piResources = pEPlot->findResourcesByRole(DWFXML::kzRole_Graphics2d);
-
-                    if (piResources)
-                    {
-                        for (; piResources->valid(); piResources->next())
-                        {
-                            DWFResource* pResource = piResources->get();
-                            DWFInputStream* pStream = pResource->getInputStream();
-
-                            if (!pStream)
-                            {
-                                _DWFCORE_THROW(DWFMemoryException, L"Out of memory");
-                            }
-
-                            RSDWFInputStream rsdwfin(pStream);
-                            AddW2DContent(&rsdwfin, xformer, w2dfilter);
-
-                            DWFCORE_FREE_OBJECT(pStream);
-                        }
-
-                        DWFCORE_FREE_OBJECT(piResources);
-                        piResources = NULL;
-                    }
-
-                    //then do overlays
-                    piResources = pEPlot->findResourcesByRole(DWFXML::kzRole_Graphics2dOverlay);
-
-                    if (piResources)
-                    {
-                        for (; piResources->valid(); piResources->next())
-                        {
-                            DWFResource* pResource = piResources->get();
-                            DWFInputStream* pStream = pResource->getInputStream();
-
-                            if (!pStream)
-                            {
-                                _DWFCORE_THROW(DWFMemoryException, L"Out of memory");
-                            }
-
-                            RSDWFInputStream rsdwfin(pStream);
-                            AddW2DContent(&rsdwfin, xformer, w2dfilter);
-
-                            DWFCORE_FREE_OBJECT(pStream);
-                        }
-
-                        DWFCORE_FREE_OBJECT(piResources);
-                        piResources = NULL;
-                    }
-                }
-            }
-
-            DWFCORE_FREE_OBJECT(iSection);
-        }
-    }
-    catch (DWFException&)
-    {
-    }
-}
-
-
-void GDRenderer::AddW2DContent(RS_InputStream* in, CSysTransformer* xformer, const RS_String& w2dfilter)
-{
-    WT_Result result;
-
-    //initialize state variables, which are needed by W2D rewriter callbacks
-    m_input = in;
-    m_xformer = xformer;
-    m_bHaveViewport = false;
-    m_bLayerPassesFilter = true;
-    m_layerFilter = w2dfilter;
-
-    //set output image if not already set
-    if (!m_bIsSymbolW2D)
-        m_imw2d = m_imout;
-
-    WT_File fin;
-    fin.set_file_mode(WT_File::/*WT_File_mode::*/File_Read);
-
-    fin.set_stream_user_data(this);
-
-    SetActions(fin);
-
-    fin.open();
-
-    // Do the actual reading.
-    do
-    {
-        result = fin.process_next_object();
-    }
-    while (result == WT_Result::Success);
-
-    fin.close();
-
-    m_input = NULL;
-
-    //clear the output image if we set it in this function
-    if (!m_bIsSymbolW2D)
-        m_imw2d = NULL;
-}
-
-
-void GDRenderer::SetActions(WT_File& file)
-{
-    file.set_stream_open_action (gdr_open);
-    file.set_stream_close_action(gdr_close);
-    file.set_stream_read_action (gdr_read);
-    file.set_stream_seek_action (gdr_seek);
-
-    //file.set_dwf_header_action(gdr_process_dwf_header);
-    //file.set_author_action(gdr_process_author);
-    //file.set_creator_action(gdr_process_creator);
-    //file.set_creation_time_action(gdr_process_created);
-    //file.set_modification_time_action(gdr_process_modified);
-    //file.set_source_filename_action(gdr_process_sourceFilename);
-    //file.set_source_creation_time_action(gdr_process_sourceCreationTime);
-    //file.set_source_modification_time_action(gdr_process_sourceModificationTime);
-    file.set_units_action(gdr_process_units);
-    //file.set_embed_action(gdr_process_embed);
-    //file.set_named_view_action(gdr_process_namedView);
-    //file.set_view_action(gdr_process_view);
-    //file.set_plot_info_action(gdr_process_plotInfo);
-    file.set_background_action(gdr_process_background);
-    file.set_color_action(gdr_process_color);
-    file.set_line_weight_action(gdr_process_lineWeight);
-    file.set_line_style_action(gdr_process_lineStyle);
-    file.set_layer_action(gdr_process_layer);
-    file.set_viewport_action(gdr_process_viewport);
-    file.set_visibility_action(gdr_process_visibility);
-    file.set_code_page_action(gdr_process_codePage);
-    file.set_color_map_action(gdr_process_colorMap);
-    //file.set_comments_action(gdr_process_comments);
-    file.set_contour_set_action(gdr_process_contourSet);
-    //file.set_copyright_action(gdr_process_copyright);
-    file.set_dash_pattern_action(gdr_process_dashPattern);
-    //file.set_description_action(gdr_process_description);
-    file.set_fill_action(gdr_process_fill);
-    file.set_filled_ellipse_action(gdr_process_filledEllipse);
-    file.set_font_action(gdr_process_font);
-    file.set_image_action(gdr_process_image);
-    //file.set_keywords_action(gdr_process_keywords);
-    file.set_marker_size_action(gdr_process_markerSize);
-    file.set_marker_symbol_action(gdr_process_markerSymbol);
-    file.set_merge_control_action(gdr_process_mergeControl);
-    //file.set_named_view_list_action(gdr_process_namedViewList);
-    file.set_origin_action(gdr_process_origin);
-    file.set_outline_ellipse_action(gdr_process_outlineEllipse);
-    file.set_polygon_action(gdr_process_polygon);
-    file.set_polytriangle_action(gdr_process_polytriangle);
-    file.set_polymarker_action(gdr_process_polymarker);
-    file.set_projection_action(gdr_process_projection);
-    //file.set_subject_action(gdr_process_subject);
-    //file.set_title_action(gdr_process_title);
-    //file.set_unknown_action(gdr_process_unknown);
-    //file.set_url_action(gdr_process_url);
-    file.set_png_group4_image_action(gdr_process_pngGroup4Image);
-    file.set_polyline_action(gdr_process_polyline);
-    file.set_text_action(gdr_process_text);
-    file.set_inked_area_action(gdr_process_inkedArea);
-    //file.set_plot_optimized_action(gdr_process_plotOptimized);
-    //file.set_group_begin_action(gdr_process_groupBegin);
-    //file.set_group_end_action(gdr_process_groupEnd);
-    //file.set_embedded_font_action(gdr_process_embeddedFont);
-    //file.set_trusted_font_list_action(gdr_process_trustedFontList);
-    //file.set_blockref_action(gdr_process_blockref);
-    //file.set_block_meaning_action(gdr_process_blockMeaning);
-    //file.set_encryption_action(gdr_process_encryption);
-    //file.set_orientation_action(gdr_process_orientation);
-    file.set_alignment_action(gdr_process_alignment);
-    //file.set_password_action(gdr_process_password);
-    //file.set_guid_action(gdr_process_guid);
-    //file.set_filetime_action(gdr_process_fileTime);
-    //file.set_userdata_action(gdr_process_userData);
-    file.set_pen_pattern_action(gdr_process_penPattern);
-    file.set_line_pattern_action(gdr_process_linePattern);
-    file.set_fill_pattern_action(gdr_process_fillPattern);
-    //file.set_signdata_action(gdr_process_DigitalSign);
-
-    file.set_gouraud_polytriangle_action(gdr_process_gouraudPolytriangle);
-    file.set_gouraud_polyline_action(gdr_process_gouraudPolyline);
-}
-
-
-//Given an array of points in W2D logical coordinates, this function:
-// 1. Transform W2D logical coords into their model space using the
-//    W2D file's units structure
-// 2. Apply coordinate system transformation into the destination
-//    map's space
-// 3. Optionally clip the resulting point to the user-requested
-//    data extent of the destination map
-// 4. Transform clipped points to destination W2D space
-// 5. Return a pointer to an array of W2D points with the
-//    total number of output points returned in outNumpts.
-//    If the clipping process of a polyline or polygon resulted
-//    in a multipolygon or multipolyline, a pointer to a vector
-//    containing contour counts will also be returned.
-//    *** Both pointers are valid unit the next call to this function. ***
-const RS_D_Point* GDRenderer::ProcessW2DPoints(WT_File&          file,
-                                               WT_Logical_Point* srcpts,
-                                               int               numpts,
-                                               bool              checkInBounds)
-{
-    //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
-    //standard W2D extent used by Studio.
-    //The function UpdateSymbolTrans does the actual modification and is
-    //called by the process_viewport callback.
-    SymbolTrans* trans = (SymbolTrans*)m_xformer;
-
-    //Our W2DRewrite component stores the source file Units transform
-    //in the source file's desired rendition -- a bit of a hack
-    //but we cannot store it in the destination file -- it messes up some scales
-    //plus it has a totally different units of its own.
-    WT_Matrix xform = file.desired_rendition().drawing_info().units().dwf_to_application_adjoint_transform();
-
-    LineBuffer* lb = LineBufferPool::NewLineBuffer(m_pPool, numpts);
-    std::unique_ptr<LineBuffer> spLB(lb);
-    lb->Reset();
-
-    //
-    // Process the points into mapping space
-    //
-
-    WT_Point3D psrc(0.0, 0.0, 0.0);
-    WT_Point3D pdst(0.0, 0.0, 0.0);
-
-    for (int i=0; i<numpts; i++)
-    {
-        psrc.m_x = srcpts[i].m_x;
-        psrc.m_y = srcpts[i].m_y;
-
-        //this puts it into model space of the source data
-        xform.transform(psrc, pdst);
-
-        //now transform to mapping space of map
-        //using the symbol transformer object (if any)
-        if (trans)
-            trans->TransformPoint(pdst.m_x, pdst.m_y);
-
-        if (i == 0)
-            lb->MoveTo(pdst.m_x, pdst.m_y);
-        else
-            lb->LineTo(pdst.m_x, pdst.m_y);
-    }
-
-    // IMPORTANT: Only do this if the data is a DWF layer
-    // or a DWF symbol that is too large to draw using a
-    // cached bitmap. Regular DWF Symbols will be transformed
-    // to the correct mapping space location by the symbol code
-    if (!IsSymbolW2D())
-    {
-        //
-        // Clipping. For GD rendering a simple bounds check is enough,
-        // the renderer itself will take care of the rest
-        //
-        if (checkInBounds)
-        {
-            //check if line buffer is completely outside box
-            if (   lb->bounds().minx > m_extents.maxx
-                || lb->bounds().miny > m_extents.maxy
-                || lb->bounds().maxx < m_extents.minx
-                || lb->bounds().maxy < m_extents.miny)
-            {
-                LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-                return NULL;
-            }
-        }
-    }
-
-    // IMPORTANT: Only do this if the data is a DWF layer
-    // or a DWF symbol that is too large to draw using a
-    // cached bitmap. Regular DWF Symbols will be transformed
-    // to the correct mapping space location by the symbol code
-    if (!IsSymbolW2D() || m_imw2d != m_imsym)
-    {
-        if (lb->point_count() > 0)
-        {
-            _TransformPointsNoClamp(lb);
-        }
-    }
-    else
-    {
-        //for symbols just copy the points to the output array
-        //and only invert the y coordinate -- we need to flip y since
-        //in gd y goes down and in DWF it goes up
-        int count = lb->point_count();
-
-        EnsureBufferSize(count);
-        RS_D_Point* wpts = m_wtPointBuffer;
-
-        for (int i=0; i<count; i++)
-        {
-            wpts[i].x = (int)lb->x_coord(i);
-            wpts[i].y = gdImageSY((gdImagePtr)GetW2DTargetImage()) - (int)lb->y_coord(i);
-        }
-    }
-
-    //free temporary linebuffer
-    LineBufferPool::FreeLineBuffer(m_pPool, spLB.release());
-
-    return m_wtPointBuffer;
-}
-
-
-//This function scales a W2D space related value from
-//source W2D space to destination.
-//Since the source W2D file can fit into a small piece 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 funtion determines and applies
-//that scale
-double GDRenderer::ScaleW2DNumber(WT_File& file, WT_Integer32 number)
-{
-    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
-
-    //number is now in source W2D model units
-    double dModelSpace = (double)number * scale1;
-
-    double dMapSpace = dModelSpace;
-    if (m_xformer)
-    {
-        //now we need to convert that to a length in destination
-        //map units.
-        dMapSpace *= m_xformer->GetLinearScale();
-    }
-
-    double dDstSpace = dMapSpace;
-
-    //only scale by map scale if we are not a symbol inside a cached image
-    if (!m_bIsSymbolW2D)
-    {
-        dDstSpace *= m_scale;
-    }
-
-    return dDstSpace;
-}
-
-
-// Fills and returns the point buffer using the supplied line buffer.
-// No transformations are applied.
-const RS_D_Point* GDRenderer::FillPointBuffer(LineBuffer* lb)
-{
-    _TransferPoints(lb, NULL);
-    return m_wtPointBuffer;
-}
-
-
-void GDRenderer::UpdateSymbolTrans(WT_File& /*file*/, WT_Viewport& viewport)
-{
-    _ASSERT(m_xformer);
-
-    RS_Bounds alternate_extent(0.0, 0.0, -1.0, -1.0);
-
-    //If a viewport was defined, the symbol W2D likely came from AutoCAD.
-    //In that case, the extent of the data inside the W2D is not the same
-    //as what Studio saves (0, 0, SYMBOL_MAX, SYMBOL_MAX), so we need to use
-    //a different transformation for that data.
-    //IMPORTANT: This will destructively modify the transformer that was passed in.
-    //It is ugly, but avoids parsing the W2D twice.
-    //The assumption here is that Viewport opcodes define the bounds of the data.
-    //This is not necessarily true for all W2D files, but is true for ones coming
-    //from ACAD through the Dwg Extract and Transform engine.
-    if (viewport.contour() && m_bIsSymbolW2D)
-    {
-        const WT_Contour_Set* cset = viewport.contour();
-        const WT_Logical_Point* pts = cset->points();
-
-        _ASSERT(cset->total_points() == 4);
-
-        if (cset->total_points() == 4)
-        {
-            alternate_extent.minx = rs_min(pts[0].m_x, pts[2].m_x);
-            alternate_extent.maxx = rs_max(pts[0].m_x, pts[2].m_x);
-
-            alternate_extent.miny = rs_min(pts[0].m_y, pts[2].m_y);
-            alternate_extent.maxy = rs_max(pts[0].m_y, pts[2].m_y);
-
-            //TODO: we don't do that yet, since DWF layers can have
-            //multiple viewports, which mess up this logic -- no single
-            //viewport contains the overall extent of the data
-            /*
-            //if it is a DWF layer, also correct for aspect ratio
-            //of the destination bounds of the transformer so that
-            //we avoid stretching of the layer data.
-            //we now assume we know the exact bounds of the data
-            //in the w2d
-            if (!m_bIsSymbolW2D)
-            {
-                double arsrc = alternate_extent.width() / alternate_extent.height();
-
-                RS_Bounds dstext = trans.GetSrcBounds();
-                double ardst = dstext.width() / dstext.height();
-
-                if (arsrc >= ardst)
-                {
-                    double newhgt2 = 0.5 * dstext.width() / arsrc;
-                    double oldcy = 0.5 * (dstext.miny + dstext.maxy);
-                    RS_Bounds newdst(dstext.minx, oldcy - newhgt2, dstext.maxx, oldcy + newhgt2);
-                    trans.SetDstBounds(newdst);
-                }
-                else
-                {
-                    double newwid2 = 0.5 * dstext.height() * arsrc;
-                    double oldcx = 0.5 * (dstext.minx + dstext.maxx);
-                    RS_Bounds newdst(oldcx - newwid2, dstext.miny, oldcx + newwid2, dstext.maxy);
-                    trans.SetDstBounds(newdst);
-                }
-            }
-            */
-
-            //and finally set the source bounds we got from the viewport
-            //opcode
-            ((SymbolTrans*)m_xformer)->SetSrcBounds(alternate_extent);
-            m_bHaveViewport = true;
-        }
-    }
-}
-
-
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-////
-////      END of DWF Rewrite and related code
-////
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-
-
-//////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////
-// SE_Renderer implementation
-/////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////
-
-
-void GDRenderer::_TransferPoints(LineBuffer* plb, const SE_Matrix* xform)
-{
-    int numpts = plb->point_count();
-    EnsureBufferSize(numpts);
-    int* pts = (int*)m_wtPointBuffer;
-
-    if (!xform || xform->isIdentity())
-    {
-        for (int i=0; i<numpts; i++)
-        {
-            *pts++ = (int)plb->x_coord(i);
-            *pts++ = (int)plb->y_coord(i);
-        }
-    }
-    else
-    {
-        for (int i=0; i<numpts; i++)
-        {
-            double x, y;
-            xform->transform(plb->x_coord(i), plb->y_coord(i), x, y);
-            pts[0] = (int)x;
-            pts[1] = (int)y;
-
-            pts += 2;
-        }
-    }
-}
-
-
-void GDRenderer::_TransferContourPoints(LineBuffer* plb, int cntr, const SE_Matrix* xform)
-{
-    EnsureBufferSize(plb->cntr_size(cntr));
-    int* pts = (int*)m_wtPointBuffer;
-
-    if (!xform || xform->isIdentity())
-    {
-        int end = plb->contour_end_point(cntr);
-        for (int i=plb->contour_start_point(cntr); i<=end; i++)
-        {
-            *pts++ = (int)plb->x_coord(i);
-            *pts++ = (int)plb->y_coord(i);
-        }
-    }
-    else
-    {
-        int end = plb->contour_end_point(cntr);
-        for (int i=plb->contour_start_point(cntr); i<=end; i++)
-        {
-            double x, y;
-            xform->transform(plb->x_coord(i), plb->y_coord(i), x, y);
-            pts[0] = (int)x;
-            pts[1] = (int)y;
-            pts += 2;
-        }
-    }
-}
-
-
-//copied from WritePolylines, except it doesn't do to screen transform -- we should refactor
-void GDRenderer::DrawScreenPolyline(LineBuffer* srclb, const SE_Matrix* xform, const SE_LineStroke& lineStroke)
-{
-    if ((lineStroke.color & 0xFF000000) == 0)
-        return;
-
-    if (srclb->geom_count() == 0)
-        return; //if you have no geoms, why do you call us at all?
-
-    unsigned int color = lineStroke.color;
-    RS_Color c((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, (color >> 24) & 0xFF);
-
-    int gdc = ConvertColor((gdImagePtr)m_imout, c);
-    gdImageSetAntiAliased((gdImagePtr)m_imout, gdc);
-
-    //line width is always device space and units are meters.
-    //so convert to equivalent pixel width
-    int line_weight = (int)lineStroke.weight;
-    if (line_weight > m_maxLineWidth)
-        line_weight = m_maxLineWidth;
-
-    gdImagePtr brush1 = NULL;
-    if (line_weight > 1)
-        brush1 = rs_gdImageThickLineBrush(line_weight, c);
-
-    //draw the lines
-    for (int i=0; i<srclb->cntr_count(); i++)
-    {
-        int cntr_size = srclb->cntr_size(i);
-
-        //convert to integer coords
-        _TransferContourPoints(srclb, i, xform);
-
-        if (cntr_size > 1)
-        {
-            //draw antialiased only if thickness is single pixel
-            if (line_weight <= 1)
-                gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)m_wtPointBuffer, cntr_size, gdAntiAliased);
-            else
-            {
-                gdImageSetBrush((gdImagePtr)m_imout, brush1);
-                gdImageOpenPolygon((gdImagePtr)m_imout, (gdPointPtr)m_wtPointBuffer, cntr_size, brush1? gdBrushed : gdc);
-            }
-        }
-    }
-
-    //unset the stroke
-    gdImageSetBrush((gdImagePtr)m_imout, NULL);
-
-    if (brush1)
-        gdImageDestroy(brush1);
-}
-
-
-void GDRenderer::DrawScreenPolygon(LineBuffer* polygon, const SE_Matrix* xform, unsigned int color)
-{
-    if ((color & 0xFF000000) == 0)
-        return;
-
-    if (polygon->geom_count() == 0)
-        return; //if you have no geoms, why do you call us at all?
-
-    RS_Color c((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, (color >> 24) & 0xFF);
-
-    int gdc = ConvertColor((gdImagePtr)m_imout, c);
-
-    gdImagePtr fillpat = NULL;
-
-    //TODO: do the device space calls need fill pattern support?
-    /*
-    if (wcscmp(use_fill->pattern().c_str(), L"Solid") != 0)
-    {
-        fillpat = GDFillPatterns::CreatePatternBitmap(use_fill->pattern().c_str(), gdc, gdcbg);
-        gdImageSetTile((gdImagePtr)m_imout, fillpat);
-    }
-    */
-
-    _TransferPoints(polygon, xform);
-
-    int total_cntrs = 0;
-    int total_pts = 0;
-    for (int i = 0; i < polygon->geom_count(); ++i)
-    {
-        int cntrs = polygon->geom_size(i);
-        int pts = 0;
-        for (int j = total_cntrs; j < total_cntrs + cntrs; ++j)
-            pts += polygon->cntr_size(j);
-
-        //call the new rasterizer
-        m_polyrasterizer->FillPolygon((Point*)(m_wtPointBuffer + total_pts), pts,
-                                      polygon->cntrs() + total_cntrs, cntrs,
-                                      fillpat? gdTiled : gdc, (gdImagePtr)m_imout);
-
-        total_cntrs += cntrs;
-        total_pts += pts;
-    }
-
-    /*
-    if (fillpat)
-    {
-        gdImageSetTile((gdImagePtr)m_imout, NULL);
-        gdImageDestroy(fillpat);
-    }
-    */
-}
-
-
-bool GDRenderer::YPointsUp()
-{
-    return false;
-}
-
-
-void GDRenderer::GetWorldToScreenTransform(SE_Matrix& xform)
-{
-    xform.x0 = m_scale;
-    xform.x1 = 0.0;
-    xform.x2 = - m_offsetX * m_scale;
-    xform.y0 = 0.0;
-    xform.y1 = - m_scale;
-    xform.y2 = m_height /*- 1*/ + m_offsetY * m_scale;
-}
-
-
-void GDRenderer::WorldToScreenPoint(double& inx, double& iny, double& ox, double& oy)
-{
-    //TODO: assumes no rotation of the viewport
-    ox = (inx - m_offsetX) * m_scale;
-    oy = m_height /*- 1*/ - (iny - m_offsetY) * m_scale;
-}
-
-
-void GDRenderer::ScreenToWorldPoint(double& inx, double& iny, double& ox, double& oy)
-{
-    //TODO: assumes no rotation of the viewport
-    ox = inx * m_invScale + m_offsetX;
-    oy = m_offsetY - (iny /*+ 1.0*/ - m_height) * m_invScale;
-}
-
-
-// returns number of pixels per millimeter device
-double GDRenderer::GetScreenUnitsPerMillimeterDevice()
-{
-    return m_dpi / MILLIMETERS_PER_INCH;
-}
-
-
-// returns number of pixels per millimeter world
-double GDRenderer::GetScreenUnitsPerMillimeterWorld()
-{
-    return m_dpi / MILLIMETERS_PER_INCH / m_mapScale;
-}
-
-
-// screen units are pixels
-double GDRenderer::GetScreenUnitsPerPixel()
-{
-    return 1.0;
-}
-
-
-RS_FontEngine* GDRenderer::GetRSFontEngine()
-{
-    return this;
-}
-
-
-//labeling -- this is the entry API for adding SE labels
-//to the label mananger
-void GDRenderer::ProcessSELabelGroup(SE_LabelInfo*   labels,
-                                     int             nlabels,
-                                     RS_OverpostType type,
-                                     bool            exclude,
-                                     LineBuffer*     path)
-{
-    //pass labels to the label renderer here
-
-    //check if we are rendering a selection -- bail if so
-    if (m_bSelectionMode)
-        return;
-
-    //forward it to the label renderer
-    m_labeler->ProcessLabelGroup(labels, nlabels, type, exclude, path);
-}
-
-
-void GDRenderer::DrawScreenRaster(unsigned char* data, int length,
-                                  RS_ImageFormat format, int native_width, int native_height,
-                                  double x, double y, double w, double h, double angleDeg)
-{
-    if (format == RS_ImageFormat_Unknown)
-        return;
-
-    // compute the scaled / rotated size
-    double rotatedW = w;
-    double rotatedH = h;
-    if (angleDeg != 0.0)
-    {
-        double csAbs = fabs(cos(angleDeg * M_PI180));
-        double snAbs = fabs(sin(angleDeg * M_PI180));
-        rotatedW = csAbs*w + snAbs*h;
-        rotatedH = snAbs*w + csAbs*h;
-    }
-
-    // don't allow images beyond the maximum size
-    if (rotatedW * rotatedH > IMAGE_SIZE_MAX)
-        return;
-
-    // get the source image
-    gdImagePtr src = NULL;
-    if (format == RS_ImageFormat_ABGR)
-    {
-        if (native_width < 0 || native_height < 0)
-            return;
-
-        src = gdImageCreateTrueColor(native_width, native_height);
-
-        //TODO: figure out a way to do this without copying the whole thing
-        //in such a lame loop
-        //at least here we don't call gdImageSetPixel for every pixel
-        for (int j=0; j<native_height; j++)
-        {
-            for (int i=0; i<native_width; i++)
-            {
-                int srccol = ((int*)data)[i + j * native_width];
-                //compute GD alpha and reverse b and r
-                int col = gdImageColorAllocateAlpha(src,  srccol        & 0xFF,
-                                                         (srccol >> 8)  & 0XFF,
-                                                         (srccol >> 16) & 0xFF,
-                                                         127 - ((srccol >> 24) & 0xFF)/ 2);
-
-                src->tpixels[j][i] = col;
-            }
-        }
-    }
-    else if (format == RS_ImageFormat_ARGB)
-    {
-        if (native_width < 0 || native_height < 0)
-            return;
-
-        src = gdImageCreateTrueColor(native_width, native_height);
-
-        //TODO: figure out a way to do this without copying the whole thing
-        //in such a lame loop
-        //at least here we don't call gdImageSetPixel for every pixel
-        for (int j=0; j<native_height; j++)
-        {
-            for (int i=0; i<native_width; i++)
-            {
-                int srccol = ((int*)data)[i + j * native_width];
-                //compute GD alpha
-                int col = gdImageColorAllocateAlpha(src, (srccol >> 16) & 0xFF,
-                                                         (srccol >> 8)  & 0XFF,
-                                                         srccol        & 0xFF,
-                                                         127 - ((srccol >> 24) & 0xFF)/ 2);
-
-                src->tpixels[j][i] = col;
-            }
-        }
-    }
-    else if (format == RS_ImageFormat_PNG)
-    {
-        //NOTE: native_width and native_height arguments are ignored for PNG
-        //      since they're encoded in the png data array
-        src = gdImageCreateFromPngPtr(length, data);
-    }
-    else
-        throw "Well implement this already!";
-
-    if (ROUND(angleDeg) == 0)
-    {
-        double w2 = w * 0.5;
-        double h2 = h * 0.5;
-
-        int minx = ROUND(x - w2);
-        int maxx = ROUND(x + w2);
-        int miny = ROUND(y - h2);
-        int maxy = ROUND(y + h2);
-
-        gdImageCopyResampled((gdImagePtr)m_imout, src,
-                             minx, miny, 0, 0,
-                             maxx-minx, maxy-miny, //TODO: do we need +1?
-                             gdImageSX(src), gdImageSY(src));
-    }
-    else
-    {
-        // scale it if necessary
-        if ((int)w != gdImageSX(src) || (int)h != gdImageSY(src))
-        {
-            gdImagePtr dst = gdImageCreateTrueColor((int)w, (int)h);
-            gdImageAlphaBlending(dst, 0);
-            gdImageFilledRectangle(dst, 0, 0, gdImageSX(dst)-1, gdImageSY(dst)-1, 0x7f000000);
-            gdImageAlphaBlending(dst, 1);
-            gdImageCopyResampled(dst, src, 0, 0, 0, 0, gdImageSX(dst), gdImageSY(dst), gdImageSX(src), gdImageSY(src));
-            gdImageDestroy(src);
-            src = dst;
-        }
-
-        gdImageCopyRotated((gdImagePtr)m_imout, src, x, y, 0, 0, gdImageSX(src), gdImageSY(src), ROUND(angleDeg));
-    }
-
-    gdImageDestroy(src);
-}
-
-
-void GDRenderer::DrawScreenRaster(unsigned char* data, int length,
-                                  RS_ImageFormat format, int native_width, int native_height,
-                                  double x, double y, double w, double h, double angleDeg,
-                                  double alpha)
-{
-    RenderUtil::DrawScreenRaster(this, data, length, format, native_width, native_height,
-                                 x, y, w, h, angleDeg, alpha);
-}
-
-
-void GDRenderer::DrawScreenText(const RS_TextMetrics& tm, RS_TextDef& tdef, double insx, double insy,
-                                RS_F_Point* path, int npts, double param_position)
-{
-    if (path)
-    {
-        // path text - we need to do BIDI conversion before we process the text
-        const RS_String& sConv = m_bidiConverter.ConvertString(tm.text);
-
-        // we cannot modify the cached RS_TextMetrics so we create a local one
-        // and use it to layout the path text
-        RS_TextMetrics tm_local;
-        if (GetTextMetrics(sConv, tdef, tm_local, true))
-        {
-            // TODO: need computed seglens rather than NULL to make things faster
-            if (LayoutPathText(tm_local, (RS_F_Point*)path, npts, NULL, param_position, tdef.valign(), 0.5))
-                DrawPathText(tm_local, tdef);
-        }
-    }
-    else
-    {
-        // block text - check that we have a valid text metrics
-        if (tm.font != NULL)
-            DrawBlockText(tm, tdef, insx, insy);
-    }
-}

Deleted: trunk/MgDev/Common/Renderers/GDRenderer.h
===================================================================
--- trunk/MgDev/Common/Renderers/GDRenderer.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDRenderer.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,332 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GDRENDERER_H
-#define GDRENDERER_H
-
-// ignore warnings about exception definitions
-#pragma warning(disable: 4290)
-
-#include "Renderers.h"
-#include "Renderer.h"
-#include "LineBuffer.h"
-#include "LabelRendererBase.h"
-#include "RS_ByteData.h"
-
-#include "SE_Renderer.h"
-#include "SE_SymbolManager.h"
-#include "RS_FontEngine.h"
-#include "BIDIConverter.h"
-
-#include <vector>
-
-class WT_File;
-class WT_Viewport;
-class WT_Logical_Point;
-
-struct RS_Font;
-
-class complex_polygon_gd;
-class TransformMesh;
-
-class GDRenderer : public SE_Renderer, public RS_FontEngine
-{
-    friend class LabelRenderer;
-    friend class LabelRendererBase;
-    friend class LabelRendererLocal;
-
-public:
-    RENDERERS_API GDRenderer(int width,
-                             int height,
-                             RS_Color& bgColor,
-                             bool requiresClipping,
-                             bool localOverposting,
-                             double tileExtentOffset);
-    RENDERERS_API virtual ~GDRenderer();
-
-    ///////////////////////////////////
-    // Renderer implementation
-    //
-    RENDERERS_API virtual void StartMap(RS_MapUIInfo*    mapInfo,
-                                        RS_Bounds&       extents,
-                                        double           mapScale,
-                                        double           dpi,
-                                        double           metersPerUnit,
-                                        CSysTransformer* xformToLL = NULL);
-
-    RENDERERS_API virtual void EndMap();
-
-    RENDERERS_API virtual void StartLayer(RS_LayerUIInfo*      layerInfo,
-                                          RS_FeatureClassInfo* classInfo);
-
-    RENDERERS_API virtual void EndLayer();
-
-    RENDERERS_API virtual void StartFeature(RS_FeatureReader* feature,
-                                            bool              initialPass,
-                                            const RS_String*  tooltip = NULL,
-                                            const RS_String*  url = NULL,
-                                            const RS_String*  theme = NULL,
-                                            double            zOffset = 0.0,
-                                            double            zExtrusion = 0.0,
-                                            RS_ElevationType  zOffsetType = RS_ElevationType_RelativeToGround);
-
-    RENDERERS_API virtual void ProcessPolygon(LineBuffer* lb, RS_FillStyle& fill);
-
-    RENDERERS_API virtual void ProcessPolyline(LineBuffer* lb, RS_LineStroke& lsym);
-
-    RENDERERS_API virtual void ProcessRaster(unsigned char* data,
-                                             int            length,
-                                             RS_ImageFormat format,
-                                             int            width,
-                                             int            height,
-                                             RS_Bounds&     extents,
-                                             TransformMesh*   xformMesh = NULL);
-
-    RENDERERS_API virtual void ProcessMarker(LineBuffer* lb, RS_MarkerDef& mdef, bool allowOverpost, RS_Bounds* bounds = NULL);
-
-    RENDERERS_API virtual void ProcessLabelGroup(RS_LabelInfo*    labels,
-                                                 int              nlabels,
-                                                 const RS_String& text,
-                                                 RS_OverpostType  type,
-                                                 bool             exclude,
-                                                 LineBuffer*      path,
-                                                 double           scaleLimit);
-
-    RENDERERS_API virtual void AddDWFContent(RS_InputStream*  in,
-                                             CSysTransformer* xformer,
-                                             const RS_String& section,
-                                             const RS_String& passwd,
-                                             const RS_String& w2dfilter);
-
-    RENDERERS_API virtual void SetSymbolManager(RS_SymbolManager* manager);
-
-    virtual RS_MapUIInfo* GetMapInfo();
-
-    virtual RS_LayerUIInfo* GetLayerInfo();
-
-    virtual RS_FeatureClassInfo* GetFeatureClassInfo();
-
-    virtual double GetMapScale();
-
-    virtual double GetDrawingScale();
-
-    virtual double GetMetersPerUnit();
-
-    virtual double GetDpi();
-
-    virtual RS_Bounds& GetBounds();
-
-    virtual bool RequiresClipping();
-
-    virtual bool RequiresLabelClipping();
-
-    virtual bool SupportsZ();
-
-    virtual bool SupportsTooltips();
-
-    virtual bool SupportsHyperlinks();
-
-    /////////////////////////////////////////////
-    // GDRenderer specific
-    //
-    RENDERERS_API RS_ByteData* Save(const RS_String& format, int width, int height);
-    RENDERERS_API void Save(const RS_String& filename, const RS_String& format);
-    RENDERERS_API void Save(const RS_String& filename, const RS_String& format, int width, int height);
-
-    void Combine(const RS_String& fileIn1, const RS_String& fileIn2, const RS_String& fileOut);
-
-    ////////////////////////////////////////////////
-    // SE_Renderer
-    //
-    virtual void SetRenderSelectionMode(bool mode);
-    virtual void SetRenderSelectionMode(bool mode, int rgba);
-
-    virtual void DrawScreenPolyline(LineBuffer* geom, const SE_Matrix* xform, const SE_LineStroke& lineStroke);
-    virtual void DrawScreenPolygon(LineBuffer* geom, const SE_Matrix* xform, unsigned int fill);
-    virtual void DrawScreenRaster(unsigned char* data, int length,
-                                  RS_ImageFormat format, int native_width, int native_height,
-                                  double x, double y, double w, double h, double angleDeg);
-    virtual void DrawScreenRaster(unsigned char* data, int length,
-                                  RS_ImageFormat format, int native_width, int native_height,
-                                  double x, double y, double w, double h, double angleDeg,
-                                  double alpha);
-    virtual void DrawScreenText(const RS_TextMetrics& tm, RS_TextDef& tdef, double insx, double insy,
-                                RS_F_Point* path, int npts, double param_position);
-
-    virtual bool YPointsUp();
-    virtual void GetWorldToScreenTransform(SE_Matrix& xform);
-    virtual void WorldToScreenPoint(double& inx, double& iny, double& ox, double& oy);
-    virtual void ScreenToWorldPoint(double& inx, double& iny, double& ox, double& oy);
-
-    virtual double GetScreenUnitsPerMillimeterDevice();
-    virtual double GetScreenUnitsPerMillimeterWorld();
-    virtual double GetScreenUnitsPerPixel();
-
-    virtual RS_FontEngine* GetRSFontEngine();
-
-    virtual void ProcessSELabelGroup(SE_LabelInfo*   labels,
-                                     int             nlabels,
-                                     RS_OverpostType type,
-                                     bool            exclude,
-                                     LineBuffer*     path = NULL);
-
-    virtual void ProcessLine(SE_ApplyContext* ctx, SE_RenderLineStyle* style);
-    virtual void ProcessArea(SE_ApplyContext* ctx, SE_RenderAreaStyle* style);
-
-    virtual void AddExclusionRegion(RS_F_Point* fpts, int npts);
-
-    ////////////////////////////////////////////////
-    // RS_FontEngine
-    //
-    virtual void MeasureString(const RS_String& s,
-                               double           height,
-                               const RS_Font*   font,
-                               double           angleRad,
-                               RS_F_Point*      res,
-                               float*           offsets);
-
-    virtual void DrawString(const RS_String& s,
-                            double           x,
-                            double           y,
-                            double           width,
-                            double           height,
-                            const RS_Font*   font,
-                            RS_Color&        color,
-                            double           angleRad);
-
-    virtual const RS_Font* FindFont(RS_FontDef& def);
-
-private:
-    double _MeterToMapSize(RS_Units unit, double number);
-
-    LineBuffer* ApplyLineStyle(LineBuffer* srcLB, wchar_t* lineStyle, double lineWidthPixels, double drawingScale, double dpi);
-
-    void ProcessOneMarker(double x, double y, RS_MarkerDef& mdef, bool allowOverpost, RS_Bounds* bounds = NULL);
-
-    void WritePolylines(LineBuffer* srclb, RS_LineStroke& stroke, bool aa);
-
-    //transformation from mapping to W2D space
-    inline int _TX(double x);
-    inline int _TY(double y);
-
-    void _TransformPointsNoClamp(LineBuffer* plb);
-    void _TransformContourPointsNoClamp(LineBuffer* plb, int cntr);
-    void _TransferPoints(LineBuffer* plb, const SE_Matrix* xform);
-    void _TransferContourPoints(LineBuffer* plb, int cntr, const SE_Matrix* xform);
-
-    RS_Color m_bgcolor;
-    RS_Bounds m_extents;
-    double m_metersPerUnit;
-    double m_dpi;
-    double m_mapScale;
-    double m_scale;
-    double m_invScale;
-    double m_offsetX;
-    double m_offsetY;
-    int m_width;
-    int m_height;
-    int m_maxLineWidth;
-    double m_drawingScale;
-    bool m_bRequiresClipping;
-
-    RS_SymbolManager* m_symbolManager;
-
-    //buffer to hold device space points during conversion from line buffers
-    //to W2D drawables
-    RS_D_Point* m_wtPointBuffer;
-    int m_wtPointLen;
-    void EnsureBufferSize(int len);
-
-    void* m_imout;
-    void* m_imsym;
-    int m_lineColor;
-
-    RS_FillStyle m_selFill;
-
-    LabelRendererBase* m_labeler;
-
-    BIDIConverter m_bidiConverter;
-
-public:
-    RENDERERS_API static bool s_bGeneralizeData;
-
-    /////////////////////////////////////////////////////////
-    //
-    // Functions and structures used during insertion of W2Ds
-    //
-    /////////////////////////////////////////////////////////
-
-    //TODO: these should be extracted to a friend class that holds
-    // all of the W2D rewriting context
-
-public:
-    /*Do not export from DLL*/ void* GetImage() { return m_imout; } //target map image
-    /*Do not export from DLL*/ void* GetW2DTargetImage() { return m_imw2d; } //target image for W2D rewriter
-    /*Do not export from DLL*/ complex_polygon_gd* GetPolyRasterizer() { return m_polyrasterizer; } //for drawing contour sets
-    /*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);
-    /*Do not export from DLL*/ RS_MarkerDef& GetOverrideColorMarker() { return m_mdOverrideColors; }
-    /*Do not export from DLL*/ RS_String& GetLayerFilter() { return m_layerFilter; }
-    /*Do not export from DLL*/ bool& LayerPassesFilter() { return m_bLayerPassesFilter; }
-
-    /*Do not export from DLL*/ RS_InputStream* _GetInputStream() { return m_input; }
-    /*Do not export from DLL*/ const RS_D_Point* ProcessW2DPoints(WT_File&          file,
-                                                                  WT_Logical_Point* srcpts,
-                                                                  int               numpts,
-                                                                  bool              checkInBounds);
-    /*Do not export from DLL*/ double ScaleW2DNumber(WT_File& file, long number);
-    /*Do not export from DLL*/ const RS_D_Point* FillPointBuffer(LineBuffer* lb);
-
-private:
-    void AddW2DContent(RS_InputStream* in, CSysTransformer* xformer, const RS_String& w2dfilter);
-
-    void SetActions(WT_File& file);
-
-    //////
-    //State variables for when DWFRenderer is used to keep
-    //information during DWF rewriting process for symbols
-    //and DWF layers
-    std::vector<int>    m_cntrs;
-    RS_InputStream*     m_input;
-    CSysTransformer*    m_xformer;
-    bool                m_bIsSymbolW2D;
-    bool                m_bHaveViewport;
-    bool                m_bLayerPassesFilter;
-    RS_String           m_layerFilter;
-
-    //target image for W2D rewriter -- equal to either the target map
-    //image or to a temporary cached symbol image in case we are
-    //processing a symbol from the library
-    void* m_imw2d;
-
-    // map/layer/feature info
-    RS_MapUIInfo* m_mapInfo;
-    RS_LayerUIInfo* m_layerInfo;
-    RS_FeatureClassInfo* m_featureClassInfo;
-
-    //storage for override colors
-    RS_MarkerDef m_mdOverrideColors;
-
-    //remember id of last symbol
-    RS_MarkerDef m_lastSymbol;
-
-    //polygon rasterizer
-    complex_polygon_gd* m_polyrasterizer;
-};
-
-#endif

Deleted: trunk/MgDev/Common/Renderers/GDW2DRewriter.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/GDW2DRewriter.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDW2DRewriter.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,1134 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "GDRenderer.h"
-#include "GDW2DRewriter.h"
-#include "gd.h"
-#include "GDUtils.h"
-#include "complex_polygon_gd.h"
-
-#define ROUND(x) (int)(floor(x+0.5))
-
-////////////////////////////////////////////////////////////////////
-//------------------------------------------------------------------
-//
-//                    I/O Overloads
-//
-//------------------------------------------------------------------
-////////////////////////////////////////////////////////////////////
-
-WT_Result gdr_open(WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_close(WT_File & file)
-{
-    file.set_stream_user_data(WD_Null);
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_read(WT_File & file, int desired_bytes, int & bytes_read, void * buffer)
-{
-    bytes_read = (int)((GDRenderer*)file.stream_user_data())->_GetInputStream()->read(buffer, desired_bytes);
-
-    if (!bytes_read)
-        return WT_Result::Unknown_File_Read_Error;
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_seek(WT_File & file, int distance, int & amount_seeked)
-{
-    off_t prev = 0;
-    ((GDRenderer*)file.stream_user_data())->_GetInputStream()->seek(distance, prev);
-    amount_seeked = distance;
-    return WT_Result::Success;
-}
-
-
-////////////////////////////////////////////////////////////////////
-//------------------------------------------------------------------
-//
-//                  Implementation of Actions....
-//
-//------------------------------------------------------------------
-////////////////////////////////////////////////////////////////////
-
-
-WT_Result gdr_process_units(WT_Units & units, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //do not write the units -- the destination W2D has different units
-    //units.serialize(*rewriter->_GetW2D());
-
-    //Instead save the in the desired rendition of the source file
-    //so that we can get to them when transforming coordinates for DWF layers
-    //Note that for DWF point symbols we do not do that
-    if (!rewriter->IsSymbolW2D())
-        file.desired_rendition().drawing_info().units() = units;
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_color(WT_Color & color, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //note reversal of r and b
-    WT_RGBA32 rgba = color.rgba();
-    RS_Color c(rgba.m_rgb.b, rgba.m_rgb.g, rgba.m_rgb.r, rgba.m_rgb.a);
-
-    int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), c);
-    gdImageSetAntiAliased((gdImagePtr)rewriter->GetW2DTargetImage(), gdc);
-
-    file.rendition().color() = color;
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_lineWeight(WT_Line_Weight & lineWeight, WT_File & file)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //rescale the line weight
-    //int dstWeight = rewriter->ScaleW2DNumber(file, lineWeight.weight_value());
-    file.rendition().line_weight() = lineWeight;
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_viewport(WT_Viewport & viewport, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //IMPORTANT: AutoCAD defines a viewport for each view of the
-    //drawing displayed in paper space. These views are arranged
-    //to fit on the page via several of the viewports.
-    //For symbols coming from the import engine, only one viewport
-    //is set, corresponding to the extent all the symbol entities.
-    //We use this viewport setting in order to determine the extent
-    //of the W2D entities in the symbol W2D, since they are not the
-    //same as the extent that Studio will use when generating symbol
-    //W2Ds (0, 0, SYMBOL_MAX, SYMBOL_MAX).
-
-    //In the case this code is used for DWF layers, things are more complicated
-    //as there are often multiple viewports, defining extents for part of the data.
-    //We cannot handle this for now
-
-    if (rewriter->IsSymbolW2D() && ! rewriter->IsViewportSet())
-        rewriter->UpdateSymbolTrans(file, viewport);
-
-    //(*rewriter->GetW2DTargetImage()).desired_rendition().viewport() = viewport;
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_colorMap(WT_Color_Map & colorMap, WT_File & file)
-{
-    file.rendition().color_map() = colorMap;
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_contourSet(WT_Contour_Set & contourSet, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //check for override color
-    if (rewriter->IsSymbolW2D())
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    //transform point and draw the contour set
-    int numcntrs = contourSet.contours();
-    WT_Integer32* cntrcounts = contourSet.counts();
-    int totalPts = contourSet.total_points();
-
-    const RS_D_Point* dst_cntr = rewriter->ProcessW2DPoints(file, (WT_Logical_Point*)contourSet.points(), totalPts, true);
-
-    if (dst_cntr)
-    {
-        if (color.alpha() != 0)
-        {
-            int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-
-            //call the new rasterizer
-            rewriter->GetPolyRasterizer()->FillPolygon((Point*)dst_cntr, totalPts, (int*)cntrcounts, numcntrs,
-                gdc, (gdImagePtr)rewriter->GetW2DTargetImage());
-        }
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_fill(WT_Fill & fill, WT_File & file)
-{
-    file.rendition().fill() = fill;
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_font(WT_Font & font, WT_File & file)
-{
-    /*GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();*/
-
-    file.rendition().font() = font;
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_gouraudPolyline(WT_Gouraud_Polyline & /*gouraudPolyline*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //TODO: if the polyline is clipped, the colors will be wrong
-    //WT_Gouraud_Polyline poly2(numpts, dstpts, gouraudPolyline.colors(), true);
-    //poly2.serialize(*rewriter->GetW2DTargetImage());
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_gouraudPolytriangle(WT_Gouraud_Polytriangle & /*gouraudPolytriangle*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //TODO: clipping for polytriangles is needed
-    //gouraudPolytriangle.serialize(*rewriter->GetW2DTargetImage());
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_image(WT_Image & image, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    //transform the bounds
-    WT_Logical_Box bounds = image.bounds();
-
-    WT_Logical_Point endpts[4];
-    endpts[0].m_x = bounds.m_min.m_x;
-    endpts[0].m_y = bounds.m_min.m_y;
-    endpts[1].m_x = bounds.m_max.m_x;
-    endpts[1].m_y = bounds.m_min.m_y;
-    endpts[2].m_x = bounds.m_max.m_x;
-    endpts[2].m_y = bounds.m_max.m_y;
-    endpts[3].m_x = bounds.m_min.m_x;
-    endpts[3].m_y = bounds.m_max.m_y;
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, endpts, 4, false);
-
-    gdImagePtr src = NULL;
-
-    if (image.format() == WT_Image::RGBA)
-    {
-        src = gdImageCreateTrueColor(image.columns(), image.rows());
-        gdImageAlphaBlending(src, 0);
-
-        for (int j=0; j<image.rows(); j++)
-            for (int i=0; i<image.columns(); i++)
-            {
-                WT_RGBA32 rgba = ((WT_RGBA32*)image.data())[i + j*image.columns()];
-                RS_Color rsc(rgba.m_rgb.b, rgba.m_rgb.g, rgba.m_rgb.r, rgba.m_rgb.a);
-                int gdc = ConvertColor(src, rsc);
-                gdImageSetPixel(src, i, j, gdc);
-            }
-
-        gdImageAlphaBlending(src, 1);
-    }
-    else if (image.format() == WT_Image::RGB)
-    {
-        src = gdImageCreateTrueColor(image.columns(), image.rows());
-
-        for (int j=0; j<image.rows(); j++)
-            for (int i=0; i<image.columns(); i++)
-            {
-                WT_RGBA32 rgba;
-                const unsigned char* ptr = image.data() + 3*(i + j * image.columns());
-                rgba.m_rgb.b = *ptr++;
-                rgba.m_rgb.g = *ptr++;
-                rgba.m_rgb.r = *ptr++;
-                rgba.m_rgb.a = 255;
-
-                RS_Color rsc(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-                gdImageSetPixel(src, i, j, ConvertColor(src, rsc));
-            }
-    }
-    else if (image.format() == WT_Image::JPEG)
-    {
-        src = gdImageCreateFromJpegPtr(image.data_size(), (void*)image.data());
-    }
-
-    if (src)
-    {
-        double angleRad = atan2((double)(dstpts[1].y - dstpts[0].y), (double)(dstpts[1].x - dstpts[0].x));
-        int iAngleDeg = ROUND(-angleRad * M_180PI);
-
-        //case of no rotation
-        if (iAngleDeg == 0)
-        {
-            //case of no rotation
-            int left = rs_min(dstpts[0].x, dstpts[1].x);
-            int top = rs_min(dstpts[1].y, dstpts[2].y);
-            int width = dstpts[1].x - dstpts[0].x;
-            int height = dstpts[1].y - dstpts[2].y; //y is inverted
-
-            gdImageCopyResampled((gdImagePtr)rewriter->GetW2DTargetImage(), src,
-                            left, top,  //dstX, dstY
-                            0, 0, //srcX, srcY
-                            width, height, //int dstW, int dstH,
-                            image.columns(), image.rows() //srcW, srcH
-                            );
-        }
-        else
-        {
-            int dx = dstpts[1].x - dstpts[0].x;
-            int dy = dstpts[1].y - dstpts[0].y;
-
-            int width = (int)sqrt((double)dx*dx + dy*dy);
-
-            dx = dstpts[2].x - dstpts[1].x;
-            dy = dstpts[2].y - dstpts[1].y;
-
-            int height = (int)sqrt((double)dx*dx + dy*dy);
-
-            //see if we need to rescale the original image
-            if (width != src->sx || height != src->sy)
-            {
-                gdImagePtr resized = gdImageCreateTrueColor(width, height);
-
-                //make it transparent
-                gdImageAlphaBlending(resized, 0);
-                gdImageFilledRectangle(resized, 0, 0, width-1, height-1, 0x7f000000);
-                gdImageAlphaBlending(resized, 1);
-
-                gdImageCopyResampled(resized, src,
-                                     0, 0,               //dstX, dstY
-                                     0, 0,               //srcX, srcY
-                                     width, height,      //dstW, dstH,
-                                     src->sx, src->sy); //srcW, srcH
-                gdImageDestroy(src);
-                src = resized;
-            }
-
-            double midx = 0.5 * (dstpts[0].x + dstpts[2].x);
-            double midy = 0.5 * (dstpts[0].y + dstpts[2].y);
-
-            gdImageCopyRotated((gdImagePtr)rewriter->GetW2DTargetImage(),
-                                src,
-                                midx, midy,         //dstX, dstY
-                                0, 0,               //srcX, srcY
-                                src->sx, src->sy,   //srcW, srcH
-                                iAngleDeg);
-        }
-
-        gdImageDestroy(src);
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_origin(WT_Origin & origin, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    WT_Logical_Point pt = origin.origin();
-
-    //transform origin into new space
-    const RS_D_Point* pts = rewriter->ProcessW2DPoints(file, &pt, 1, false);
-    pts = NULL;
-
-    //WT_Origin origin2(pts[0]);
-    file.update_current_point (origin.origin());
-
-    //origin2.serialize(*rewriter->GetW2DTargetImage());
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_filledEllipse(WT_Filled_Ellipse & filledEllipse, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //process override color, if any
-    if (rewriter->IsSymbolW2D() && rewriter->GetOverrideColorMarker().style().color().argb() != RS_Color::EMPTY_COLOR_ARGB)
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    WT_Logical_Point center = filledEllipse.position();
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, (WT_Logical_Point*)&center, 1, false);
-
-    //negate because GD is left-handed coords
-    double tilt = -filledEllipse.tilt_radian();
-
-    if (tilt == 0.0)
-    {
-        // case where ellipse is unrotated
-
-        int major = ROUND(rewriter->ScaleW2DNumber(file, filledEllipse.major()));
-        int minor = ROUND(rewriter->ScaleW2DNumber(file, filledEllipse.minor()));
-
-        //simple bounds check before we draw
-        if ( !(dstpts[0].x + major < 0
-            || dstpts[0].x - major > ((gdImagePtr)rewriter->GetW2DTargetImage())->sx
-            || dstpts[0].y + minor < 0
-            || dstpts[0].x - minor > ((gdImagePtr)rewriter->GetW2DTargetImage())->sy))
-        {
-            //negate because GD is left-handed coords
-            float end   = 360.f - filledEllipse.start_degree();
-            float start = 360.f - filledEllipse.end_degree();
-
-            //gd does not like negative angles (its sin/cos lookup table doesn't)
-            while (start < 0.f)
-            {
-                start += 360.f;
-                end   += 360.f;
-            }
-
-            int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-            gdImageFilledArc((gdImagePtr)rewriter->GetW2DTargetImage(),
-                                    dstpts[0].x, dstpts[0].y,
-                                    major * 2, minor * 2,
-                                    (int)start, (int)end,
-                                    gdc, gdArc);
-        }
-    }
-    else
-    {
-        // case where ellipse is rotated
-        double rcos = cos(tilt);
-        double rsin = sin(tilt);
-
-        double major = rewriter->ScaleW2DNumber(file, filledEllipse.major());
-        double minor = rewriter->ScaleW2DNumber(file, filledEllipse.minor());
-
-        // the half-width / half-height of the bounding box for the rotated ellipse
-        int wid2 = (int)sqrt(major*major*rcos*rcos + minor*minor*rsin*rsin) + 1;
-        int hgt2 = (int)sqrt(major*major*rsin*rsin + minor*minor*rcos*rcos) + 1;
-
-        //simple bounds check before we draw
-        if ( !(dstpts[0].x + wid2 < 0
-            || dstpts[0].x - wid2 > ((gdImagePtr)rewriter->GetW2DTargetImage())->sx
-            || dstpts[0].y + hgt2 < 0
-            || dstpts[0].x - hgt2 > ((gdImagePtr)rewriter->GetW2DTargetImage())->sy))
-        {
-            //negate because GD is left-handed coords
-            double start = -filledEllipse.start_radian();
-            double end = -filledEllipse.end_radian();
-
-            // compute start point
-            double tx = major * cos(start);
-            double ty = minor * sin(start);
-            double startX = dstpts[0].x + tx*rcos - ty*rsin;
-            double startY = dstpts[0].y + ty*rcos + tx*rsin;
-
-            // use a line buffer to tessellate the arc
-            LineBuffer* ell = LineBufferPool::NewLineBuffer(rewriter->GetBufferPool(), 20);
-            std::unique_ptr<LineBuffer> spEllLB(ell);
-
-            ell->SetDrawingScale(1.0);
-            ell->MoveTo(startX, startY);
-            ell->ArcTo(dstpts[0].x, dstpts[0].y, major, minor, start, end, tilt);
-
-            int numpts = ell->point_count();
-            const RS_D_Point* dstpts = rewriter->FillPointBuffer(ell);
-
-            LineBufferPool::FreeLineBuffer(rewriter->GetBufferPool(), spEllLB.release());
-
-            int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-            gdImageFilledPolygon((gdImagePtr)rewriter->GetW2DTargetImage(),
-                                (gdPointPtr)dstpts,
-                                numpts,
-                                gdc);
-        }
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_outlineEllipse(WT_Outline_Ellipse & outlineEllipse, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //check for override color
-    if (rewriter->IsSymbolW2D())
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().outline().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    WT_Logical_Point center = outlineEllipse.position();
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, (WT_Logical_Point*)&center, 1, false);
-
-    //negate because GD is left-handed coords
-    double tilt = -outlineEllipse.tilt_radian();
-
-    if (tilt == 0.0)
-    {
-        // case where ellipse is unrotated
-
-        int major = ROUND(rewriter->ScaleW2DNumber(file, outlineEllipse.major()));
-        int minor = ROUND(rewriter->ScaleW2DNumber(file, outlineEllipse.minor()));
-
-        //simple bounds check before we draw
-        if ( !(dstpts[0].x + major < 0
-            || dstpts[0].x - major > ((gdImagePtr)rewriter->GetW2DTargetImage())->sx
-            || dstpts[0].y + minor < 0
-            || dstpts[0].x - minor > ((gdImagePtr)rewriter->GetW2DTargetImage())->sy))
-        {
-            //negate because GD is left-handed coords
-            float end   = 360.f - outlineEllipse.start_degree();
-            float start = 360.f - outlineEllipse.end_degree();
-
-            //gd does not like negative angles (its sin/cos lookup table doesn't)
-            while (start < 0.f)
-            {
-                start += 360.f;
-                end   += 360.f;
-            }
-
-            ////////////////////////
-            // handle thickness
-
-            //get W2D line weight
-            int thick = ROUND(rewriter->ScaleW2DNumber(file, file.rendition().line_weight().weight_value()));
-            gdImagePtr brush1 = NULL;
-
-            if (thick > 1)
-            {
-                brush1 = rs_gdImageThickLineBrush(thick, color);
-                gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), brush1);
-            }
-
-            int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-            gdImageArc((gdImagePtr)rewriter->GetW2DTargetImage(),
-                                    dstpts[0].x, dstpts[0].y,
-                                    major * 2, minor * 2,
-                                    (int)start, (int)end,
-                                    brush1 ? gdBrushed : gdc);
-
-            if (brush1)
-            {
-                gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), NULL);
-                gdImageDestroy(brush1);
-            }
-        }
-    }
-    else
-    {
-        // case where ellipse is rotated
-        double rcos = cos(tilt);
-        double rsin = sin(tilt);
-
-        double major = rewriter->ScaleW2DNumber(file, outlineEllipse.major());
-        double minor = rewriter->ScaleW2DNumber(file, outlineEllipse.minor());
-
-        // the half-width / half-height of the bounding box for the rotated ellipse
-        int wid2 = (int)sqrt(major*major*rcos*rcos + minor*minor*rsin*rsin) + 1;
-        int hgt2 = (int)sqrt(major*major*rsin*rsin + minor*minor*rcos*rcos) + 1;
-
-        //simple bounds check before we draw
-        if ( !(dstpts[0].x + wid2 < 0
-            || dstpts[0].x - wid2 > ((gdImagePtr)rewriter->GetW2DTargetImage())->sx
-            || dstpts[0].y + hgt2 < 0
-            || dstpts[0].x - hgt2 > ((gdImagePtr)rewriter->GetW2DTargetImage())->sy))
-        {
-            //negate because GD is left-handed coords
-            double start = -outlineEllipse.start_radian();
-            double end = -outlineEllipse.end_radian();
-
-            // compute start point
-            double tx = major * cos(start);
-            double ty = minor * sin(start);
-            double startX = dstpts[0].x + tx*rcos - ty*rsin;
-            double startY = dstpts[0].y + ty*rcos + tx*rsin;
-
-            // use a line buffer to tessellate the arc
-            LineBuffer* ell = LineBufferPool::NewLineBuffer(rewriter->GetBufferPool(), 20);
-            std::unique_ptr<LineBuffer> spEllLB(ell);
-
-            ell->SetDrawingScale(1.0);
-            ell->MoveTo(startX, startY);
-            ell->ArcTo(dstpts[0].x, dstpts[0].y, major, minor, start, end, tilt);
-
-            int numpts = ell->point_count();
-            const RS_D_Point* dstpts = rewriter->FillPointBuffer(ell);
-
-            LineBufferPool::FreeLineBuffer(rewriter->GetBufferPool(), spEllLB.release());
-
-            ////////////////////////
-            // handle thickness
-
-            //get W2D line weight
-            int thick = ROUND(rewriter->ScaleW2DNumber(file, file.rendition().line_weight().weight_value()));
-            gdImagePtr brush1 = NULL;
-
-            if (thick > 1)
-            {
-                brush1 = rs_gdImageThickLineBrush(thick, color);
-                gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), brush1);
-            }
-
-            int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-            gdImageOpenPolygon((gdImagePtr)rewriter->GetW2DTargetImage(),
-                            (gdPointPtr)dstpts,
-                            numpts,
-                            brush1 ? gdBrushed : gdc);
-
-            if (brush1)
-            {
-                gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), NULL);
-                gdImageDestroy(brush1);
-            }
-        }
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_polygon(WT_Polygon & polygon, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //check for override color
-    if (rewriter->IsSymbolW2D())
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-
-    //do all necessary transformations
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(
-        file, polygon.points(), polygon.count(), true);
-
-    if (dstpts)
-    {
-        gdImageFilledPolygon((gdImagePtr)rewriter->GetW2DTargetImage(),
-                            (gdPointPtr)dstpts,
-                            polygon.count(),
-                            gdc);
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_polytriangle(WT_Polytriangle & polytriangle, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //process override color, if any
-    if (rewriter->IsSymbolW2D() && rewriter->GetOverrideColorMarker().style().color().argb() != RS_Color::EMPTY_COLOR_ARGB)
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-
-    WT_Logical_Point* srcpts = polytriangle.points();
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, srcpts, polytriangle.count(), true);
-
-    if (dstpts)
-    {
-        for (int i=2; i < polytriangle.count(); i++)
-        {
-            gdImageFilledPolygon((gdImagePtr)rewriter->GetW2DTargetImage(),
-                                (gdPointPtr)(dstpts + i - 2),
-                                3,
-                                gdc);
-        }
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_pngGroup4Image(WT_PNG_Group4_Image & pngGroup4Image, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    //transform the bounds
-    WT_Logical_Box bounds = pngGroup4Image.bounds();
-
-    WT_Logical_Point endpts[4];
-    endpts[0].m_x = bounds.m_min.m_x;
-    endpts[0].m_y = bounds.m_min.m_y;
-    endpts[1].m_x = bounds.m_max.m_x;
-    endpts[1].m_y = bounds.m_min.m_y;
-    endpts[2].m_x = bounds.m_max.m_x;
-    endpts[2].m_y = bounds.m_max.m_y;
-    endpts[3].m_x = bounds.m_min.m_x;
-    endpts[3].m_y = bounds.m_max.m_y;
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(
-        file, endpts, 4, false);
-
-    gdImagePtr src = gdImageCreateFromPngPtr(pngGroup4Image.data_size(), (void*)pngGroup4Image.data());
-
-    double angleRad = atan2((double)(dstpts[1].y - dstpts[0].y), (double)(dstpts[1].x - dstpts[0].x));
-    int iAngleDeg = ROUND(-angleRad * M_180PI);
-
-    //case of no rotation
-    if (iAngleDeg == 0)
-    {
-        //case of no rotation
-        int left = rs_min(dstpts[0].x, dstpts[1].x);
-        int top = rs_min(dstpts[1].y, dstpts[2].y);
-        int width = dstpts[1].x - dstpts[0].x;
-        int height = dstpts[1].y - dstpts[2].y; //y is inverted
-
-        gdImageCopyResampled((gdImagePtr)rewriter->GetW2DTargetImage(), src,
-                        left, top,  //dstX, dstY
-                        0, 0, //srcX, srcY
-                        width, height, //int dstW, int dstH,
-                        pngGroup4Image.columns(), pngGroup4Image.rows() //srcW, srcH
-                        );
-    }
-    else
-    {
-        int dx = dstpts[1].x - dstpts[0].x;
-        int dy = dstpts[1].y - dstpts[0].y;
-
-        int width = (int)sqrt((double)dx*dx + dy*dy);
-
-        dx = dstpts[2].x - dstpts[1].x;
-        dy = dstpts[2].y - dstpts[1].y;
-
-        int height = (int)sqrt((double)dx*dx + dy*dy);
-
-        //see if we need to rescale the original image
-
-        if (width != src->sx || height != src->sy)
-        {
-            gdImagePtr resized = gdImageCreateTrueColor(width, height);
-            gdImageCopyResampled(resized, src,
-                                 0, 0,              //dstX, dstY
-                                 0, 0,              //srcX, srcY
-                                 width, height,     //dstW, dstH,
-                                 src->sx, src->sy); //srcW, srcH
-            gdImageDestroy(src);
-            src = resized;
-        }
-
-        double midx = 0.5 * (dstpts[0].x + dstpts[2].x);
-        double midy = 0.5 * (dstpts[0].y + dstpts[2].y);
-
-        gdImageCopyRotated((gdImagePtr)rewriter->GetW2DTargetImage(),
-                           src,
-                           midx, midy,          //dstX, dstY
-                           0, 0,                //srcX, srcY
-                           src->sx, src->sy,    //srcW, srcH
-                           iAngleDeg);
-    }
-
-    gdImageDestroy(src);
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_polyline(WT_Polyline & polyline, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //check for override color
-    if (rewriter->IsSymbolW2D())
-    {
-        //TODO: we have no easy way to determine if a polyline is
-        //just a polyline or the outline of a polygon. Since we need to
-        //use different override colors in these cases, we will take a guess.
-        bool isPossiblyPolygonOutline = false;
-
-        //if the first point and the last point of the polyline are equal,
-        //we will treat it as a polygon outline
-        if (polyline.count() > 2
-            && polyline.points()[0] == polyline.points()[polyline.count() - 1])
-            isPossiblyPolygonOutline = true;
-
-        RS_Color override = rewriter->GetOverrideColorMarker().style().outline().color();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    int gdc = ConvertColor((gdImagePtr)rewriter->GetW2DTargetImage(), color);
-
-    //do all necessary transformations and clipping
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(
-        file, polyline.points(), polyline.count(), true);
-
-    if (dstpts)
-    {
-        int thick = ROUND(rewriter->ScaleW2DNumber(file, file.rendition().line_weight().weight_value()));
-        gdImagePtr brush1 = NULL;
-
-        if (thick > 1)
-        {
-            brush1 = rs_gdImageThickLineBrush(thick, color);
-            gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), brush1);
-        }
-
-        gdImageOpenPolygon((gdImagePtr)rewriter->GetW2DTargetImage(),
-                            (gdPointPtr)dstpts,
-                            polyline.count(),
-                            brush1 ? gdBrushed : gdc);
-
-        if (brush1)
-        {
-            gdImageSetBrush((gdImagePtr)rewriter->GetW2DTargetImage(), NULL);
-            gdImageDestroy(brush1);
-        }
-    }
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_text(WT_Text & text, WT_File & file)
-{
-    if (file.rendition().visibility().visible() == WD_False)
-        return WT_Result::Success;
-
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    if (!rewriter->LayerPassesFilter())
-        return WT_Result::Success;
-
-    WT_RGBA32 rgba = file.rendition().color().rgba();
-    RS_Color color = RS_Color(rgba.m_rgb.r, rgba.m_rgb.g, rgba.m_rgb.b, rgba.m_rgb.a);
-
-    //process override color, if any
-    //text override color is stored in the bg color of the fill
-    //which is otherwise unused
-    if (rewriter->IsSymbolW2D() && rewriter->GetOverrideColorMarker().style().background().argb() != RS_Color::EMPTY_COLOR_ARGB)
-    {
-        RS_Color override = rewriter->GetOverrideColorMarker().style().background();
-
-        if (override.argb() != RS_Color::EMPTY_COLOR_ARGB)
-            color = override;
-    }
-
-    WT_Logical_Point pt = text.position();
-
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, &pt, 1, true);
-
-    if (dstpts)
-    {
-        const WT_Font& font = file.rendition().font();
-
-        //rescale font height
-        double hgt = 0.75 * rewriter->ScaleW2DNumber(file, font.height().height());
-        double angleRad = (double)font.rotation().rotation() * 2.0 * M_PI / 65536.0;
-
-        //match the font
-        int style = RS_FontStyle_Regular;
-
-        if (font.style().bold() == WD_True)
-            style |= (int)RS_FontStyle_Bold;
-        if (font.style().italic() == WD_True)
-            style |= (int)RS_FontStyle_Italic;
-        if (font.style().underlined() == WD_True)
-            style |= (int)RS_FontStyle_Underline;
-
-        wchar_t* uni_name = WT_String::to_wchar(font.font_name().name().length(),
-                                                font.font_name().name().unicode());
-        RS_String rs_uni_name = uni_name;
-        RS_FontDef fdef(rs_uni_name, hgt, (RS_FontStyle_Mask)style, RS_Units_Model);
-        delete [] uni_name;
-
-        const RS_Font* rsfont = rewriter->FindFont(fdef);
-
-        //draw the text
-        wchar_t* uni_text = WT_String::to_wchar(text.string().length(), text.string().unicode());
-
-        //width is not used by GDRenderer - can leave at zero
-        rewriter->DrawString(uni_text, dstpts[0].x, dstpts[0].y, 0.0, hgt, rsfont, color, angleRad);
-
-        delete [] uni_text;
-    }
-
-    //TODO: optionally text position can be specified using
-    //a bounds box. This case needs to be handled here too
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_visibility(WT_Visibility & visibility, WT_File & file)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    file.rendition().visibility() = visibility;
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_codePage(WT_Code_Page & /*codePage*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //(*rewriter->GetW2DTargetImage()).desired_rendition().code_page() = codePage;
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_plotInfo(WT_Plot_Info & /*plotInfo*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //plotInfo.serialize(*rewriter->GetW2DTargetImage());
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_background(WT_Background & /*background*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-    //background.serialize(*rewriter->GetW2DTargetImage());
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_polymarker(WT_Polymarker & polymarker, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //do all necessary transformations and clipping
-    const RS_D_Point* dstpts = rewriter->ProcessW2DPoints(file, polymarker.points(), polymarker.count(), true);
-    dstpts = NULL;
-
-    //WT_Polymarker poly2(outpts, dstpts, true);
-    //poly2.serialize(*rewriter->GetW2DTargetImage());
-
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_markerSize(WT_Marker_Size & /*markerSize*/, WT_File & /*file*/)
-{
-    //GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //rescale the marker size
-    //WT_Integer32 size2 = rewriter->ScaleW2DNumber(file, markerSize.size());
-
-    //(*rewriter->GetW2DTargetImage()).desired_rendition().marker_size() = WT_Marker_Size(size2);
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_markerSymbol(WT_Marker_Symbol & /*markerSymbol*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_mergeControl(WT_Merge_Control & /*mergeControl*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_projection(WT_Projection & /*projection*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_inkedArea(WT_Inked_Area & /*inkedArea*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_alignment(WT_Alignment & /*alignment*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_penPattern(WT_Pen_Pattern & /*penPattern*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_linePattern(WT_Line_Pattern & /*linePattern*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_fillPattern(WT_Fill_Pattern & /*fillPattern*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_dashPattern(WT_Dash_Pattern & /*dashPattern*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-
-WT_Result gdr_process_lineStyle(WT_Line_Style & /*lineStyle*/, WT_File & /*file*/)
-{
-    return WT_Result::Success;
-}
-
-WT_Result gdr_process_layer(WT_Layer & layer, WT_File & file)
-{
-    GDRenderer* rewriter = (GDRenderer*)file.stream_user_data();
-
-    //Most of the time layers are referred to by their integer id only.
-    //Only the first time they are identified by name which we need to keep
-    //track of.
-
-    //first see if we already have this layer
-    WT_Layer* layer2 = file.layer_list().find_layer_from_index(layer.layer_num());
-
-    //if we don't have it in the list, add it
-    if (!layer2)
-    {
-        file.layer_list().add_layer(layer);
-        layer2 = &layer;
-    }
-
-    wchar_t* name = WT_String::to_wchar(layer2->layer_name().length(), layer2->layer_name().unicode());
-
-    //check if the current layer was requested by looking it up
-    //in the W2D layer filter that was passes to the renderer
-    RS_String filter = rewriter->GetLayerFilter();
-
-    if (!filter.empty())
-    {
-        rewriter->LayerPassesFilter() = false;
-
-        wchar_t* strTok = (wchar_t*)alloca(sizeof(wchar_t) * (filter.length() + 1));
-        wcscpy(strTok, filter.c_str());
-
-        wchar_t* ptr;
-        wchar_t* token = _wcstok(strTok, L",", &ptr);
-        while (token)
-        {
-            if (wcscmp(token, name) == 0)
-            {
-                rewriter->LayerPassesFilter() = true;
-                break;
-            }
-
-            token = _wcstok(NULL, L",", &ptr);
-        }
-    }
-
-    delete [] name;
-
-    return WT_Result::Success;
-}

Deleted: trunk/MgDev/Common/Renderers/GDW2DRewriter.h
===================================================================
--- trunk/MgDev/Common/Renderers/GDW2DRewriter.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/GDW2DRewriter.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,100 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef GDW2DREWRITER_H
-#define GDW2DREWRITER_H
-
-#include "whiptk/whip_toolkit.h"
-
-// Standard action routines.
-WT_Result gdr_open(WT_File & file);
-WT_Result gdr_close(WT_File & file);
-WT_Result gdr_read(WT_File & file, int desired_bytes, int &bytes_read, void * buffer);
-WT_Result gdr_seek(WT_File & file, int distance, int &amount_seeked);
-
-//WT_Result gdr_process_author(WT_Author & author, WT_File & file);
-//WT_Result gdr_process_creator(WT_Creator & creator, WT_File & file);
-//WT_Result gdr_process_created(WT_Creation_Time & created, WT_File & file);
-//WT_Result gdr_process_modified(WT_Modification_Time & modified, WT_File & file);
-//WT_Result gdr_process_sourceFilename(WT_Source_Filename & sourceFilename, WT_File & file);
-//WT_Result gdr_process_sourceCreationTime(WT_Source_Creation_Time & sourceCreated, WT_File & file);
-//WT_Result gdr_process_sourceModificationTime(WT_Source_Modification_Time & sourceModified, WT_File & file);
-WT_Result gdr_process_units(WT_Units & units, WT_File & file);
-//WT_Result gdr_process_embed(WT_Embed & embed, WT_File & file);
-//WT_Result gdr_process_namedView(WT_Named_View & namedView, WT_File & file);
-//WT_Result gdr_process_view(WT_View & view, WT_File & file);
-WT_Result gdr_process_plotInfo(WT_Plot_Info & plotInfo, WT_File & file);
-WT_Result gdr_process_background(WT_Background & background, WT_File & file);
-WT_Result gdr_process_color(WT_Color & color, WT_File & file);
-WT_Result gdr_process_lineWeight(WT_Line_Weight & lineWeight, WT_File & file);
-WT_Result gdr_process_lineStyle(WT_Line_Style & lineStyle, WT_File & file);
-WT_Result gdr_process_linePattern(WT_Line_Pattern & linePattern, WT_File & file);
-WT_Result gdr_process_layer(WT_Layer & layer, WT_File & file);
-WT_Result gdr_process_viewport(WT_Viewport & viewport, WT_File & file);
-WT_Result gdr_process_visibility(WT_Visibility & visibility, WT_File & file);
-WT_Result gdr_process_codePage(WT_Code_Page & codePage, WT_File & file);
-WT_Result gdr_process_colorMap(WT_Color_Map & colorMap, WT_File & file);
-//WT_Result gdr_process_comments(WT_Comments & comments, WT_File & file);
-WT_Result gdr_process_contourSet(WT_Contour_Set & contourSet, WT_File & file);
-//WT_Result gdr_process_copyright(WT_Copyright & copyright, WT_File & file);
-WT_Result gdr_process_dashPattern(WT_Dash_Pattern & dashPattern, WT_File & file);
-//WT_Result gdr_process_description(WT_Description & description, WT_File & file);
-WT_Result gdr_process_fill(WT_Fill & fill, WT_File & file);
-WT_Result gdr_process_filledEllipse(WT_Filled_Ellipse & filledEllipse, WT_File & file);
-WT_Result gdr_process_font(WT_Font & font, WT_File & file);
-WT_Result gdr_process_gouraudPolyline(WT_Gouraud_Polyline & gouraudPolyline, WT_File & file);
-WT_Result gdr_process_gouraudPolytriangle(WT_Gouraud_Polytriangle & gouraudPolytriangle, WT_File & file);
-WT_Result gdr_process_image(WT_Image & image, WT_File & file);
-//WT_Result gdr_process_keywords(WT_Keywords & keywords, WT_File & file);
-WT_Result gdr_process_markerSize(WT_Marker_Size & markerSize, WT_File & file);
-WT_Result gdr_process_markerSymbol(WT_Marker_Symbol & markerSymbol, WT_File & file);
-WT_Result gdr_process_mergeControl(WT_Merge_Control & mergeControl, WT_File & file);
-//WT_Result gdr_process_namedViewList(WT_Named_View_List & namedViewList, WT_File & file);
-WT_Result gdr_process_origin(WT_Origin & origin, WT_File & file);
-WT_Result gdr_process_outlineEllipse(WT_Outline_Ellipse & outlineEllipse, WT_File & file);
-WT_Result gdr_process_polygon(WT_Polygon & polygon, WT_File & file);
-WT_Result gdr_process_polymarker(WT_Polymarker & polymarker, WT_File & file);
-WT_Result gdr_process_polytriangle(WT_Polytriangle & polytriangle, WT_File & file);
-WT_Result gdr_process_projection(WT_Projection & projection, WT_File & file);
-//WT_Result gdr_process_subject(WT_Subject & subject, WT_File & file);
-//WT_Result gdr_process_title(WT_Title & title, WT_File & file);
-//WT_Result gdr_process_unknown(WT_Unknown & unknown, WT_File & file);
-//WT_Result gdr_process_url(WT_URL & url, WT_File & file);
-WT_Result gdr_process_pngGroup4Image(WT_PNG_Group4_Image & pngGroup4Image, WT_File & file);
-WT_Result gdr_process_polyline(WT_Polyline & polyline, WT_File & file);
-WT_Result gdr_process_text(WT_Text & text, WT_File & file);
-WT_Result gdr_process_inkedArea(WT_Inked_Area & inkedArea, WT_File & file);
-//WT_Result gdr_process_plotOptimized(WT_Plot_Optimized & plotOptimized, WT_File & file);
-//WT_Result gdr_process_groupBegin(WT_Group_Begin & groupBegin, WT_File & file);
-//WT_Result gdr_process_groupEnd(WT_Group_End & groupEnd, WT_File & file);
-//WT_Result gdr_process_embeddedFont(WT_Embedded_Font & embeddedFont, WT_File & file);
-//WT_Result gdr_process_trustedFontList(WT_Trusted_Font_List & tustedFontList, WT_File & file);
-//WT_Result gdr_process_blockref(WT_BlockRef & blockref, WT_File & file);
-//WT_Result gdr_process_blockMeaning(WT_Block_Meaning & blockMeaning, WT_File & file);
-//WT_Result gdr_process_encryption(WT_Encryption & encryption, WT_File & file);
-//WT_Result gdr_process_orientation(WT_Orientation & orientation, WT_File & file);
-WT_Result gdr_process_alignment(WT_Alignment & alignment, WT_File & file);
-//WT_Result gdr_process_password(WT_Password & password, WT_File & file);
-//WT_Result gdr_process_guid(WT_Guid & guid, WT_File & file);
-//WT_Result gdr_process_fileTime(WT_FileTime & fileTime, WT_File & file);
-//WT_Result gdr_process_userData(WT_UserData & userData, WT_File & file);
-WT_Result gdr_process_penPattern(WT_Pen_Pattern & penPattern, WT_File & file);
-WT_Result gdr_process_fillPattern(WT_Fill_Pattern & fillPattern, WT_File & file);
-//WT_Result gdr_process_DigitalSign(WT_SignData & digitalSing, WT_File & file);
-//WT_Result gdr_process_dwf_header(WT_DWF_Header & dwf_header, WT_File & file);
-
-#endif

Modified: trunk/MgDev/Common/Renderers/Renderers.vcxproj
===================================================================
--- trunk/MgDev/Common/Renderers/Renderers.vcxproj	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/Renderers.vcxproj	2019-06-22 08:42:36 UTC (rev 9559)
@@ -221,11 +221,7 @@
     <ClCompile Include="UTFGridContent.cpp" />
     <ClCompile Include="UTFGridRenderer.cpp" />
     <ClCompile Include="W2DRewriter.cpp" />
-    <ClCompile Include="complex_polygon_gd.cpp" />
-    <ClCompile Include="GDFillPatterns.cpp" />
-    <ClCompile Include="GDRenderer.cpp" />
     <ClCompile Include="GDUtils.cpp" />
-    <ClCompile Include="GDW2DRewriter.cpp" />
     <ClCompile Include="RS_ByteData.cpp" />
     <ClCompile Include="ObservationMesh.cpp" />
     <ClCompile Include="KmlContent.cpp" />
@@ -274,11 +270,7 @@
     <ClInclude Include="W2DRewriter.h" />
     <ClInclude Include="whip_fill_library.h" />
     <ClInclude Include="whip_hatch_library.h" />
-    <ClInclude Include="complex_polygon_gd.h" />
-    <ClInclude Include="GDFillPatterns.h" />
-    <ClInclude Include="GDRenderer.h" />
     <ClInclude Include="GDUtils.h" />
-    <ClInclude Include="GDW2DRewriter.h" />
     <ClInclude Include="RS_ByteData.h" />
     <ClInclude Include="ObservationMesh.h" />
     <ClInclude Include="KmlContent.h" />

Modified: trunk/MgDev/Common/Renderers/Renderers.vcxproj.filters
===================================================================
--- trunk/MgDev/Common/Renderers/Renderers.vcxproj.filters	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/Renderers.vcxproj.filters	2019-06-22 08:42:36 UTC (rev 9559)
@@ -39,21 +39,9 @@
     <ClCompile Include="W2DRewriter.cpp">
       <Filter>DWFRenderers</Filter>
     </ClCompile>
-    <ClCompile Include="complex_polygon_gd.cpp">
-      <Filter>GDRenderer</Filter>
-    </ClCompile>
-    <ClCompile Include="GDFillPatterns.cpp">
-      <Filter>GDRenderer</Filter>
-    </ClCompile>
-    <ClCompile Include="GDRenderer.cpp">
-      <Filter>GDRenderer</Filter>
-    </ClCompile>
     <ClCompile Include="GDUtils.cpp">
       <Filter>GDRenderer</Filter>
     </ClCompile>
-    <ClCompile Include="GDW2DRewriter.cpp">
-      <Filter>GDRenderer</Filter>
-    </ClCompile>
     <ClCompile Include="RS_ByteData.cpp">
       <Filter>GDRenderer</Filter>
     </ClCompile>
@@ -152,21 +140,9 @@
     <ClInclude Include="whip_hatch_library.h">
       <Filter>DWFRenderers</Filter>
     </ClInclude>
-    <ClInclude Include="complex_polygon_gd.h">
-      <Filter>GDRenderer</Filter>
-    </ClInclude>
-    <ClInclude Include="GDFillPatterns.h">
-      <Filter>GDRenderer</Filter>
-    </ClInclude>
-    <ClInclude Include="GDRenderer.h">
-      <Filter>GDRenderer</Filter>
-    </ClInclude>
     <ClInclude Include="GDUtils.h">
       <Filter>GDRenderer</Filter>
     </ClInclude>
-    <ClInclude Include="GDW2DRewriter.h">
-      <Filter>GDRenderer</Filter>
-    </ClInclude>
     <ClInclude Include="RS_ByteData.h">
       <Filter>GDRenderer</Filter>
     </ClInclude>

Deleted: trunk/MgDev/Common/Renderers/complex_polygon_gd.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/complex_polygon_gd.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/complex_polygon_gd.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,353 +0,0 @@
-
-/* Traian 1/2/2007
-   Polygon fill routines taken from the Graphics Programming Black Book by M. Abrash.
-
-   I (heavily) modified the code as follows:
-   * add support for polygons with multiple contours,
-   * do polygon clipping if parts of the polygon are outside of
-   the screen,
-   * Reduce number of memory allocations by reusing the same
-   buffer for egde lists
-   * function no longer returns an int
-
-   Original code description follows below.
-*/
-
-/* Color-fills an arbitrarily-shaped polygon described by VertexList.
-If the first and last points in VertexList are not the same, the path
-around the polygon is automatically closed. All vertices are offset
-by (XOffset, YOffset). Returns 1 for success, 0 if memory allocation
-failed.
-If the polygon shape is known in advance, speedier processing may be
-enabled by specifying the shape as follows: "convex" - a rubber band
-stretched around the polygon would touch every vertex in order;
-"nonconvex" - the polygon is not self-intersecting, but need not be
-convex; "complex" - the polygon may be self-intersecting, or, indeed,
-any sort of polygon at all. Complex will work for all polygons; convex
-is fastest. Undefined results will occur if convex is specified for a
-nonconvex or complex polygon.
-Define CONVEX_CODE_LINKED if the fast convex polygon filling code from
-Chapter 21 is linked in. Otherwise, convex polygons are
-handled by the complex polygon filling code.
-Nonconvex is handled as complex in this implementation. See text for a
-discussion of faster nonconvex handling
-
-Link with L23-4.C and L23-2.C in Small model.
-Tested with Borland C++ 4.02 by Jim Mischel 12/16/94.
-*/
-
-#include "stdafx.h"
-#include "complex_polygon_gd.h"
-#include <stdlib.h>
-
-/* Describes a single point (used for a single vertex) */
-struct Point {
-   int X;   /* X coordinate */
-   int Y;   /* Y coordinate */
-};
-
-/* Describes the beginning and ending X coordinates of a single
-   horizontal line (used only by fast polygon fill code) */
-struct HLine {
-   int XStart; /* X coordinate of leftmost pixel in line */
-   int XEnd;   /* X coordinate of rightmost pixel in line */
-};
-/* Describes a Length-long series of horizontal lines, all assumed to
-   be on contiguous scan lines starting at YStart and proceeding
-   downward (used to describe a scan-converted polygon to the
-   low-level hardware-dependent drawing code) (used only by fast
-   polygon fill code) */
-struct HLineList {
-   int Length;                /* # of horizontal lines */
-   int YStart;                /* Y coordinate of topmost line */
-   struct HLine * HLinePtr;   /* pointer to list of horz lines */
-};
-
-#define SWAP(a,b) {temp = a; a = b; b = temp;}
-
-struct EdgeState {
-    struct EdgeState *NextEdge;
-    int X;
-    int StartY;
-    int WholePixelXMove;
-    int XDirection;
-    int ErrorTerm;
-    int ErrorTermAdjUp;
-    int ErrorTermAdjDown;
-    int Count;
-};
-
-complex_polygon_gd::complex_polygon_gd()
-{
-    m_bufEdgeState = NULL;
-    m_nBufEdgeState = 0;
-}
-complex_polygon_gd::~complex_polygon_gd()
-{
-    delete [] m_bufEdgeState;
-}
-
-
-void complex_polygon_gd::FillPolygon(Point * VertexList, int nVerts, int* Contours, int nContours, int Color, gdImagePtr target)
-{
-    struct EdgeState *EdgeTableBuffer;
-    int CurrentY;
-
-    /* It takes a minimum of 3 vertices to cause any pixels to be
-    drawn; reject polygons that are guaranteed to be invisible */
-    if (nVerts < 3)
-        return;
-
-    /* Get enough memory to store the entire edge table */
-    /* TIS -- reuse a buffer owned by the class */
-    if (m_nBufEdgeState < (size_t)nVerts)
-    {
-        delete [] m_bufEdgeState;
-        m_nBufEdgeState = nVerts;
-        m_bufEdgeState = new EdgeState[m_nBufEdgeState];
-    }
-
-    EdgeTableBuffer = m_bufEdgeState;
-
-    /* Build the global edge table */
-    BuildGET(VertexList, Contours, nContours, EdgeTableBuffer, target->sy - 1);
-
-    if (m_GETPtr) /* true if polygon was not completely clipped out */
-    {
-        /* Scan down through the polygon edges, one scan line at a time,
-        so long as at least one edge remains in either the GET or AET */
-        m_AETPtr = NULL;    /* initialize the active edge table to empty */
-        CurrentY = m_GETPtr->StartY; /* start at the top polygon vertex */
-        while (((m_GETPtr != NULL) || (m_AETPtr != NULL))
-            && CurrentY != target->sy)
-        {
-            MoveXSortedToAET(CurrentY);  /* update AET for this scan line */
-            ScanOutAET(CurrentY, Color, target); /* draw this scan line from AET */
-            AdvanceAET();                /* advance AET edges 1 scan line */
-            XSortAET();                  /* resort on X */
-            CurrentY++;                  /* advance to the next scan line */
-        }
-    }
-}
-
-/* Creates a GET in the buffer pointed to by NextFreeEdgeStruc from
-the vertex list. Edge endpoints are flipped, if necessary, to
-guarantee all edges go top to bottom. The GET is sorted primarily
-by ascending Y start coordinate, and secondarily by ascending X
-start coordinate within edges with common Y coordinates */
-void complex_polygon_gd::BuildGET(struct Point * VertexList,
-int* Contours, int nContours, struct EdgeState * NextFreeEdgeStruc, int MaxY)
-{
-    int i, StartX, StartY, EndX, EndY, DeltaY, DeltaX, Width, temp, SkipY;
-    struct EdgeState *NewEdgePtr;
-    struct EdgeState *FollowingEdge, **FollowingEdgeLink;
-    struct Point *VertexPtr;
-
-    /* Scan through the vertex list and put all non-0-height edges into
-    the GET, sorted by increasing Y start coordinate */
-    VertexPtr = VertexList;   /* point to the vertex list */
-    m_GETPtr = NULL;    /* initialize the global edge table to empty */
-
-    int offset = 0;
-    for (int j=0; j<nContours; j++)
-    {
-        for (i = 0; i < Contours[j]; i++) {
-            /* Calculate the edge height and width */
-            StartX = VertexPtr[offset + i].X;
-            StartY = VertexPtr[offset + i].Y;
-            /* The edge runs from the current point to the previous one */
-            if (i == 0) {
-                /* Wrap back around to the end of the list */
-                EndX = VertexPtr[offset + Contours[j]-1].X;
-                EndY = VertexPtr[offset + Contours[j]-1].Y;
-            } else {
-                EndX = VertexPtr[offset + i-1].X;
-                EndY = VertexPtr[offset + i-1].Y;
-            }
-            /* Make sure the edge runs top to bottom */
-            if (StartY > EndY) {
-                SWAP(StartX, EndX);
-                SWAP(StartY, EndY);
-            }
-            /* Skip if this can't ever be an active edge (has 0 height)
-               or if the edge doesn't cross the vertical screen
-               bounds at all */
-
-            if ((DeltaY = EndY - StartY) != 0
-                && (EndY > 0) && (StartY <= MaxY)) {
-                /* Allocate space for this edge's info, and fill in the
-                structure */
-                NewEdgePtr = NextFreeEdgeStruc++;
-                NewEdgePtr->XDirection =   /* direction in which X moves */
-                    ((DeltaX = EndX - StartX) > 0) ? 1 : -1;
-                Width = abs(DeltaX);
-                NewEdgePtr->X = StartX;
-
-                /* clip stuff that's before beginning of screen
-                   We can't just change StartY -- we also need to
-                   update the initial conditions for the edge
-                   rasterizer
-                   */
-
-                /* find how many rows we have to skip */
-                SkipY = (StartY >=0) ? 0 : -StartY;
-                StartY += SkipY;
-                NewEdgePtr->StartY = StartY;
-                NewEdgePtr->Count = DeltaY - SkipY;
-                NewEdgePtr->ErrorTermAdjDown = DeltaY;
-
-                /* set initial rasterization conditions */
-                if (DeltaX >= 0)  /* initial error term going L->R */
-                    NewEdgePtr->ErrorTerm = 0;
-                else              /* initial error term going R->L */
-                    NewEdgePtr->ErrorTerm = -DeltaY + 1;
-                if (DeltaY >= Width) {     /* Y-major edge */
-                    NewEdgePtr->WholePixelXMove = 0;
-                    NewEdgePtr->ErrorTermAdjUp = Width;
-                } else {                   /* X-major edge */
-                    NewEdgePtr->WholePixelXMove =
-                        (Width / DeltaY) * NewEdgePtr->XDirection;
-                    NewEdgePtr->ErrorTermAdjUp = Width % DeltaY;
-                }
-
-                /* update initial conditions only if we have to*/
-                if (SkipY != 0) {
-                    int XMove = (SkipY + 1) * NewEdgePtr->WholePixelXMove;
-                    int ErrorMove = NewEdgePtr->ErrorTerm + (SkipY + 1) * NewEdgePtr->ErrorTermAdjUp;
-                    int ErrorDiv = ErrorMove / NewEdgePtr->ErrorTermAdjDown;
-                    int ErrorMod = ErrorMove % NewEdgePtr->ErrorTermAdjDown;
-
-                    NewEdgePtr->X += XMove + ErrorDiv * NewEdgePtr->XDirection;
-                    StartX = NewEdgePtr->X;
-                    NewEdgePtr->ErrorTerm = ErrorMod - NewEdgePtr->ErrorTermAdjDown;
-                }
-
-                /* Link the new edge into the GET so that the edge list is
-                still sorted by Y coordinate, and by X coordinate for all
-                edges with the same Y coordinate */
-                FollowingEdgeLink = &m_GETPtr;
-                for (;;) {
-                    FollowingEdge = *FollowingEdgeLink;
-                    if ((FollowingEdge == NULL) ||
-                        (FollowingEdge->StartY > StartY) ||
-                        ((FollowingEdge->StartY == StartY) &&
-                        (FollowingEdge->X >= StartX))) {
-                            NewEdgePtr->NextEdge = FollowingEdge;
-                            *FollowingEdgeLink = NewEdgePtr;
-                            break;
-                    }
-                    FollowingEdgeLink = &FollowingEdge->NextEdge;
-                }
-            }
-        }
-
-        offset += Contours[j];
-    }
-}
-
-/* Sorts all edges currently in the active edge table into ascending
-order of current X coordinates */
-void complex_polygon_gd::XSortAET() {
-    struct EdgeState *CurrentEdge, **CurrentEdgePtr, *TempEdge;
-    int SwapOccurred;
-
-    /* Scan through the AET and swap any adjacent edges for which the
-    second edge is at a lower current X coord than the first edge.
-    Repeat until no further swapping is needed */
-    if (m_AETPtr != NULL) {
-        do {
-            SwapOccurred = 0;
-            CurrentEdgePtr = &m_AETPtr;
-            while ((CurrentEdge = *CurrentEdgePtr)->NextEdge != NULL) {
-                if (CurrentEdge->X > CurrentEdge->NextEdge->X) {
-                    /* The second edge has a lower X than the first;
-                    swap them in the AET */
-                    TempEdge = CurrentEdge->NextEdge->NextEdge;
-                    *CurrentEdgePtr = CurrentEdge->NextEdge;
-                    CurrentEdge->NextEdge->NextEdge = CurrentEdge;
-                    CurrentEdge->NextEdge = TempEdge;
-                    SwapOccurred = 1;
-                }
-                CurrentEdgePtr = &(*CurrentEdgePtr)->NextEdge;
-            }
-        } while (SwapOccurred != 0);
-    }
-}
-
-/* Advances each edge in the AET by one scan line.
-Removes edges that have been fully scanned. */
-void complex_polygon_gd::AdvanceAET() {
-    struct EdgeState *CurrentEdge, **CurrentEdgePtr;
-
-    /* Count down and remove or advance each edge in the AET */
-    CurrentEdgePtr = &m_AETPtr;
-    while ((CurrentEdge = *CurrentEdgePtr) != NULL) {
-        /* Count off one scan line for this edge */
-        if ((--(CurrentEdge->Count)) == 0) {
-            /* This edge is finished, so remove it from the AET */
-            *CurrentEdgePtr = CurrentEdge->NextEdge;
-        } else {
-            /* Advance the edge's X coordinate by minimum move */
-            CurrentEdge->X += CurrentEdge->WholePixelXMove;
-            /* Determine whether it's time for X to advance one extra */
-            if ((CurrentEdge->ErrorTerm +=
-                CurrentEdge->ErrorTermAdjUp) > 0) {
-                    CurrentEdge->X += CurrentEdge->XDirection;
-                    CurrentEdge->ErrorTerm -= CurrentEdge->ErrorTermAdjDown;
-            }
-            CurrentEdgePtr = &CurrentEdge->NextEdge;
-        }
-    }
-}
-
-/* Moves all edges that start at the specified Y coordinate from the
-GET to the AET, maintaining the X sorting of the AET. */
-void complex_polygon_gd::MoveXSortedToAET(int YToMove) {
-    struct EdgeState *AETEdge, **AETEdgePtr, *TempEdge;
-    int CurrentX;
-
-    /* The GET is Y sorted. Any edges that start at the desired Y
-    coordinate will be first in the GET, so we'll move edges from
-    the GET to AET until the first edge left in the GET is no longer
-    at the desired Y coordinate. Also, the GET is X sorted within
-    each Y coordinate, so each successive edge we add to the AET is
-    guaranteed to belong later in the AET than the one just added */
-    AETEdgePtr = &m_AETPtr;
-    while ((m_GETPtr != NULL) && (m_GETPtr->StartY == YToMove)) {
-        CurrentX = m_GETPtr->X;
-        /* Link the new edge into the AET so that the AET is still
-        sorted by X coordinate */
-        for (;;) {
-            AETEdge = *AETEdgePtr;
-            if ((AETEdge == NULL) || (AETEdge->X >= CurrentX)) {
-                TempEdge = m_GETPtr->NextEdge;
-                *AETEdgePtr = m_GETPtr;  /* link the edge into the AET */
-                m_GETPtr->NextEdge = AETEdge;
-                AETEdgePtr = &m_GETPtr->NextEdge;
-                m_GETPtr = TempEdge;   /* unlink the edge from the GET */
-                break;
-            } else {
-                AETEdgePtr = &AETEdge->NextEdge;
-            }
-        }
-    }
-}
-
-/* Fills the scan line described by the current AET at the specified Y
-coordinate in the specified color, using the odd/even fill rule */
-void complex_polygon_gd::ScanOutAET(int YToScan, int Color, gdImagePtr target) {
-    int LeftX;
-    struct EdgeState *CurrentEdge;
-
-    /* Scan through the AET, drawing line segments as each pair of edge
-    crossings is encountered. The nearest pixel on or to the right
-    of left edges is drawn, and the nearest pixel to the left of but
-    not on right edges is drawn */
-    CurrentEdge = m_AETPtr;
-    while (CurrentEdge != NULL) {
-        LeftX = CurrentEdge->X;
-        CurrentEdge = CurrentEdge->NextEdge;
-        DrawHorizontalLineSeg(YToScan, LeftX, CurrentEdge->X-1, Color, target);
-        CurrentEdge = CurrentEdge->NextEdge;
-    }
-}

Deleted: trunk/MgDev/Common/Renderers/complex_polygon_gd.h
===================================================================
--- trunk/MgDev/Common/Renderers/complex_polygon_gd.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Common/Renderers/complex_polygon_gd.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1,55 +0,0 @@
-//
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef complex_polygon_gd_H
-#define complex_polygon_gd_H
-
-#include "gd.h"
-
-struct EdgeState;
-struct Point;
-
-class complex_polygon_gd
-{
-public:
-    complex_polygon_gd();
-    ~complex_polygon_gd();
-
-    void FillPolygon(Point * VertexList, int nVerts, int* Contours, int nContours, int Color, gdImagePtr target);
-
-private:
-    //This is what you want to implement for your own render target
-    //for all the rest of the code to work with it
-    inline void DrawHorizontalLineSeg(int Y, int StartX, int EndX, int Color, gdImagePtr target)
-    {
-        if (StartX <= EndX)
-            gdImageLine(target, StartX, Y, EndX, Y, Color);
-    }
-
-    void BuildGET(Point *, int* Contours, int nContours, EdgeState *, int MaxY);
-    void MoveXSortedToAET(int);
-    void ScanOutAET(int, int, gdImagePtr);
-    void AdvanceAET();
-    void XSortAET();
-
-    /* Pointers to global edge table (GET) and active edge table (AET) */
-    struct EdgeState *m_GETPtr, *m_AETPtr;
-    EdgeState* m_bufEdgeState;
-    size_t m_nBufEdgeState;
-};
-
-#endif

Modified: trunk/MgDev/Server/src/Core/serverconfig.ini
===================================================================
--- trunk/MgDev/Server/src/Core/serverconfig.ini	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Core/serverconfig.ini	2019-06-22 08:42:36 UTC (rev 9559)
@@ -76,7 +76,6 @@
 # PreCacheMaps                     The list of maps to precache at server startup.
 #                                       Value = Map resource name(s) separated by ","
 #                                       Example: Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition
-# Renderer                         Image renderer to use (GD or AGG)
 # ResourcesPath                    Path where the localization resource files are stored
 # SerialNumber                     The MapGuide Server serial number (not used by MapGuide Open Source)
 #                                       0 <= Length <= 12
@@ -103,7 +102,6 @@
 MentorDictionaryPath               = ../../../Oem/CsMap/CsMapDev/Dictionaries/
 MentorUserDictionaryPath           =
 PreCacheMaps                       =
-Renderer                           = AGG
 ResourcesPath                      = Resources/
 SerialNumber                       =
 TcpIpMtu                           = 1460

Modified: trunk/MgDev/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -36,7 +36,7 @@
 
     ACE_ASSERT(m_stream != NULL);
 
-    if (5 == m_packet.m_NumArguments)
+    if (4 == m_packet.m_NumArguments)
     {
         Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
         Ptr<MgResourceIdentifier> resource = map->GetResourceId();
@@ -44,9 +44,6 @@
 
         Ptr<MgMetatile> metaTile = (MgMetatile*)m_stream->GetObject();
 
-        STRING rendererName;
-        m_stream->GetString(rendererName);
-
         INT32 subTileX = 0;
         m_stream->GetInt32(subTileX);
 
@@ -64,10 +61,8 @@
         MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
         MG_LOG_OPERATION_MESSAGE_ADD_INT32(metaTile->GetMetaTilingFactor());
         MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"]");
-        
+
         MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
-        MG_LOG_OPERATION_MESSAGE_ADD_STRING(rendererName.c_str());
-        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
         MG_LOG_OPERATION_MESSAGE_ADD_INT32(subTileX);
         MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
         MG_LOG_OPERATION_MESSAGE_ADD_INT32(subTileY);
@@ -75,7 +70,7 @@
 
         Validate();
 
-        Ptr<MgByteReader> tile = m_service->RenderTileFromMetaTile(map, metaTile, rendererName, subTileX, subTileY);
+        Ptr<MgByteReader> tile = m_service->RenderTileFromMetaTile(map, metaTile, subTileX, subTileY);
 
         EndExecution(tile);
     }

Modified: trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -18,7 +18,6 @@
 #include "MapGuideCommon.h"
 #include "ServerRenderingService.h"
 #include "DefaultStylizer.h"
-#include "GDRenderer.h"
 #include "AGGRenderer.h"
 #include "UTFGridRenderer.h"
 #include "RSMgSymbolManager.h"
@@ -79,10 +78,6 @@
     assert(m_svcDrawing != NULL);
 
     MgConfiguration* pConf = MgConfiguration::GetInstance();
-    pConf->GetStringValue(MgConfigProperties::GeneralPropertiesSection,
-                          MgConfigProperties::GeneralPropertyRenderer,
-                          m_rendererName,
-                          MgConfigProperties::DefaultGeneralPropertyRenderer);
 
     pConf->GetIntValue(MgConfigProperties::RenderingServicePropertiesSection,
                           MgConfigProperties::RenderingServicePropertyRasterGridSize,
@@ -129,7 +124,6 @@
                           bGeneralizeData,
                           MgConfigProperties::DefaultRenderingServicePropertyGeneralizeData);
     AGGRenderer::s_bGeneralizeData = bGeneralizeData;
-    GDRenderer::s_bGeneralizeData = bGeneralizeData;
 }
 
 
@@ -465,7 +459,7 @@
 
     // initialize the renderer (set clipping to false so that we label
     // the unclipped geometry)
-    auto_ptr<SE_Renderer> dr(CreateRenderer(m_rendererName, width, height, bgColor, false, true, tileExtentOffset));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(width, height, bgColor, false, true, tileExtentOffset));
 
     // create a temporary collection containing all the layers for the base group
     Ptr<MgLayerCollection> layers = map->GetLayers();
@@ -588,7 +582,7 @@
     bgColor.alpha() = 0;
 
     // initialize the renderer
-    auto_ptr<SE_Renderer> dr(CreateRenderer(m_rendererName, width, height, bgColor, true));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(width, height, bgColor, true));
 
     bool bIncludeDynamicLayers = ((options->GetBehavior() & MgRenderingOptions::RenderLayers) == MgRenderingOptions::RenderLayers);
     bool bIncludeBaseLayers = ((options->GetBehavior() & MgRenderingOptions::RenderBaseLayers) == MgRenderingOptions::RenderBaseLayers);
@@ -784,7 +778,7 @@
     // initialize the renderer with the rendering canvas size - in this
     // case it is not necessarily the same size as the requested image
     // size due to support for non-square pixels
-    auto_ptr<SE_Renderer> dr(CreateRenderer(m_rendererName, drawWidth, drawHeight, bgcolor, false));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(drawWidth, drawHeight, bgcolor, false));
 
     // call the internal helper API to do all the stylization overhead work
     ret = RenderMapInternal(map, selection, NULL, dr.get(), drawWidth, drawHeight, width, height, format, scale, b, true, bKeepSelection, true, NULL);
@@ -923,7 +917,7 @@
                      backgroundColor->GetAlpha());
 
     // initialize the appropriate map renderer
-    auto_ptr<SE_Renderer> dr(CreateRenderer(m_rendererName, width, height, bgcolor, bClip));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(width, height, bgcolor, bClip));
 
     if(NULL != pPRMResult)
     {
@@ -994,7 +988,7 @@
 
     double point_buf[2];
     double* point = NULL;
-    auto_ptr<SE_Renderer> impRenderer;
+    std::unique_ptr<AGGRenderer> impRenderer;
     if (geometry && maxFeatures == 1)
     {
         MgPolygon* polygon = dynamic_cast<MgPolygon*>(geometry);
@@ -1028,7 +1022,7 @@
                 point = point_buf;
 
                 RS_Color bgColor; // not used
-                impRenderer.reset(CreateRenderer(m_rendererName, 1, 1, bgColor, false));
+                impRenderer.reset(CreateRenderer(1, 1, bgColor, false));
             }
         }
     }
@@ -1137,7 +1131,7 @@
 MgByteReader* MgServerRenderingService::RenderMapInternal(MgMap* map,
                                                           MgSelection* selection,
                                                           MgReadOnlyLayerCollection* roLayers,
-                                                          SE_Renderer* dr,
+                                                          AGGRenderer* dr,
                                                           INT32 drawWidth,
                                                           INT32 drawHeight,
                                                           INT32 saveWidth,
@@ -1168,7 +1162,7 @@
 MgByteReader* MgServerRenderingService::RenderMapInternal(MgMap* map,
                                                           MgSelection* selection,
                                                           MgReadOnlyLayerCollection* roLayers,
-                                                          SE_Renderer* dr,
+                                                          AGGRenderer* dr,
                                                           INT32 drawWidth,
                                                           INT32 drawHeight,
                                                           INT32 saveWidth,
@@ -1289,7 +1283,7 @@
 
     MG_THROW()  // to skip a faulty tile we need to rethrow the exception which could be thrown in StylizeLayers
 
-    Ptr<MgByteReader> ret = CreateImageFromRenderer(map, dr, saveWidth, saveHeight, format, m_rendererName, pPRMResult);
+    Ptr<MgByteReader> ret = CreateImageFromRenderer(map, dr, saveWidth, saveHeight, format, pPRMResult);
 
     return ret.Detach();
 }
@@ -1325,7 +1319,7 @@
                      backgroundColor->GetAlpha());
 
     //initialize a renderer
-    auto_ptr<Renderer> dr(CreateRenderer(m_rendererName, width, height, bgcolor, false, false, 0.0));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(width, height, bgcolor, false, false, 0.0));
 
     RS_Bounds b(0,0,width,height);
 
@@ -1353,13 +1347,9 @@
     dr->EndMap();
 
     // get a byte representation of the image
-    auto_ptr<RS_ByteData> data;
+    std::unique_ptr<RS_ByteData> data;
+    data.reset((dr.get())->Save(format, width, height));
 
-    if (wcscmp(m_rendererName.c_str(), L"AGG") == 0)
-        data.reset(((AGGRenderer*)dr.get())->Save(format, width, height));
-    else
-        data.reset(((GDRenderer*)dr.get())->Save(format, width, height));
-
     if (NULL != data.get())
     {
         // put this into a byte source
@@ -1556,7 +1546,7 @@
 
         MdfModel::VectorLayerDefinition* vl = NULL;
         Ptr<MgResourceLayerDefinitionCacheItem> cacheItem;
-        auto_ptr<MdfModel::LayerDefinition> ldf;
+        std::unique_ptr<MdfModel::LayerDefinition> ldf;
         Ptr<MgResourceIdentifier> layerResId = layer->GetLayerDefinition();
         if (bOnlyVisibleLayers)
         {
@@ -1621,7 +1611,7 @@
             }
 
             // Initialize the reader
-            auto_ptr<RSMgFeatureReader> rsrdr;
+            std::unique_ptr<RSMgFeatureReader> rsrdr;
 
             try
             {
@@ -1816,8 +1806,7 @@
 
 
 ///////////////////////////////////////////////////////////////////////////////
-SE_Renderer* MgServerRenderingService::CreateRenderer(CREFSTRING rendererName,
-                                                      INT32 width,
+AGGRenderer* MgServerRenderingService::CreateRenderer(INT32 width,
                                                       INT32 height,
                                                       RS_Color& bgColor,
                                                       bool requiresClipping,
@@ -1824,20 +1813,13 @@
                                                       bool localOverposting,
                                                       double tileExtentOffset)
 {
-    SE_Renderer* renderer = NULL;
-    if (wcscmp(rendererName.c_str(), L"AGG") == 0)
-        renderer = new AGGRenderer(width, height, bgColor, requiresClipping, localOverposting, tileExtentOffset);
-    else
-        renderer = new GDRenderer(width, height, bgColor, requiresClipping, localOverposting, tileExtentOffset);
+    auto renderer = new AGGRenderer(width, height, bgColor, requiresClipping, localOverposting, tileExtentOffset);
 
-    if (renderer != NULL)
-    {
-        renderer->SetRasterGridSize(m_rasterGridSize);
-        renderer->SetMinRasterGridSize(m_minRasterGridSize);
-        renderer->SetRasterGridSizeOverrideRatio(m_rasterGridSizeOverrideRatio);
-        renderer->SetMaxRasterImageWidth(m_maxRasterImageWidth);
-        renderer->SetMaxRasterImageHeight(m_maxRasterImageHeight);
-    }
+    renderer->SetRasterGridSize(m_rasterGridSize);
+    renderer->SetMinRasterGridSize(m_minRasterGridSize);
+    renderer->SetRasterGridSizeOverrideRatio(m_rasterGridSizeOverrideRatio);
+    renderer->SetMaxRasterImageWidth(m_maxRasterImageWidth);
+    renderer->SetMaxRasterImageHeight(m_maxRasterImageHeight);
 
     return renderer;
 }
@@ -1982,13 +1964,13 @@
     // 3. Map's watermark usage is not 0, which means watermark usage is WMS and / or Viewer.
     WatermarkInstanceCollection watermarkInstances;   //Watermark list to render
     WatermarkInstanceCollection tempWatermarkInstances;    //Used to reverse list
-    auto_ptr<WatermarkInstance> tempInstance;
+    std::unique_ptr<WatermarkInstance> tempInstance;
 
     // Get watermark instance in map
     Ptr<MgResourceIdentifier> mapId = map->GetMapDefinition();
     if (mapId.p)
     {
-        auto_ptr<MapDefinition> mdef(MgMapBase::GetMapDefinition(m_svcResource, mapId));
+        std::unique_ptr<MapDefinition> mdef(MgMapBase::GetMapDefinition(m_svcResource, mapId));
         WatermarkInstanceCollection* mapWatermarks = mdef->GetWatermarks();
         for (int i=mapWatermarks->GetCount()-1; i>=0; i--)
             tempWatermarkInstances.Adopt(mapWatermarks->OrphanAt(i));
@@ -2021,7 +2003,7 @@
 
     // Get watermark instance in layer
     const int layerCount = layers->GetCount();
-    auto_ptr<LayerDefinition> ldf;
+    std::unique_ptr<LayerDefinition> ldf;
     for (int i=0; i<layerCount; ++i)
     {
         Ptr<MgLayerBase> mapLayer(layers->GetItem(i));
@@ -2456,7 +2438,7 @@
 
     // initialize the renderer (set clipping to false so that we label
     // the unclipped geometry)
-    auto_ptr<SE_Renderer> dr(CreateRenderer(m_rendererName, drawWidth, drawHeight, bgColor, false, true, tileExtentOffset));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(drawWidth, drawHeight, bgColor, false, true, tileExtentOffset));
 
     // create a temporary collection containing all the layers for the base group
     Ptr<MgLayerCollection> layers = map->GetLayers();
@@ -2492,7 +2474,6 @@
 
 MgByteReader* MgServerRenderingService::RenderTileFromMetaTile(MgMap* map,
     MgMetatile* metaTile,
-    CREFSTRING rendererName,
     INT32 subTileX,
     INT32 subTileY)
 {
@@ -2545,9 +2526,9 @@
     StylizationUtil::ParseColor(map->GetBackgroundColor(), bgColor);
     bgColor.alpha() = 0;
     // Must create renderer under the scaled width/height and not original
-    auto_ptr<SE_Renderer> dr(CreateRenderer(rendererName, scaledTileWidth, scaledTileHeight, bgColor, true));
+    std::unique_ptr<AGGRenderer> dr(CreateRenderer(scaledTileWidth, scaledTileHeight, bgColor, true));
     RS_ColorVector tileColorPalette;
-    if (rendererName == L"AGG" && HasColorMap(origTileFormat))
+    if (HasColorMap(origTileFormat))
     {
         MgMappingUtil::ParseColorStrings(&tileColorPalette, map);
     }
@@ -2562,8 +2543,8 @@
     unsigned int *framebuf = (unsigned int*)byteBuffer->Bytes();
 
     // allocate subtile buffer to copy new framebuf with changed dimensions
-    // place buffer in allocated MgByte auto_ptr object for destruction at end of scope
-    auto_ptr<MgByte> subTileBytes(new MgByte((unsigned char*)new unsigned int[scaledTileWidth * scaledTileHeight],
+    // place buffer in allocated MgByte std::unique_ptr object for destruction at end of scope
+    std::unique_ptr<MgByte> subTileBytes(new MgByte((unsigned char*)new unsigned int[scaledTileWidth * scaledTileHeight],
         scaledTileWidth * scaledTileHeight * sizeof(int), MgByte::New));
     // get the pointer to the internal target buffer
     unsigned int* subTileBuf = (unsigned int*)subTileBytes->Bytes();
@@ -2577,7 +2558,7 @@
                     * scaledTileWidth * metaTileFactor);  // use width of metaTile here
         }
     // then call the image renderer to convert the framebuffer bitmap into the desired image format
-    ret = CreateImageFromRenderer(map, dr.get(), origTileWidth, origTileHeight, origTileFormat, rendererName, NULL, subTileBuf);
+    ret = CreateImageFromRenderer(map, dr.get(), origTileWidth, origTileHeight, origTileFormat, NULL, subTileBuf);
 
     MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderTileFromMetaTile")
 
@@ -2590,11 +2571,10 @@
 }
 
 MgByteReader* MgServerRenderingService::CreateImageFromRenderer(MgMap* map,
-    Renderer* dr,
+    AGGRenderer* dr,
     INT32 saveWidth,
     INT32 saveHeight,
     CREFSTRING format,
-    CREFSTRING rendererName,
     ProfileRenderMapResult* pPRMResult,
     unsigned int* frameBuffer)
 {
@@ -2627,43 +2607,38 @@
     */
 
     // get a byte representation of the image
-    auto_ptr<RS_ByteData> data;
+    std::unique_ptr<RS_ByteData> data;
     Ptr<MgByteSource> bs;
 
     try
     {
         // call the image renderer to create the image
-        if (wcscmp(rendererName.c_str(), L"AGG") == 0)
+        if (format == MgImageFormats::Meta)  // we dont use the colorPalette here for meta tiling
+        {                       // as this call only returns the framebuffer
+            data.reset(dr->Save(format, saveWidth, saveHeight, NULL, NULL));
+            // copy the framebuffer into the reader, RenderTileFromMetatile is taking it from there
+        }
+        else
         {
-            if (format == MgImageFormats::Meta)  // we dont use the colorPalette here for meta tiling
-            {                       // as this call only returns the framebuffer
-                data.reset(((AGGRenderer*)dr)->Save(format, saveWidth, saveHeight, NULL, NULL));
-                // copy the framebuffer into the reader, RenderTileFromMetatile is taking it from there
+            //-------------------------------------------------------
+            /// RFC60 code to correct colormaps by UV
+            //-------------------------------------------------------
+            // We examine the expressions collected from xml definitions of all layers.
+            // The map object has a list from all color entries found in the most recent
+            // layer stylization.
+            // * TODO - currently they are interpreted as ffffffff 32-bit RGBA string values
+            // * adding expresssions and other interpretations should be done in ParseColorStrings
+            // * the color Palette for the renderer is a vector<RS_Color>
+            if (HasColorMap(format))
+            {
+                RS_ColorVector tileColorPalette;
+                MgMappingUtil::ParseColorStrings(&tileColorPalette, map);
+                //              printf("<<<<<<<<<<<<<<<<<<<<< MgServerRenderingService::ColorPalette->size(): %d\n", tileColorPalette.size());
+                data.reset(dr->Save(format, saveWidth, saveHeight, &tileColorPalette, frameBuffer));
             }
             else
-            {
-                //-------------------------------------------------------
-                /// RFC60 code to correct colormaps by UV
-                //-------------------------------------------------------
-                // We examine the expressions collected from xml definitions of all layers.
-                // The map object has a list from all color entries found in the most recent
-                // layer stylization.
-                // * TODO - currently they are interpreted as ffffffff 32-bit RGBA string values
-                // * adding expresssions and other interpretations should be done in ParseColorStrings
-                // * the color Palette for the renderer is a vector<RS_Color>
-                if (HasColorMap(format))
-                {
-                    RS_ColorVector tileColorPalette;
-                    MgMappingUtil::ParseColorStrings(&tileColorPalette, map);
-                    //              printf("<<<<<<<<<<<<<<<<<<<<< MgServerRenderingService::ColorPalette->size(): %d\n", tileColorPalette.size());
-                    data.reset(((AGGRenderer*)dr)->Save(format, saveWidth, saveHeight, &tileColorPalette, frameBuffer));
-                }
-                else
-                    data.reset(((AGGRenderer*)dr)->Save(format, saveWidth, saveHeight, NULL, frameBuffer));
-            }
+                data.reset(dr->Save(format, saveWidth, saveHeight, NULL, frameBuffer));
         }
-        else
-            data.reset(((GDRenderer*)dr)->Save(format, saveWidth, saveHeight));
     }
     catch (exception e)
     {
@@ -2697,7 +2672,7 @@
         pPRMResult->SetCreateImageTime(createImageTime);
 
         pPRMResult->SetImageFormat(format);
-        pPRMResult->SetRendererType(rendererName);
+        pPRMResult->SetRendererType(L"AGG"); //NOXLATE
     }
 
     return bs->GetReader();

Modified: trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.h
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -22,7 +22,7 @@
 
 struct RS_Bounds;
 class RS_Color;
-class SE_Renderer;
+class AGGRenderer;
 class Renderer;
 class FeatureInfoRenderer;
 class MgFeatureInformation;
@@ -286,17 +286,16 @@
                                           double tileExtentOffset,
                                           INT32 metaTilingFactor);
 
-    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, CREFSTRING rendererName, INT32 subTileX, INT32 subTileY);
+    virtual MgByteReader* RenderTileFromMetaTile(MgMap* map, MgMetatile* metaTile, INT32 subTileX, INT32 subTileY);
 
 private:
     static bool HasColorMap(CREFSTRING format);
 
     static MgByteReader* CreateImageFromRenderer(MgMap* map,
-                                                 Renderer* dr,
+                                                 AGGRenderer* dr,
                                                  INT32 saveWidth,
                                                  INT32 saveHeight,
                                                  CREFSTRING format,
-                                                 CREFSTRING rendererName,
                                                  ProfileRenderMapResult* pPRMResult,
                                                  unsigned int* frameBuffer = NULL);
 
@@ -322,7 +321,7 @@
     MgByteReader* RenderMapInternal(MgMap* map,
                                     MgSelection* selection,
                                     MgReadOnlyLayerCollection* roLayers,
-                                    SE_Renderer* dr,
+                                    AGGRenderer* dr,
                                     INT32 drawWidth,
                                     INT32 drawHeight,
                                     INT32 saveWidth,
@@ -339,7 +338,7 @@
     MgByteReader* RenderMapInternal(MgMap* map,
                                     MgSelection* selection,
                                     MgReadOnlyLayerCollection* roLayers,
-                                    SE_Renderer* dr,
+                                    AGGRenderer* dr,
                                     INT32 drawWidth,
                                     INT32 drawHeight,
                                     INT32 saveWidth,
@@ -360,8 +359,7 @@
                          INT32 layerAttributeFilter,
                          FeatureInfoRenderer* selRenderer);
 
-    virtual SE_Renderer* CreateRenderer(CREFSTRING rendererName,
-                                        INT32 width,
+    virtual AGGRenderer* CreateRenderer(INT32 width,
                                         INT32 height,
                                         RS_Color& bgColor,
                                         bool requiresClipping,
@@ -405,9 +403,6 @@
     Ptr<MgDrawingService> m_svcDrawing;
     Ptr<MgCoordinateSystemFactory> m_pCSFactory;
 
-    // this will eventually be removed
-    STRING m_rendererName;
-
     INT32 m_rasterGridSize;
     INT32 m_minRasterGridSize;
     double m_rasterGridSizeOverrideRatio;

Modified: trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -26,12 +26,6 @@
 MgServerTileService::MgServerTileService() : MgTileService()
 {
     MgTileCacheDefault::Initialize();
-
-    MgConfiguration* pConf = MgConfiguration::GetInstance();
-    pConf->GetStringValue(MgConfigProperties::GeneralPropertiesSection,
-        MgConfigProperties::GeneralPropertyRenderer,
-        m_rendererName,
-        MgConfigProperties::DefaultGeneralPropertyRenderer);
 }
 
 MgServerTileService::~MgServerTileService()
@@ -657,7 +651,7 @@
             path = MgTileParameters::tileCachePath;
         }
 
-        cache = new MgTileCacheDefaultProvider(tileSetId, path, width, height, format, bRenderOnly, tileExtentOffset, m_rendererName, metaTileFactor, metaTileLockMethod);
+        cache = new MgTileCacheDefaultProvider(tileSetId, path, width, height, format, bRenderOnly, tileExtentOffset, metaTileFactor, metaTileLockMethod);
     }
     else if (provider == MG_TILE_PROVIDER_XYZ)
     {
@@ -707,7 +701,7 @@
             path = MgTileParameters::tileCachePath;
         }
 
-        cache = new MgTileCacheXYZProvider(tileSetId, path, format, bRenderOnly, tileExtentOffset, m_rendererName, metaTileFactor, metaTileLockMethod);
+        cache = new MgTileCacheXYZProvider(tileSetId, path, format, bRenderOnly, tileExtentOffset, metaTileFactor, metaTileLockMethod);
     }
     else 
     {

Modified: trunk/MgDev/Server/src/Services/Tile/ServerTileService.h
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/ServerTileService.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/ServerTileService.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -78,8 +78,6 @@
 private:
     MgTileCache* GetTileCache(MgResourceIdentifier* resource);
     MgTileCache* GetTileCache(MgResourceIdentifier* tileSetId, MdfModel::TileSetDefinition* tileset);
-
-    STRING m_rendererName;
 };
 
 #endif

Modified: trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -28,7 +28,6 @@
     CREFSTRING format,
     bool bRenderOnly,
     double tileExtentOffset,
-    CREFSTRING rendererName,
     INT32 metaTileFactor,
     INT32 metaTileLockMethod)
 {
@@ -39,7 +38,6 @@
     m_format = format;
     m_renderOnly = bRenderOnly;
     m_tileExtentOffset = tileExtentOffset;
-    m_rendererName = rendererName;
     m_metaTileFactor = metaTileFactor;
     m_metaTileLockMethod = metaTileLockMethod;
 }
@@ -127,9 +125,6 @@
     INT32 tileRow,
     INT32 scaleIndex)
 {
-    // Must have a renderer name set
-    _ASSERT(!m_rendererName.empty());
-
     Ptr<MgByteReader> returnedSubtile;
     FILE* lockFile = NULL;
     STRING tilePathname, lockPathname;
@@ -340,7 +335,7 @@
             for (int x = 0; x < maxX; x++)    // columns
             {
                 // Collect the subtile from the metatile
-                Ptr<MgByteReader> img = svcRendering->RenderTileFromMetaTile(map, metaTile, m_rendererName, x, y);
+                Ptr<MgByteReader> img = svcRendering->RenderTileFromMetaTile(map, metaTile, x, y);
 #ifdef _DEBUG
                 INT32 tileLen = img->GetLength();
 #endif          

Modified: trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.h
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/TileCacheDefaultProvider.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -29,7 +29,6 @@
                                CREFSTRING format,
                                bool bRenderOnly,
                                double tileExtentOffset,
-                               CREFSTRING rendererName,
                                INT32 metaTileFactor,
                                INT32 metaTileLockMethod);
     virtual ~MgTileCacheDefaultProvider();
@@ -75,7 +74,6 @@
     STRING m_format;
     bool m_renderOnly;
     double m_tileExtentOffset;
-    STRING m_rendererName;
     INT32 m_metaTileFactor;
     INT32 m_metaTileLockMethod;
 };

Modified: trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -25,7 +25,6 @@
                                                CREFSTRING format,
                                                bool bRenderOnly,
                                                double tileExtentOffset,
-                                               CREFSTRING rendererName,
                                                INT32 metaTileFactor,
                                                INT32 metaTileLockMethod)
 {
@@ -34,7 +33,6 @@
     m_format = format;
     m_renderOnly = bRenderOnly;
     m_tileExtentOffset = tileExtentOffset;
-    m_rendererName = rendererName;
     m_metaTileFactor = metaTileFactor;
     m_metaTileLockMethod = metaTileLockMethod;
 }
@@ -214,9 +212,6 @@
     INT32 tileRow,
     INT32 scaleIndex)
 {
-    // Must have a renderer name set
-    _ASSERT(!m_rendererName.empty());
-
     Ptr<MgByteReader> returnedSubtile;
     FILE* lockFile = NULL;
     STRING tilePathname, lockPathname;
@@ -422,7 +417,7 @@
             for (int x = 0; x < maxX; x++)    // columns
             {
                 // Collect the subtile from the metatile (we flip x/y for XYZ)
-                Ptr<MgByteReader> img = svcRendering->RenderTileFromMetaTile(map, metaTile, m_rendererName, x, y);
+                Ptr<MgByteReader> img = svcRendering->RenderTileFromMetaTile(map, metaTile, x, y);
 #ifdef _DEBUG
                 INT32 tileLen = img->GetLength();
 #endif          

Modified: trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.h
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.h	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/Services/Tile/TileCacheXYZProvider.h	2019-06-22 08:42:36 UTC (rev 9559)
@@ -27,7 +27,6 @@
                            CREFSTRING format,
                            bool bRenderOnly,
                            double tileExtentOffset,
-                           CREFSTRING rendererName,
                            INT32 metaTileFactor,
                            INT32 metaTileLockMethod);
     virtual ~MgTileCacheXYZProvider();
@@ -79,8 +78,6 @@
     double m_tileExtentOffset;
     INT32 m_metaTileFactor;
     INT32 m_metaTileLockMethod;
-
-    STRING m_rendererName;
 };
 
 #endif
\ No newline at end of file

Modified: trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/UnitTesting/TestRenderingService.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1740,11 +1740,10 @@
         //metaTile->ToFile(L"../UnitTestFiles/RenderTile_Metatile at 4_6.png");
         //CPPUNIT_ASSERT(metaTile->IsRewindable());
         //metaTile->Rewind();
-        STRING rendererName = L"AGG";
-        Ptr<MgByteReader> tile4_6 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 0, 0);
-        Ptr<MgByteReader> tile4_7 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 0, 1);
-        Ptr<MgByteReader> tile5_6 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 1, 0);
-        Ptr<MgByteReader> tile5_7 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 1, 1);
+        Ptr<MgByteReader> tile4_6 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 0);
+        Ptr<MgByteReader> tile4_7 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 1);
+        Ptr<MgByteReader> tile5_6 = renderSvc->RenderTileFromMetaTile(map, metaTile, 1, 0);
+        Ptr<MgByteReader> tile5_7 = renderSvc->RenderTileFromMetaTile(map, metaTile, 1, 1);
 
 
         tile4_6->ToFile(GetPath(L"../UnitTestFiles/RenderTile_4_6_Metatiled", imageFormat, extension));
@@ -1785,11 +1784,10 @@
         //metaTile->ToFile(L"../UnitTestFiles/RenderTileXYZ_Metatile at 16798_23891_16.png");
         //CPPUNIT_ASSERT(metaTile->IsRewindable());
         //metaTile->Rewind();
-        STRING rendererName = L"AGG";
-        Ptr<MgByteReader> tile_16798_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 0, 0);
-        Ptr<MgByteReader> tile_16799_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 1, 0);
-        Ptr<MgByteReader> tile_16798_23892 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 0, 1);
-        Ptr<MgByteReader> tile_16799_23892 = renderSvc->RenderTileFromMetaTile(map, metaTile, rendererName, 1, 1);
+        Ptr<MgByteReader> tile_16798_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 0);
+        Ptr<MgByteReader> tile_16799_23891 = renderSvc->RenderTileFromMetaTile(map, metaTile, 1, 0);
+        Ptr<MgByteReader> tile_16798_23892 = renderSvc->RenderTileFromMetaTile(map, metaTile, 0, 1);
+        Ptr<MgByteReader> tile_16799_23892 = renderSvc->RenderTileFromMetaTile(map, metaTile, 1, 1);
 
         tile_16798_23891->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_16798_23891_16_Metatiled", imageFormat, extension));
         tile_16799_23891->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_16799_23891_16_Metatiled", imageFormat, extension));

Modified: trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2019-06-19 16:14:46 UTC (rev 9558)
+++ trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2019-06-22 08:42:36 UTC (rev 9559)
@@ -1789,7 +1789,7 @@
         {
             for (INT32 y = 0; y < metaTile->GetMetaTilingFactor(); y++)
             {
-                Ptr<MgByteReader> img = renderSvc->RenderTileFromMetaTile(map, metaTile, L"AGG", x, y);
+                Ptr<MgByteReader> img = renderSvc->RenderTileFromMetaTile(map, metaTile, x, y);
                 INT64 tileLen = img->GetLength();
                 STRING fileName = L"../UnitTestFiles/GetMetatileSingle_Baseline/";
                 STRING s;
@@ -1868,7 +1868,7 @@
         {
             for (INT32 y1 = 0; y1 < mtFactor; y1++)
             {
-                Ptr<MgByteReader> img = renderSvc->RenderTileFromMetaTile(map, metaTile, L"AGG", x1, y1);
+                Ptr<MgByteReader> img = renderSvc->RenderTileFromMetaTile(map, metaTile, x1, y1);
                 INT64 tileLen = img->GetLength();
                 STRING fileName = L"../UnitTestFiles/GetMetatileSingleXYZ_Baseline/";
                 STRING s;



More information about the mapguide-commits mailing list