Thanks. This is really helpful. I do recommend it be added to the
documentation. Please do.


S Joshua Swamidass
http://swami.wustl.edu/


On Fri, Jun 14, 2019 at 8:50 AM Michael J Gruber via PyX-user <
[email protected]> wrote:

> Am Fr., 14. Juni 2019 um 15:09 Uhr schrieb Gert-Ludwig Ingold
> <[email protected]>:
> >
> > On 14.06.19 15:04, Michael J Gruber via PyX-user wrote:
> >
> > > ...). Just don't decorate a closed path with a gradient. I'll attach a
> > > small example.
> >
> > It might be a good idea to add this example to the PyX gallery.
> >
>
> Hi Gert,
>
> I need to fix a few bugs first :)
>
> I knew that deco.colorgradient reverses the path - I just don't know
> why. The code seems rather inefficient, splitting the path N times for
> steps=N rather than doing one split for the list of parameters. I
> don't know why, either. I even suspected that it misses one color
> patch at the end, but it appears gradients take care of that (mapping
> N-1 to the end color). Nothing to fix here.
>
> Investigating that I noticed that one should draw the path, not stroke
> it, since the decoration strokes already. Otherwise you may notice a
> small hairline around the gradient (decoration) stroke stemming from
> the stroke being decorated.
>
> Also, gradient filling a closed path sems to be such a common thing -
> there should be a decorator for that, taking a gradient and a path or
> direction vector, with the decorator figuring out the scaling (and
> linewidth) for the gradient path and stroking it to a canvas clipped
> by the path being gradient fill decorated :)
>
> Cheers
> Michael
>
>
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user
>
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to