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

List:       koffice-devel
Subject:    Re: Using svg gradients in Karbon
From:       Tim Beaulen <tbscope () gmail ! com>
Date:       2005-08-08 17:29:50
Message-ID: dd1e9b1705080810293415b392 () mail ! gmail ! com
[Download RAW message or body]

Thanks

This patch wasn't very difficult, mostly copy and paste work.
On the other hand, it feels wrong. This should be available to any
koffice application, like mentioned in the bug report.

I was thinking of including a "universal" gradient loader in the koffice libs.
What's more, the gradient files of krita and karbon are different, one
format for all koffice is better I think. And why not, a universal
gradient editor/selector too.

But all of this will take some time.

So, if nobody objects, I apply this patch to Karbon so it already can
load those gradients.


I changed the following code a little though:
	// 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.001f;
	} 

instead of +=0.1f which would not draw the gradients correctly.

On 8/8/05, Alan Horkan <horkana@maths.tcd.ie> wrote:
> 
> On Sun, 7 Aug 2005, Tim Beaulen wrote:
> 
> > Date: Sun, 7 Aug 2005 16:40:14 +0200
> > From: Tim Beaulen <tbscope@gmail.com>
> > Reply-To: For developer's discussion about KOffice
> <koffice-devel@kde.org>
> > To: koffice-devel@kde.org
> > Subject: Using svg gradients in Karbon
> >
> > 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.
> 
> Brilliant, thanks Tim you are doing some fantastic work.
> 
> I think OpenClipart.org users will be very interested to hear about the
> next release of Karbon thanks to the work you have done improving SVG
> support and I hope I can make time to help promote it.
> 
> > This is the result:
> > http://img91.imageshack.us/my.php?image=snapshot36dm.png
> 
> Looks great.
> 
> > 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.
> 
> I still smile a little when I read the name "KHotNewStuff".
> 
> If you are looking for other ideas it would be very cool if Karbon had a
> section for "collected gradients" just as some Mail clients automatically
> collect email addresses for you from any messages you have opened.
> 
> Thanks again for working on this.
> 
> Sincerely
> 
> Alan Horkan
> 
> Inkscape http://inkscape.org
> Abiword http://www.abisource.com
> Dia http://gnome.org/projects/dia/
> Open Clip Art http://OpenClipArt.org
> 
> Alan's Diary http://advogato.org/person/AlanHorkan/
> 
> 
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
>
_______________________________________________
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