Sunday, March 13, 2011

[android-developers] Paint single Path object with Xfermode

Hi,
I have one path object (for example recorded track). I'm drawing it
on canvas. When I set semi-transparent color to paint object, whole
path is colored like this.

This is correct. Imagine that you was walking on some rectangle area
from one side to another, few times you were on same place. And want
to draw this path in same way you're drawing single lines, so you can
see places where you were more then once darker then others (because
line is draw there more then once).

Anyway path object draw all areas with same color and because it's
only one object, Xfermode PorterDuffXfermode(PorterDuff.Mode.DARKEN)
have no effect on it. I hope you understand what I want.

And I don't want to use only drawing single lines, because track
width should be for example 100px. Nice example is here
http://locus.asamm.cz/data/1300018457960.png. This is created with
drawing single lines and I want to all path to be connected together
but with darker places on place where I walk more then one. Do you
have any tip for this or only to separate path into more pieces?

thanks guys!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate