[mapguide-commits] r1261 - trunk/MgDev/Common/Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Mar 16 16:07:49 EDT 2007


Author: traianstanev
Date: 2007-03-16 16:07:48 -0400 (Fri, 16 Mar 2007)
New Revision: 1261

Modified:
   trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h
   trunk/MgDev/Common/Stylization/Stylization.h
   trunk/MgDev/Common/Stylization/Stylization.vcproj
   trunk/MgDev/Common/Stylization/StylizationEngine.cpp
   trunk/MgDev/Common/Stylization/StylizationEngine.h
Log:
Code cleanup. Made proxy objects self-evaluating, so that the Style Engine class itself doesn't have to think about them too much. This was done via addition of virtual functions. Some stuff still needs to be cleaned up, in particular code related to the computation of the sizebox.

Modified: trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h
===================================================================
--- trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h	2007-03-16 18:08:50 UTC (rev 1260)
+++ trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h	2007-03-16 20:07:48 UTC (rev 1261)
@@ -19,8 +19,11 @@
 #define SE_SYMBOLDEFPROXIES_H
 
 #include "SE_LineBuffer.h"
+#include "SE_ExpressionBase.h"
 
+using namespace MDFMODEL_NAMESPACE;
 
+
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
 //        SE_Primitives
@@ -44,12 +47,35 @@
     SE_AreaStyleType
 };
 
+class RS_FilterExecutor;
+class RS_FontEngine;
+class SE_SymbolManager;
 
+class SE_EvalContext
+{
+public:
+    RS_FontEngine* fonte;
+    SE_Matrix* xform;
+    RS_FilterExecutor* exec;
+    SE_SymbolManager* resources;
+    double mm2pxw;
+    double mm2pxs;
+    double mm2px;
+    SE_LineBufferPool* pool;
+    bool useBox;
+    LineBuffer* geometry; //only used for SE_PointStyles -- get rid of it if possible
+};
+
+struct SE_RenderPrimitive;
+
 struct SE_Primitive
 {
     SE_PrimitiveType type;
     GraphicElement::ResizeControl resize;
     bool cacheable;
+
+    virtual ~SE_Primitive() { }
+    virtual SE_RenderPrimitive* evaluate(SE_EvalContext*) = 0;
 };
 
 typedef std::vector<SE_Primitive*> SE_PrimitiveList;
@@ -64,6 +90,7 @@
 
     SE_INLINE SE_Polyline() : weight(0.0) { type = SE_PolylinePrimitive; }
     ~SE_Polyline() { geometry->Free(); }
+    virtual SE_RenderPrimitive* evaluate(SE_EvalContext*);
 };
 
 
@@ -72,7 +99,8 @@
     SE_Color fill;
 
     SE_INLINE SE_Polygon() { type = SE_PolygonPrimitive; weight = 0.0; }
-    ~SE_Polygon() { geometry->Free(); }
+    virtual ~SE_Polygon() { }
+    virtual SE_RenderPrimitive* evaluate(SE_EvalContext*);
 };
 
 
@@ -95,6 +123,7 @@
     SE_Color ghostColor;
 
     SE_INLINE SE_Text() { type = SE_TextPrimitive;  }
+    virtual SE_RenderPrimitive* evaluate(SE_EvalContext*);
 };
 
 
@@ -108,6 +137,7 @@
     SE_Double angle;
 
     SE_INLINE SE_Raster() { type = SE_RasterPrimitive; }
+    virtual SE_RenderPrimitive* evaluate(SE_EvalContext*);
 };
 
 
@@ -117,6 +147,7 @@
 //
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+struct SE_RenderStyle;
 
 struct SE_Style
 {
@@ -131,28 +162,30 @@
 
     SE_INLINE SE_Style(SE_StyleType stype) : type(stype) { }
 
-    ~SE_Style()
+    virtual ~SE_Style()
     {
         for (SE_PrimitiveList::iterator iter = symbol.begin(); iter != symbol.end(); iter++)
             delete *iter;
     }
+
+    virtual SE_RenderStyle* evaluate(SE_EvalContext*) = 0;
+    void evaluate_common(SE_EvalContext* , SE_RenderStyle* );
 };
 
 
 struct SE_PointStyle : public SE_Style
 {
-    SE_INLINE SE_PointStyle() : SE_Style(SE_PointStyleType) { }
-
     SE_String angleControl;
     SE_Double angle;
     SE_Double originOffset[2];
+
+    SE_INLINE SE_PointStyle() : SE_Style(SE_PointStyleType) { }
+    virtual SE_RenderStyle* evaluate(SE_EvalContext*);
 };
 
 
 struct SE_LineStyle : public SE_Style
 {
-    SE_INLINE SE_LineStyle() : SE_Style(SE_LineStyleType) { }
-
     SE_String angleControl;
     SE_String unitsControl;
     SE_String vertexControl;
@@ -163,13 +196,14 @@
     SE_Double endOffset;
     SE_Double repeat;
     SE_Double vertexAngleLimit;
+
+    SE_INLINE SE_LineStyle() : SE_Style(SE_LineStyleType) { }
+    virtual SE_RenderStyle* evaluate(SE_EvalContext*);
 };
 
 
 struct SE_AreaStyle : public SE_Style
-{
-    SE_INLINE SE_AreaStyle() : SE_Style(SE_AreaStyleType) { }
-
+{  
     SE_String angleControl;
     SE_String originControl;
     SE_String clippingControl;
@@ -178,6 +212,9 @@
     SE_Double origin[2];
     SE_Double repeat[2];
     SE_Double bufferWidth;
+
+    SE_INLINE SE_AreaStyle() : SE_Style(SE_AreaStyleType) { }
+    virtual SE_RenderStyle* evaluate(SE_EvalContext*);
 };
 
 

Modified: trunk/MgDev/Common/Stylization/Stylization.h
===================================================================
--- trunk/MgDev/Common/Stylization/Stylization.h	2007-03-16 18:08:50 UTC (rev 1260)
+++ trunk/MgDev/Common/Stylization/Stylization.h	2007-03-16 20:07:48 UTC (rev 1261)
@@ -80,6 +80,7 @@
 #include "Path.h"
 #include "Text.h"
 #include "Image.h"
+#include "GraphicElement.h"
 
 //FDO headers
 #include "Fdo.h"

Modified: trunk/MgDev/Common/Stylization/Stylization.vcproj
===================================================================
--- trunk/MgDev/Common/Stylization/Stylization.vcproj	2007-03-16 18:08:50 UTC (rev 1260)
+++ trunk/MgDev/Common/Stylization/Stylization.vcproj	2007-03-16 20:07:48 UTC (rev 1261)
@@ -717,6 +717,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\SE_SymbolDefProxies.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\SE_SymbolDefProxies.h"
 				>
 			</File>

Modified: trunk/MgDev/Common/Stylization/StylizationEngine.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2007-03-16 18:08:50 UTC (rev 1260)
+++ trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2007-03-16 20:07:48 UTC (rev 1261)
@@ -268,7 +268,17 @@
                             sym->absOffset[0].evaluate(executor), 
                             sym->absOffset[1].evaluate(executor) );
         xform.scale(mm2px, mm2px);
-        
+
+        //initialize the style evaluation context
+        SE_EvalContext cxt;
+        cxt.exec = executor;
+        cxt.mm2px = mm2px;
+        cxt.mm2pxs = m_serenderer->GetPixelsPerMillimeterScreen();
+        cxt.mm2pxw = m_serenderer->GetPixelsPerMillimeterWorld();
+        cxt.pool = m_pool;
+        cxt.fonte = m_serenderer->GetFontEngine();
+        cxt.geometry = geometry; //only used by point styles, I really want to get rid of this
+
         for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); siter++)
         {
             SE_Style* style = *siter;
@@ -300,31 +310,18 @@
                                         //when we evalute the style, in the case of point style set on a
                                         //non-point geometry
 
-            //allocate a render style into which we will evaluate all styles (and the expressions inside them)
-            SE_RenderStyle* rstyle = NULL;
-            switch(style->type)
-            {
-                case SE_PointStyleType:
-                    //this call may modify xform to apply the necessary rotation 
-                    rstyle = EvaluatePointStyle(executor, geometry, tmpxform, (SE_PointStyle*)style, mm2px);
-                    break;
-                case SE_LineStyleType:
-                    rstyle = EvaluateLineStyle(executor, tmpxform, (SE_LineStyle*)style);
-                    break;
-                case SE_AreaStyleType:
-                    rstyle = EvaluateAreaStyle(executor, tmpxform, (SE_AreaStyle*)style);
-                    break;
-            }
-            
-            //evaluate values that are common to all styles           
-            rstyle->renderPass = styleRenderPass;
+            cxt.xform = &tmpxform; //EXTREMELY IMPORTANT: evaluating of point styles will modify this
+                                   //transform without you knowing -- beware!
+
+            //evaluate the style (all expressions inside it) and convert to a constant screen space
+            //render style
+            SE_RenderStyle* rstyle = style->evaluate(&cxt);
+
+            //why are these in the symbolization?
             rstyle->addToExclusionRegions = sym->addToExclusionRegions.evaluate(executor);
             rstyle->checkExclusionRegions = sym->checkExclusionRegions.evaluate(executor);
             rstyle->drawLast = sym->drawLast.evaluate(executor);
 
-            //evaluate the graphic elements
-            EvaluateSymbols(executor, tmpxform, style, rstyle, mm2px); 
-
             if (!sym->positioningAlgorithm.empty() && sym->positioningAlgorithm != L"Default")
             {
                 LayoutCustomLabel(sym->positioningAlgorithm, geometry, tmpxform, style, rstyle, mm2px);
@@ -352,382 +349,6 @@
     }
 }
 
-
-SE_RenderPointStyle* StylizationEngine::EvaluatePointStyle(RS_FilterExecutor* executor,
-                                                           LineBuffer* geometry,
-                                                           SE_Matrix& xform,
-                                                           SE_PointStyle* style,
-                                                           double mm2px)
-{
-    SE_RenderPointStyle* render = new SE_RenderPointStyle();
-
-    LineBuffer::GeomOperationType type;
-    switch(geometry->geom_type())
-    {
-    case FdoGeometryType_LineString:
-    case FdoGeometryType_MultiLineString:
-        type = LineBuffer::ctLine;
-        break;
-    case FdoGeometryType_Polygon:
-    case FdoGeometryType_MultiPolygon:
-        type = LineBuffer::ctArea;
-        break;
-    case FdoGeometryType_Point:
-    case FdoGeometryType_MultiPoint:
-        type = LineBuffer::ctPoint;
-        break;
-    default:
-        type = LineBuffer::ctNone;
-        break;
-    }
-
-    double angle = 0.0;
-    const wchar_t* angleControl = style->angleControl.evaluate(executor);
-    if (wcscmp(L"FromGeometry", angleControl) == 0)
-    {
-        if (type == LineBuffer::ctLine || type == LineBuffer::ctArea)
-        {
-            double x0, y0;
-            double slope_rad = 0.0;
-            geometry->Centroid(LineBuffer::ctLine, &x0, &y0, &slope_rad);
-
-            angle = slope_rad; 
-
-            //TODO: do we really need to invert this in case of y-down?
-            if (xform.y1 < 0)
-                angle = -angle;
-        }
-    }
-    else
-        angle = style->angle.evaluate(executor) * M_PI180;
-
-    double originOffsetX = style->originOffset[0].evaluate(executor)*mm2px;
-    double originOffsetY = style->originOffset[1].evaluate(executor)*mm2px;
-
-    SE_Matrix sxform;
-    sxform.translate(originOffsetX, originOffsetY);
-    sxform.rotate(angle);
-    sxform.premultiply(xform);
-    xform = sxform;
-
-    return render;
-}
-
-
-SE_RenderLineStyle* StylizationEngine::EvaluateLineStyle(RS_FilterExecutor* executor, SE_Matrix& xform, SE_LineStyle* style)
-{
-    SE_RenderLineStyle* render = new SE_RenderLineStyle();
-
-    render->angleControl = style->angleControl.evaluate(executor);
-    render->unitsControl = style->unitsControl.evaluate(executor);
-    render->vertexControl = style->vertexControl.evaluate(executor);
-//  render->join = style->join.evaluate(m_exec);
-
-    render->angle = style->angle.evaluate(executor) * M_PI180;
-    render->startOffset = style->startOffset.evaluate(executor)*xform.x0; // x0 is x scale * mm2px
-    render->endOffset = style->endOffset.evaluate(executor)*xform.x0;
-    render->repeat = style->repeat.evaluate(executor)*xform.x0;
-    render->vertexAngleLimit = style->vertexAngleLimit.evaluate(executor) * M_PI180;
-
-    return render;
-}
-
-
-SE_RenderAreaStyle* StylizationEngine::EvaluateAreaStyle(RS_FilterExecutor* executor, SE_Matrix& /*xform*/, SE_AreaStyle* style)
-{
-    SE_RenderAreaStyle* render = new SE_RenderAreaStyle();
-
-    render->angleControl = style->angleControl.evaluate(executor);
-    render->originControl = style->originControl.evaluate(executor);
-    render->clippingControl = style->clippingControl.evaluate(executor);
-
-    render->angle = style->angle.evaluate(executor) * M_PI180;
-    render->origin[0] = style->origin[0].evaluate(executor);
-    render->origin[1] = style->origin[1].evaluate(executor);
-    render->repeat[0] = style->repeat[0].evaluate(executor);
-    render->repeat[1] = style->repeat[1].evaluate(executor);
-    render->bufferWidth = style->bufferWidth.evaluate(executor);
-
-    return render;
-}
-
-
-void StylizationEngine::EvaluateSymbols(RS_FilterExecutor* executor, SE_Matrix& xform, SE_Style* style, SE_RenderStyle* renderStyle, double mm2px)
-{
-    double dx, dy, sx, sy;
-    double minx, maxx, miny, maxy;
-    double growx, growy;
-    if (style->useBox)
-    {
-        dx = style->resizePosition[0].evaluate(executor);
-        dy = style->resizePosition[1].evaluate(executor);
-        sx = style->resizeSize[0].evaluate(executor)/2.0;
-        sy = style->resizeSize[1].evaluate(executor)/2.0;
-
-        xform.transform(dx - sx, dy - sy, minx, miny);
-        xform.transform(dx + sx, dy + sy, maxx, maxy);
-        xform.transform(dx, dy);
-
-        growx = 0.0;
-        growy = 0.0;
-    }
-
-    double mm2pxs = m_serenderer->GetPixelsPerMillimeterScreen();
-    double mm2pxw = m_serenderer->GetPixelsPerMillimeterWorld();
-
-    for (SE_PrimitiveList::const_iterator src = style->symbol.begin(); src != style->symbol.end(); src++)
-    {
-        SE_Primitive* sym = *src;
-        SE_RenderPrimitive* rsym = NULL;
-
-        switch(sym->type)
-        {
-        case SE_PolygonPrimitive:
-            rsym = new SE_RenderPolygon();
-            ((SE_RenderPolygon*)rsym)->fill = ((SE_Polygon*)sym)->fill.evaluate(executor);
-
-        case SE_PolylinePrimitive:
-            {
-                if (!rsym) rsym = new SE_RenderPolyline();
-                SE_Polyline* p = (SE_Polyline*)sym;
-                SE_RenderPolyline* rp = (SE_RenderPolyline*)rsym;
-                double wx = p->weightScalable.evaluate(executor)? mm2pxw : mm2pxs;
-                rp->weight = p->weight.evaluate(executor) * wx;
-                rp->geometry = p->geometry->Clone();
-                rp->color = p->color.evaluate(executor);
-                /* Defer transformation */
-                if (sym->resize != GraphicElement::AdjustToResizeBox)
-                {
-                    rp->geometry->Transform(xform, rp->weight);
-                    rp->bounds = rp->geometry->xf_bounds()->Clone();
-                }
-                else
-                    rp->bounds = NULL;
-            }
-            break;
-
-        case SE_TextPrimitive:
-            {
-                rsym = new SE_RenderText();
-                SE_Text* t = (SE_Text*)sym;
-                SE_RenderText* rt = (SE_RenderText*)rsym;
-                rt->text = t->textExpr.evaluate(executor);
-                rt->position[0] = t->position[0].evaluate(executor);
-                rt->position[1] = t->position[1].evaluate(executor);
-                xform.transform(rt->position[0], rt->position[1]);
-
-                rt->tdef.rotation() = t->angle.evaluate(executor);;
-
-                int style = RS_FontStyle_Regular;
-                if (t->underlined.evaluate(executor)) style |= (int)RS_FontStyle_Underline;
-                if (t->italic.evaluate(executor)) style |= (int)RS_FontStyle_Italic;
-                if (t->bold.evaluate(executor)) style |= (int)RS_FontStyle_Bold;
-
-                rt->tdef.font().style() = (RS_FontStyle_Mask)style;
-                rt->tdef.font().name() = t->fontExpr.evaluate(executor);
-                rt->tdef.font().height() = t->size.evaluate(executor)*0.001*xform.y1/mm2px; //convert mm to meters which is what RS_TextDef expects
-                rt->tdef.linespace() = t->lineSpacing.evaluate(executor);
-
-                rt->tdef.color() = RS_Color::FromARGB(t->textColor.evaluate(executor));
-                rt->tdef.bgcolor() = RS_Color::FromARGB(t->ghostColor.evaluate(executor));
-
-                const wchar_t* hAlign = t->hAlignment.evaluate(executor);
-                if (hAlign)
-                {
-                    if (wcscmp(hAlign, L"Left") == 0)           
-                        rt->tdef.halign() = RS_HAlignment_Left;
-                    else if (wcscmp(hAlign, L"Center") == 0)    
-                        rt->tdef.halign() = RS_HAlignment_Center;
-                    else if (wcscmp(hAlign, L"Right") == 0)     
-                        rt->tdef.halign() = RS_HAlignment_Right;
-                }
-
-                const wchar_t* vAlign = t->vAlignment.evaluate(executor);
-                if (vAlign)
-                {
-                    if (wcscmp(vAlign, L"Bottom") == 0)         
-                        rt->tdef.valign() = RS_VAlignment_Descent;
-                    else if (wcscmp(vAlign, L"Baseline") == 0)  
-                        rt->tdef.valign() = RS_VAlignment_Base;
-                    else if (wcscmp(vAlign, L"Halfline") == 0)  
-                        rt->tdef.valign() = RS_VAlignment_Half;
-                    else if (wcscmp(vAlign, L"Capline") == 0)   
-                        rt->tdef.valign() = RS_VAlignment_Cap;
-                    else if (wcscmp(vAlign, L"Top") == 0)       
-                        rt->tdef.valign() = RS_VAlignment_Ascent;
-                }
-
-                RS_TextMetrics tm;
-                SE_Matrix txf;
-                m_serenderer->GetFontEngine()->GetTextMetrics(rt->text, rt->tdef, tm, false);
-                txf.rotate(rt->tdef.rotation() * M_PI180);
-                txf.translate(rt->position[0], rt->position[1]);
-
-                double* buffer = (double*)alloca(tm.line_pos.size()*sizeof(double)*8);
-                double* ptr = buffer;
-                for(size_t k = 0; k < tm.line_pos.size(); k++)
-                {
-                    const RS_F_Point* pts = tm.line_pos[k].ext;
-                    txf.transform(pts[0].x, pts[0].y, ptr[0], ptr[1]);
-                    txf.transform(pts[1].x, pts[1].y, ptr[2], ptr[3]);
-                    txf.transform(pts[2].x, pts[2].y, ptr[4], ptr[5]);
-                    txf.transform(pts[3].x, pts[3].y, ptr[6], ptr[7]);
-                    ptr += 8;
-                }
-
-                std::sort((std::pair<double,double>*)buffer, (std::pair<double,double>*)(ptr - 2), PointLess( ));
-                rt->bounds = AndrewHull<std::pair<double,double>*,SimplePOINT>
-                    ((std::pair<double,double>*)buffer, 
-                    ((std::pair<double,double>*)ptr) - 1, 
-                    (int)tm.line_pos.size()*4, m_pool);
-            }
-            break;
-
-        case SE_RasterPrimitive:
-            {
-                rsym = new SE_RenderRaster();
-                SE_Raster* r = (SE_Raster*)sym;
-                SE_RenderRaster* rr = (SE_RenderRaster*)rsym;
-
-                if (!r->pngPtr)
-                {
-                    rr->pngPtr = m_resources->GetImageData(r->pngPath.evaluate(executor), rr->pngSize);
-                }
-                else
-                {
-                    rr->pngPtr = r->pngPtr;
-                    rr->pngSize = r->pngSize;
-                }
-
-                rr->position[0] = r->position[0].evaluate(executor);
-                rr->position[1] = r->position[1].evaluate(executor);
-                xform.transform(rr->position[0], rr->position[1]);
-                rr->extent[0] = r->extent[0].evaluate(executor)*xform.x0;
-                rr->extent[1] = r->extent[1].evaluate(executor)*xform.y1;
-                rr->angle = r->angle.evaluate(executor) * M_PI180;
-
-                SE_Matrix rxf;
-                rxf.rotate(rr->angle);
-                rxf.translate(rr->position[0], rr->position[1]);
-
-                double w = 0.5 * rr->extent[0];
-                double h = 0.5 * rr->extent[1];
-
-                RS_F_Point pts[4];
-                rxf.transform( w,  h, pts[0].x, pts[0].y);
-                rxf.transform( w, -h, pts[1].x, pts[1].y);
-                rxf.transform(-w, -h, pts[2].x, pts[2].y);
-                rxf.transform(-w,  h, pts[3].x, pts[3].y);
-                
-                std::sort((std::pair<double,double>*)pts, (std::pair<double,double>*)(pts + 3), PointLess( ));
-                rr->bounds = AndrewHull<std::pair<double,double>*,SimplePOINT>
-                    ((std::pair<double,double>*)pts, 
-                    ((std::pair<double,double>*)(pts+3)) - 1, 
-                    4, m_pool);
-            }
-            break;
-
-        default:
-            break;
-        }
-
-        if (rsym)
-        {
-            rsym->resize = (sym->resize == GraphicElement::AdjustToResizeBox);
-
-            if (!rsym->resize)
-            {
-                if (renderStyle->bounds)
-                {
-                    SE_Bounds* bounds = renderStyle->bounds;
-                    renderStyle->bounds = bounds->Union(rsym->bounds);
-                    bounds->Free();
-                }
-                else
-                    renderStyle->bounds = rsym->bounds->Clone();
-            }
-
-            renderStyle->symbol.push_back(rsym);
-
-            if (style->useBox && sym->resize == GraphicElement::AddToResizeBox)
-                rsym->bounds->Contained(minx, miny, maxx, maxy, growx, growy);
-        }
-    }
-
-    if (style->useBox)
-    {
-        switch(style->resize)
-        {
-        case ResizeBox::GrowInX:
-            growy = 0.0;
-            break;
-
-        case ResizeBox::GrowInY:
-            growx = 0.0;
-            break;
-
-        case ResizeBox::GrowInXYMaintainAspect:
-            if (growy > growx)
-                growx = growy;
-            else if (growx > growy)
-                growy = growx;
-        }
-
-        SE_Matrix totalxf(xform);
-        SE_Matrix growxf;
-        growxf.translate(-dx, -dy);
-        growxf.scale(1.0 + growx, 1.0 + growy);
-        growxf.translate(dx, dy);
-        totalxf.premultiply(growxf);
-
-        for (SE_RenderPrimitiveList::iterator rs = renderStyle->symbol.begin(); rs != renderStyle->symbol.end(); rs++)
-        {
-            SE_RenderPrimitive* rsym = *rs;
-            if (rsym->resize)
-            {
-                switch(rsym->type)
-                {
-                case SE_PolygonPrimitive:
-                case SE_PolylinePrimitive:
-                    {
-                        SE_RenderPolyline* rp = (SE_RenderPolyline*)rsym;
-                        rp->geometry->Transform(totalxf, rp->weight);
-                        rp->bounds = rp->geometry->xf_bounds()->Clone();
-                        break;
-                    }
-                case SE_TextPrimitive:
-                    {
-                        SE_RenderText* rt = (SE_RenderText*)rsym;
-                        growxf.transform(rt->position[0], rt->position[1]);
-                        rt->tdef.font().height() *= growxf.y1;
-                        rt->bounds->Transform(growxf);
-                        break;
-                    }
-                case SE_RasterPrimitive:
-                    {
-                        SE_RenderRaster* rr = (SE_RenderRaster*)rsym;
-                        growxf.transform(rr->position[0], rr->position[1]);
-                        rr->extent[0] *= growxf.x0;
-                        rr->extent[1] *= growxf.y1;
-                        rr->bounds->Transform(growxf);
-                        break;
-                    }
-                }
-                
-                if (renderStyle->bounds)
-                {
-                    SE_Bounds* bounds = renderStyle->bounds;
-                    renderStyle->bounds = bounds->Union(rsym->bounds);
-                    bounds->Free();
-                }
-                else
-                    renderStyle->bounds = rsym->bounds->Clone();
-            }
-        }
-    }
-}
-
-
 void StylizationEngine::LayoutCustomLabel(const std::wstring& positioningAlgo, LineBuffer* geometry, SE_Matrix& xform, SE_Style* style, SE_RenderStyle* rstyle, double mm2px)
 {
     //here we decide which one to call based on the name of the positioning algorithm

Modified: trunk/MgDev/Common/Stylization/StylizationEngine.h
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationEngine.h	2007-03-16 18:08:50 UTC (rev 1260)
+++ trunk/MgDev/Common/Stylization/StylizationEngine.h	2007-03-16 20:07:48 UTC (rev 1261)
@@ -80,12 +80,8 @@
     void ClearCache();
 
 private:
-    SE_RenderPointStyle* EvaluatePointStyle(RS_FilterExecutor* executor, LineBuffer* geometry, SE_Matrix& xform, SE_PointStyle* style, double mm2px);
-    SE_RenderLineStyle* EvaluateLineStyle(RS_FilterExecutor* executor, SE_Matrix& xform, SE_LineStyle* style);
-    SE_RenderAreaStyle* EvaluateAreaStyle(RS_FilterExecutor* executor, SE_Matrix& xform, SE_AreaStyle* style);
 
     void LayoutCustomLabel(const std::wstring& positioningAlgo, LineBuffer* geometry, SE_Matrix& xform, SE_Style* style, SE_RenderStyle* rstyle, double mm2px);
-    void EvaluateSymbols(RS_FilterExecutor* executor, SE_Matrix& xform, SE_Style* style, SE_RenderStyle* renderStyle, double mm2px);
 
 private:
     SE_Renderer* m_serenderer;



More information about the mapguide-commits mailing list