On Mon, Mar 23, 2009 at 3:24 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:
> The example (e) in my previous script have a code and a text label
> mismatched.
> I'm attaching the corrected one.
>
> I took a more look on how a patch is drawn.
> the draw() method of a patch calls draw_path method of the renderer,
> which seems to be responsible for both "fill", and "stroke". But there
> is only one alpha value (gc.alpha). The rgbFace is a tuple of r,g,b
> and does not have a alpha value.
>
> renderer.draw_path(gc, tpath, affine, rgbFace)
>
> Thus, it seems that is is not possible to have different alpha for
> "fill" and "stroke".
> One of the easiest solution would be call the draw_path twice, each
> for fill and stroke.
I think we would pay a significant performance hit in some cases to make the
call twice. Perhaps this is a good time to rethink the draw_path and gc
signature, since as Eric notes these have evolved over time from the early
days when mpl didn't have alpha at all. One possibility would be to have a
facecolor/edgecolor property on the gc itself, which would be rgba tuples.
Since the gc is almost entirely internal, we can revamp it w/o affecting
userland code, though it would be nice to support legacy methods (eg
gc.set_alpha could warn and then proceed to set the edge and face alpha
channel). Then we would drop the rgbFace argument entirely. Obviously this
would require hacking through a bunch of backend code to fix, but the
changes would be fairly straightforward and of the busy-work variety.
JDH
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel