Greetings,

I have a question...

Can I use the same LinearGradient object that was allocated by a
custom SharedResourcePool class (say) and use the same LinearGradient-
object multiple times only in Paint::setShader() functions?

e.g.

LinearGradient lg = new LinearGradient(); //Shared resource

//...

Paint p1 = new Paint();
Paint p2 = new Paint();

p1.setShader(lg);
p2.setShader(lg);

//etc..


Will it have any unforeseen effect on my code? Similarly, can I share
the same instance of Paint?

Thanks,
~Viren


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

Reply via email to