[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/ksvg2/impl
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2005-07-08 20:52:33
Message-ID: 1120855953.107676.23871.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 432875 by buis:

Handle the svg from http://www.zvon.org/HowTo/Output/index.html.
Basically bbox mode and values like width=".5", so "pseudo percentages"
were not handled correctly. I fixed it with a hack, so we probably
need to improve SVGLengthImpl later.


 M  +8 -1      SVGPatternElementImpl.cc  


--- trunk/kdenonbeta/ksvg2/impl/SVGPatternElementImpl.cc #432874:432875
@@ -283,10 +283,17 @@
 	const SVGStyledElementImpl *savedContext = 0;
 	if(bbox)
 	{
+		if(width()->baseVal()->unitType() != SVG_LENGTHTYPE_PERCENTAGE)
+			width()->baseVal()->newValueSpecifiedUnits(SVG_LENGTHTYPE_PERCENTAGE, \
width()->baseVal()->value() * 100.); +		if(height()->baseVal()->unitType() != \
SVG_LENGTHTYPE_PERCENTAGE) \
+			height()->baseVal()->newValueSpecifiedUnits(SVG_LENGTHTYPE_PERCENTAGE, \
height()->baseVal()->value() * 100.);  if(activeElement)
 			savedContext = const_cast<SVGPatternElementImpl \
                *>(this)->pushAttributeContext(activeElement);
-	}	
+	}
 
+	w = width()->baseVal()->value();
+	h = height()->baseVal()->value();
+
 	delete m_tile;	
 	m_tile = new KCanvasImageBuffer(true); // RGBA buffer
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic