[android-developers] Re: Canvas, drawing 10 lines of 1 pixel creates different color than a rectangle of 10 pixel

2011-08-15 Thread sblantipodi
thanks for the answer. On Aug 15, 9:30 pm, Romain Guy romain...@android.com wrote: If antialiasing is enabled, that would happen. On Mon, Aug 15, 2011 at 12:28 PM, sblantipodi perini.dav...@dpsoftware.orgwrote: As title. Can you tell me why when using Canvas I have this strange

[android-developers] Re: Canvas drawing

2010-02-04 Thread Neilz
Well, it would appear that all these extra calls to onDraw() are because my base Activity extends MapActivity. Just having a MapView seems to be causing this, even though nothing in the view actually requires updating. I don't suppose there's anything I can do about that? -- You received this

[android-developers] Re: Canvas drawing

2010-02-03 Thread schwiz
your draw routine should only be called if you call invalidate on your view or its parent view. On Feb 3, 7:46 am, Neilz neilhorn...@googlemail.com wrote: Hi all. When overiding onDraw() in my View, is it possible to say Don't draw anything new, just keep what was there the last time? In my

[android-developers] Re: Canvas drawing

2010-02-03 Thread Neilz
It is being called... between 5-10 times a second. I just set up a routine to check. And I'm most definitely not calling invalidate() on these occasions. On Feb 3, 2:04 pm, schwiz sch...@gmail.com wrote: your draw routine should only be called if you call invalidate on your view or its parent

[android-developers] Re: Canvas drawing

2010-02-03 Thread Neilz
What else can cause onDraw() to be called, if I'm not triggering it with invalidate()? -- 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,

[android-developers] Re: Canvas drawing

2010-02-03 Thread jamesc
Perhaps you're indirectly calling invalidate() in the onDraw(), resulting in a redraw loop? On Feb 3, 10:00 pm, Neilz neilhorn...@googlemail.com wrote: What else can cause onDraw() to be called, if I'm not triggering it with invalidate()? -- You received this message because you are

Re: [android-developers] Re: Canvas drawing

2010-02-03 Thread Dan Sherman
You could see whats calling it with a quick: try { throw new Exception(); } catch (Exception e) { e.printStackTrace(); } On Wed, Feb 3, 2010 at 5:11 PM, jamesc jame...@gmail.com wrote: Perhaps you're indirectly calling invalidate() in the onDraw(), resulting in a redraw loop? On Feb 3,

[android-developers] Re: Canvas drawing

2010-02-03 Thread Bob Kerns
While that is indeed a useful tool to have in reserve in one's toolbox -- generally, as in this case, it's better to set a breakpoint in the debugger, and have a look around. Even better, in this case, would be to ALSO set a method entry breakpoint on View.invalidate(int, int, int, int) -- and