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

List:       koffice-devel
Subject:    Using svg gradients in Karbon
From:       Tim Beaulen <tbscope () gmail ! com>
Date:       2005-08-07 14:40:14
Message-ID: dd1e9b17050807074016dd107c () mail ! gmail ! com
[Download RAW message or body]

Hello,

After reading this bug report: http://bugs.kde.org/show_bug.cgi?id=108171
I started trying to get Karbon to read svg gradient files when it starts up.

This is the result:
http://img91.imageshack.us/my.php?image=snapshot36dm.png

The patch is attached.
The patch does not contain an extra header file with named svg color
constants though.
But the header is attached too.


I'm not completely sure it's the right way to do this. So feel free to
give comments.
I don't mind changing everything if necessary.


The svg import filter can be simplified now too.

One thing that needs to be done is making it possible for a user to
import and export gradients from within Karbon. And maybe even use
KHotNewStuff from the gradient dialog.

["svg_gradient.diff" (text/x-diff)]

Index: core/vgradient.cc
===================================================================
--- core/vgradient.cc	(revision 443816)
+++ core/vgradient.cc	(working copy)
@@ -23,6 +23,7 @@
 #include "vdocument.h"
 #include "vglobal.h"
 #include "vgradient.h"
+#include "svgnamedcolors.h"
 
 #include <koGenStyles.h>
 #include <koxmlwriter.h>
@@ -124,6 +125,13 @@
 	midPoint = kMax( 0.0f, midPoint );
 	midPoint = kMin( 1.0f, midPoint );
 
+	// Work around stops with the same position
+	VColorStop *v;
+	for(v = m_colorStops.first(); v; v = m_colorStops.next())
+	{
+		if(rampPoint == v->rampPoint)
+			rampPoint += 0.1f;
+	} 
 	m_colorStops.inSort( new VColorStop( rampPoint, midPoint, color ) );
 }
 
@@ -294,6 +302,240 @@
 }
 
 void
+VGradient::loadSvg( const QDomElement& element )
+{
+	m_colorStops.clear();
+	m_repeatMethod = VGradient::none;
+
+	/*QString href = e.attribute( "xlink:href" ).mid( 1 );
+	if( !href.isEmpty() )
+	{
+	}*/
+
+	bool bbox = element.attribute( "gradientUnits" ) != "userSpaceOnUse";
+
+	if( element.tagName() == "linearGradient" )
+	{
+		if( bbox )
+		{
+			QString s;
+
+			s = element.attribute( "x1", "0%" );
+			double xOrigin;
+			if( s.endsWith( "%" ) )
+				xOrigin = s.remove( '%' ).toDouble();
+			else
+				xOrigin = s.toDouble() * 100.0;
+
+			s = element.attribute( "y1", "0%" );
+			double yOrigin;
+			if( s.endsWith( "%" ) )
+				yOrigin = s.remove( '%' ).toDouble();
+			else
+				yOrigin = s.toDouble() * 100.0;
+
+			s = element.attribute( "x2", "100%" );
+			double xVector;
+			if( s.endsWith( "%" ) )
+				xVector = s.remove( '%' ).toDouble();
+			else
+				xVector = s.toDouble() * 100.0;
+
+			s = element.attribute( "y2", "0%" );
+			double yVector;
+			if( s.endsWith( "%" ) )
+				yVector = s.remove( '%' ).toDouble();
+			else
+				yVector = s.toDouble() * 100.0;
+
+			m_origin.setX( xOrigin );
+			m_origin.setY( yOrigin );
+			m_vector.setX( xVector );
+			m_vector.setY( yVector );
+		}
+		else
+		{
+			m_origin.setX( element.attribute( "x1" ).toDouble() );
+			m_origin.setY( element.attribute( "y1" ).toDouble() );
+			m_vector.setX( element.attribute( "x2" ).toDouble() );
+			m_vector.setY( element.attribute( "y2" ).toDouble() );
+		}
+	}
+	else
+	{
+		if( bbox )
+		{
+			QString s;
+
+			s = element.attribute( "cx", "50%" );
+			double xOrigin;
+			if( s.endsWith( "%" ) )
+				xOrigin = s.remove( '%' ).toDouble();
+			else
+				xOrigin = s.toDouble() * 100.0;
+
+			s = element.attribute( "cy", "50%" );
+			double yOrigin;
+			if( s.endsWith( "%" ) )
+				yOrigin = s.remove( '%' ).toDouble();
+			else
+				yOrigin = s.toDouble() * 100.0;
+
+			s = element.attribute( "cx", "50%" );
+			double xVector;
+			if( s.endsWith( "%" ) )
+				xVector = s.remove( '%' ).toDouble();
+			else
+				xVector = s.toDouble() * 100.0;
+
+			s = element.attribute( "r", "50%" );
+			if( s.endsWith( "%" ) )
+				xVector += s.remove( '%' ).toDouble();
+			else
+				xVector += s.toDouble() * 100.0;
+
+			s = element.attribute( "cy", "50%" );
+			double yVector;
+			if( s.endsWith( "%" ) )
+				yVector = s.remove( '%' ).toDouble();
+			else
+				yVector = s.toDouble() * 100.0;
+
+			s = element.attribute( "fx", "50%" );
+			double xFocal;
+			if( s.endsWith( "%" ) )
+				xFocal = s.remove( '%' ).toDouble();
+			else
+				xFocal = s.toDouble() * 100.0;
+
+			s = element.attribute( "fy", "50%" );
+			double yFocal;
+			if( s.endsWith( "%" ) )
+				yFocal = s.remove( '%' ).toDouble();
+			else
+				yFocal = s.toDouble() * 100.0;
+
+			m_origin.setX( xOrigin );
+			m_origin.setY( yOrigin );
+			m_vector.setX( xVector );
+			m_vector.setY( yVector );
+			m_focalPoint.setX( xFocal );
+			m_focalPoint.setY( yFocal );
+		}
+		else
+		{
+			m_origin.setX( element.attribute( "cx" ).toDouble() );
+			m_origin.setY( element.attribute( "cy" ).toDouble() );
+			m_vector.setX( element.attribute( "cx" ).toDouble() + element.attribute( "r" ).toDouble() );
+			m_vector.setY( element.attribute( "cy" ).toDouble() );
+			m_focalPoint.setX( element.attribute( "fx" ).toDouble() );
+			m_focalPoint.setY( element.attribute( "fy" ).toDouble() );
+		}
+		m_type = VGradient::radial;
+	}
+	// handle spread method
+	QString spreadMethod = element.attribute( "spreadMethod" );
+	if( !spreadMethod.isEmpty() )
+	{
+		if( spreadMethod == "reflect" )
+			m_repeatMethod = VGradient::reflect;
+		else if( spreadMethod == "repeat" )
+			m_repeatMethod = VGradient::repeat;
+	}
+
+	for( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+	{
+		QDomElement stop = n.toElement();
+		if( stop.tagName() == "stop" )
+		{
+			VColor c;
+			float offset;
+			QString temp = stop.attribute( "offset" );
+			if( temp.contains( '%' ) )
+			{
+				temp = temp.left( temp.length() - 1 );
+				offset = temp.toFloat() / 100.0;
+			}
+			else
+				offset = temp.toFloat();
+
+			if( !stop.attribute( "stop-color" ).isEmpty() )
+				parseSvgColor( c, stop.attribute( "stop-color" ) );
+			else
+			{
+				// try style attr
+				QString style = stop.attribute( "style" ).simplifyWhiteSpace();
+				QStringList substyles = QStringList::split( ';', style );
+			    for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it )
+				{
+					QStringList substyle = QStringList::split( ':', (*it) );
+					QString command	= substyle[0].stripWhiteSpace();
+					QString params	= substyle[1].stripWhiteSpace();
+					if( command == "stop-color" )
+						parseSvgColor( c, params );
+					if( command == "stop-opacity" )
+						c.setOpacity( params.toDouble() );
+				}
+
+			}
+			if( !stop.attribute( "stop-opacity" ).isEmpty() )
+				c.setOpacity( stop.attribute( "stop-opacity" ).toDouble() );
+			addStop( c, offset, 0.5 );
+		}
+	}
+
+	m_colorStops.sort();
+}
+
+void 
+VGradient::parseSvgColor( VColor &color, const QString &s )
+{
+	if( s.startsWith( "rgb(" ) )
+	{
+		QString parse = s.stripWhiteSpace();
+		QStringList colors = QStringList::split( ',', parse );
+		QString r = colors[0].right( ( colors[0].length() - 4 ) );
+		QString g = colors[1];
+		QString b = colors[2].left( ( colors[2].length() - 1 ) );
+
+		if( r.contains( "%" ) )
+		{
+			r = r.left( r.length() - 1 );
+			r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
+		}
+
+		if( g.contains( "%" ) )
+		{
+			g = g.left( g.length() - 1 );
+			g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
+		}
+
+		if( b.contains( "%" ) )
+		{
+			b = b.left( b.length() - 1 );
+			b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
+		}
+
+		QColor c( r.toInt(), g.toInt(), b.toInt() );
+		color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 );
+	}
+	else
+	{
+		QString rgbColor = s.stripWhiteSpace();
+		QColor c;
+		if( rgbColor.startsWith( "#" ) )
+			c.setNamedColor( rgbColor );
+		else
+		{
+			int r, g, b;
+			svgNamedColorToRGB( rgbColor, r, g, b );
+			c = QColor( r, g, b );
+		}
+		color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 );
+	}
+}
+
+void
 VGradient::transform( const QWMatrix &m )
 {
 	m_origin	= m_origin.transform( m );
Index: core/vgradient.h
===================================================================
--- core/vgradient.h	(revision 443816)
+++ core/vgradient.h	(working copy)
@@ -108,6 +108,7 @@
 	void save( QDomElement& element ) const;
 	QString saveOasis( KoGenStyles &mainStyles ) const;
 	void load( const QDomElement& element );
+	void loadSvg( const QDomElement& element );
 	void loadOasis( const QDomElement &object, KoStyleStack &stack );
 
 	void transform( const QWMatrix& m );
@@ -116,6 +117,7 @@
 	VColorStopList        m_colorStops;
   
 private:
+	void parseSvgColor( VColor &color, const QString &s );
 	VGradientType         m_type		: 2;
 	VGradientRepeatMethod m_repeatMethod	: 2;
 
Index: karbon_resourceserver.cc
===================================================================
--- karbon_resourceserver.cc	(revision 443816)
+++ karbon_resourceserver.cc	(working copy)
@@ -85,7 +85,7 @@
 
 	formats.clear();
 	lst.clear();
-	formats << "*.kgr";
+	formats << "*.kgr" << "*.svg";
 
 	// find Gradients
 
@@ -263,6 +263,13 @@
 {
 	VGradient gradient;
 
+	QString strExt;
+	const int result=filename.findRev('.');
+	if (result>=0)
+	{
+		strExt=filename.mid(result).lower();
+	}
+
 	QFile f( filename );
 
 	if( f.open( IO_ReadOnly ) )
@@ -273,16 +280,30 @@
 			f.close();
 		else
 		{
-			QDomElement e;
-			QDomNode n = doc.documentElement().firstChild();
+			if( strExt==".kgr" )
+			{
+				QDomElement e;
+				QDomNode n = doc.documentElement().firstChild();
 
-			if( !n.isNull() )
+				if( !n.isNull() )
+				{
+					e = n.toElement();
+
+					if( !e.isNull() )
+						if( e.tagName() == "GRADIENT" )
+							gradient.load( e );
+				}
+			}
+			else if( strExt==".svg" )
 			{
-				e = n.toElement();
+				for( QDomNode n = doc.documentElement().firstChild(); !n.isNull(); n = n.nextSibling() )
+				{
+					QDomElement b = n.toElement();
+					if( b.isNull() ) continue;
 
-				if( !e.isNull() )
-					if( e.tagName() == "GRADIENT" )
-						gradient.load( e );
+					if( b.tagName() == "linearGradient" || b.tagName() == "radialGradient" )
+						gradient.loadSvg( b );	
+				}
 			}
 		}
 	}


["svgnamedcolors.h" (text/x-objchdr)]

#define TORGB( red, green, blue ) \
{ \
	r = red; \
	b = blue; \
	g = green; \
}

void svgNamedColorToRGB( QString rgbColor, int &r, int &g, int &b )
{
	if( rgbColor == "aliceblue" )
		TORGB( 240, 248, 255)
	else if( rgbColor == "antiquewhite" )
		TORGB( 250, 235, 215)
	else if( rgbColor == "aqua" )
		TORGB( 0, 255, 255)
	else if( rgbColor == "aquamarine" )
		TORGB( 127, 255, 212 )
	else if( rgbColor == "azure" )
		TORGB( 240, 255, 255 )
	else if( rgbColor == "beige" )
		TORGB( 245, 245, 220 )
	else if( rgbColor == "bisque" )
		TORGB( 255, 228, 196 )
	else if( rgbColor == "black" )
		TORGB( 0, 0, 0 )
	else if( rgbColor == "blanchedalmond" )
		TORGB( 255, 235, 205 )
	else if( rgbColor == "blue" )
		TORGB( 0, 0, 255 )
	else if( rgbColor == "blueviolet" )
		TORGB( 138, 43, 226 )
	else if( rgbColor == "brown" )
		TORGB( 165, 42, 42 )
	else if( rgbColor == "burlywood" )
		TORGB( 222, 184, 135 )
	else if( rgbColor == "cadetblue" )
		TORGB( 95, 158, 160 )
	else if( rgbColor == "chartreuse" )
		TORGB( 127, 255, 0 )
	else if( rgbColor == "chocolate" )
		TORGB( 210, 105, 30 )
	else if( rgbColor == "coral" )
		TORGB( 255, 127, 80 )
	else if( rgbColor == "cornflowerblue" )
		TORGB( 100, 149, 237 )
	else if( rgbColor == "cornsilk" )
		TORGB( 255, 248, 220 )
	else if( rgbColor == "crimson" )
		TORGB( 220, 20, 60 )
	else if( rgbColor == "cyan" )
		TORGB( 0, 255, 255 )
	else if( rgbColor == "darkblue" )
		TORGB( 0, 0, 139 )
	else if( rgbColor == "darkcyan" )
		TORGB( 0, 139, 139 )
	else if( rgbColor == "darkgoldenrod" )
		TORGB( 184, 134, 11 )
	else if( rgbColor == "darkgray" )
		TORGB( 169, 169, 169 )
	else if( rgbColor == "darkgrey" )
		TORGB( 169, 169, 169 )
	else if( rgbColor == "darkgreen" )
		TORGB( 0, 100, 0 )
	else if( rgbColor == "darkkhaki" )
		TORGB( 189, 183, 107 )
	else if( rgbColor == "darkmagenta" )
		TORGB( 139, 0, 139 )
	else if( rgbColor == "darkolivegreen" )
		TORGB( 85, 107, 47 )
	else if( rgbColor == "darkorange" )
		TORGB( 255, 140, 0 )
	else if( rgbColor == "darkorchid" )
		TORGB( 153, 50, 204 )
	else if( rgbColor == "darkred" )
		TORGB( 139, 0, 0 )
	else if( rgbColor == "darksalmon" )
		TORGB( 233, 150, 122 )
	else if( rgbColor == "darkseagreen" )
		TORGB( 143, 188, 143 )
	else if( rgbColor == "darkslateblue" )
		TORGB( 72, 61, 139 )
	else if( rgbColor == "darkslategray" )
		TORGB( 47, 79, 79 )
	else if( rgbColor == "darkslategrey" )
		TORGB( 47, 79, 79 )
	else if( rgbColor == "darkturquoise" )
		TORGB( 0, 206, 209 )
	else if( rgbColor == "darkviolet" )
		TORGB( 148, 0, 211 )
	else if( rgbColor == "deeppink" )
		TORGB( 255, 20, 147 )
	else if( rgbColor == "deepskyblue" )
		TORGB( 0, 191, 255 )
	else if( rgbColor == "dimgray" )
		TORGB( 105, 105, 105 )
	else if( rgbColor == "dimgrey" )
		TORGB( 105, 105, 105 )
	else if( rgbColor == "dodgerblue" )
		TORGB( 30, 144, 255 )
	else if( rgbColor == "firebrick" )
		TORGB( 178, 34, 34 )
	else if( rgbColor == "floralwhite" )
		TORGB( 255, 250, 240 )
	else if( rgbColor == "forestgreen" )
		TORGB( 34, 139, 34 )
	else if( rgbColor == "fuchsia" )
		TORGB( 255, 0, 255 )
	else if( rgbColor == "gainsboro" )
		TORGB( 220, 220, 220 )
	else if( rgbColor == "ghostwhite" )
		TORGB( 248, 248, 255 )
	else if( rgbColor == "gold" )
		TORGB( 255, 215, 0 )
	else if( rgbColor == "goldenrod" )
		TORGB( 218, 165, 32 )
	else if( rgbColor == "gray" )
		TORGB( 128, 128, 128 )
	else if( rgbColor == "grey" )
		TORGB( 128, 128, 128 )
	else if( rgbColor == "green" )
		TORGB( 0, 128, 0 )
	else if( rgbColor == "greenyellow" )
		TORGB( 173, 255, 47 )
	else if( rgbColor == "honeydew" )
		TORGB( 240, 255, 240 )
	else if( rgbColor == "hotpink" )
		TORGB( 255, 105, 180 )
	else if( rgbColor == "indianred" )
		TORGB( 205, 92, 92 )
	else if( rgbColor == "indigo" )
		TORGB( 75, 0, 130 )
	else if( rgbColor == "ivory" )
		TORGB( 255, 255, 240 )
	else if( rgbColor == "khaki" )
		TORGB( 240, 230, 140 )
	else if( rgbColor == "lavender" )
		TORGB( 230, 230, 250 )
	else if( rgbColor == "lavenderblush" )
		TORGB( 255, 240, 245 )
	else if( rgbColor == "lawngreen" )
		TORGB( 124, 252, 0 )
	else if( rgbColor == "lemonchiffon" )
		TORGB( 255, 250, 205 )
	else if( rgbColor == "lightblue" )
		TORGB( 173, 216, 230 )
	else if( rgbColor == "lightcoral" )
		TORGB( 240, 128, 128 )
	else if( rgbColor == "lightcyan" )
		TORGB( 224, 255, 255 )
	else if( rgbColor == "lightgoldenrodyellow" )
		TORGB( 250, 250, 210 )
	else if( rgbColor == "lightgray" )
		TORGB( 211, 211, 211 )
	else if( rgbColor == "lightgrey" )
		TORGB( 211, 211, 211 )
	else if( rgbColor == "lightgreen" )
		TORGB( 144, 238, 144 )
	else if( rgbColor == "lightpink" )
		TORGB( 255, 182, 193 )
	else if( rgbColor == "lightsalmon" )
		TORGB( 255, 160, 122 )
	else if( rgbColor == "lightseagreen" )
		TORGB( 32, 178, 170 )
	else if( rgbColor == "lightskyblue" )
		TORGB( 135, 206, 250 )
	else if( rgbColor == "lightslategray" )
		TORGB( 119, 136, 153 )
	else if( rgbColor == "lightslategrey" )
		TORGB( 119, 136, 153 )
	else if( rgbColor == "lightsteelblue" )
		TORGB( 176, 196, 222 )
	else if( rgbColor == "lightyellow" )
		TORGB( 255, 255, 224 )
	else if( rgbColor == "lime" )
		TORGB( 0, 255, 0 )
	else if( rgbColor == "limegreen" )
		TORGB( 50, 205, 50 )
	else if( rgbColor == "linen" )
		TORGB( 250, 240, 230 )
	else if( rgbColor == "magenta" )
		TORGB( 255, 0, 255 )
	else if( rgbColor == "maroon" )
		TORGB( 128, 0, 0 )
	else if( rgbColor == "mediumaquamarine" )
		TORGB( 102, 205, 170 )
	else if( rgbColor == "mediumblue" )
		TORGB( 0, 0, 205 )
	else if( rgbColor == "mediumorchid" )
		TORGB( 186, 85, 211 )
	else if( rgbColor == "mediumpurple" )
		TORGB( 147, 112, 219 )
	else if( rgbColor == "mediumseagreen" )
		TORGB( 60, 179, 113 )
	else if( rgbColor == "mediumslateblue" )
		TORGB( 123, 104, 238 )
	else if( rgbColor == "mediumspringgreen" )
		TORGB( 0, 250, 154 )
	else if( rgbColor == "mediumturquoise" )
		TORGB( 72, 209, 204 )
	else if( rgbColor == "mediumvioletred" )
		TORGB( 199, 21, 133 )
	else if( rgbColor == "midnightblue" )
		TORGB( 25, 25, 112 )
	else if( rgbColor == "mintcream" )
		TORGB( 245, 255, 250 )
	else if( rgbColor == "mistyrose" )
		TORGB( 255, 228, 225 )
	else if( rgbColor == "moccasin" )
		TORGB( 255, 228, 181 )
	else if( rgbColor == "navajowhite" )
		TORGB( 255, 222, 173 )
	else if( rgbColor == "navy" )
		TORGB( 0, 0, 128 )
	else if( rgbColor == "oldlace" )
		TORGB( 253, 245, 230 )
	else if( rgbColor == "olive" )
		TORGB( 128, 128, 0 )
	else if( rgbColor == "olivedrab" )
		TORGB( 107, 142, 35 )
	else if( rgbColor == "orange" )
		TORGB( 255, 165, 0 )
	else if( rgbColor == "orangered" )
		TORGB( 255, 69, 0 )
	else if( rgbColor == "orchid" )
		TORGB( 218, 112, 214 )
	else if( rgbColor == "palegoldenrod" )
		TORGB( 238, 232, 170 )
	else if( rgbColor == "palegreen" )
		TORGB( 152, 251, 152 )
	else if( rgbColor == "paleturquoise" )
		TORGB( 175, 238, 238 )
	else if( rgbColor == "palevioletred" )
		TORGB( 219, 112, 147 )
	else if( rgbColor == "papayawhip" )
		TORGB( 255, 239, 213 )
	else if( rgbColor == "peachpuff" )
		TORGB( 255, 218, 185 )
	else if( rgbColor == "peru" )
		TORGB( 205, 133, 63 )
	else if( rgbColor == "pink" )
		TORGB( 255, 192, 203 )
	else if( rgbColor == "plum" )
		TORGB( 221, 160, 221 )
	else if( rgbColor == "powderblue" )
		TORGB( 176, 224, 230 )
	else if( rgbColor == "purple" )
		TORGB( 128, 0, 128 )
	else if( rgbColor == "red" )
		TORGB( 255, 0, 0 )
	else if( rgbColor == "rosybrown" )
		TORGB( 188, 143, 143 )
	else if( rgbColor == "royalblue" )
		TORGB( 65, 105, 225 )
	else if( rgbColor == "saddlebrown" )
		TORGB( 139, 69, 19 )
	else if( rgbColor == "salmon" )
		TORGB( 250, 128, 114 )
	else if( rgbColor == "sandybrown" )
		TORGB( 244, 164, 96 )
	else if( rgbColor == "seagreen" )
		TORGB( 46, 139, 87 )
	else if( rgbColor == "seashell" )
		TORGB( 255, 245, 238 )
	else if( rgbColor == "sienna" )
		TORGB( 160, 82, 45 )
	else if( rgbColor == "silver" )
		TORGB( 192, 192, 192 )
	else if( rgbColor == "skyblue" )
		TORGB( 135, 206, 235 )
	else if( rgbColor == "slateblue" )
		TORGB( 106, 90, 205 )
	else if( rgbColor == "slategray" )
		TORGB( 112, 128, 144 )
	else if( rgbColor == "slategrey" )
		TORGB( 112, 128, 144 )
	else if( rgbColor == "snow" )
		TORGB( 255, 250, 250 )
	else if( rgbColor == "springgreen" )
		TORGB( 0, 255, 127 )
	else if( rgbColor == "steelblue" )
		TORGB( 70, 130, 180 )
	else if( rgbColor == "tan" )
		TORGB( 210, 180, 140 )
	else if( rgbColor == "teal" )
		TORGB( 0, 128, 128 )
	else if( rgbColor == "thistle" )
		TORGB( 216, 191, 216 )
	else if( rgbColor == "tomato" )
		TORGB( 255, 99, 71 )
	else if( rgbColor == "turquoise" )
		TORGB( 64, 224, 208 )
	else if( rgbColor == "violet" )
		TORGB( 238, 130, 238 )
	else if( rgbColor == "wheat" )
		TORGB( 245, 222, 179 )
	else if( rgbColor == "white" )
		TORGB( 255, 255, 255 )
	else if( rgbColor == "whitesmoke" )
		TORGB( 245, 245, 245 )
	else if( rgbColor == "yellow" )
		TORGB( 255, 255, 0 )
	else if( rgbColor == "yellowgreen" )
		TORGB( 154, 205, 50 )
}



_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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