path gradient

View: New views
1 Messages — Rating Filter:   Alert me  

path gradient

by Petr Kobalíček :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

currently I want to implement the gradient on path feature into Fog
library. I saw the gradient_contour contribution by Milan and I think
that there must be another way to do it. Currently this contribution
works in way that the path is rendered by one pixel wide stroke and
this stroke is blurred by some transformations. These blurred data are
used to get color at the xy position.

I think that this problem can be solved by different way:
1. Generate list of points needed to connect path
2. Sort this list - here I don't know the correct criteria to sort it
3. For each pixel get minimum distance into data in the generated list
of points, that distance will be transformed into color value.

The question is, how to sort list and is there effective way to found
point at minimal distance? This means, if I have list of xy points,
how to sort and how to implement algorithm to fast calculate minimum
distance for any xy coordinate in 2d space?

Or exist better mechanism to draw path gradient?

Is there any literature I should study to learn about this problem?

Currently this feature is implemented in GDI+, but I haven't sources
to check the trick :)

Thanks for any ideas
- Petr

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general@...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general