[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/ksvg2/misc
From: Rob Buis <rwlbuis () xs4all ! nl>
Date: 2005-09-06 20:35:09
Message-ID: 1126038909.952456.25574.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 457865 by buis:
Patch by tobli, simply do not build pservers when not needed, should fix memleaks \
too.
M +10 -2 KCanvasRenderingStyle.cpp
--- trunk/kdenonbeta/ksvg2/misc/KCanvasRenderingStyle.cpp #457864:457865
@@ -66,6 +66,10 @@
return;
SVGPaintImpl *fill = m_style->fillPaint();
+
+ if (fill && fill->paintType() == SVG_PAINTTYPE_NONE)
+ return;
+
if(!fill) // initial value (black)
{
KRenderingPaintServer *fillPaintServer = \
m_canvas->renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID)); @@ -84,7 \
+88,7 @@
fillPainter()->setPaintServer(fillPaintServer);
}
- else if(fill->paintType() != SVG_PAINTTYPE_NONE)
+ else
{
KRenderingPaintServer *fillPaintServer = \
m_canvas->renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID));
KRenderingPaintServerSolid *fillPaintServerSolid = \
static_cast<KRenderingPaintServerSolid *>(fillPaintServer); @@ -107,6 +111,10 @@
return;
SVGPaintImpl *stroke = m_style->strokePaint();
+
+ if (!stroke || stroke->paintType() == SVG_PAINTTYPE_NONE)
+ return;
+
if(stroke && stroke->paintType() == SVG_PAINTTYPE_URI)
{
KDOM::DOMString id(stroke->uri());
@@ -117,7 +125,7 @@
strokePainter()->setPaintServer(strokePaintServer);
}
- else if(stroke && stroke->paintType() != SVG_PAINTTYPE_NONE)
+ else
{
KRenderingPaintServer *strokePaintServer = \
m_canvas->renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID));
KRenderingPaintServerSolid *strokePaintServerSolid = \
static_cast<KRenderingPaintServerSolid *>(strokePaintServer);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic