wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

drawShape on iOS #1402

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have free hand drawing component previously implemented in pisces drawing 
line by line but on iOS it was terribly slow.
I change the implementation using com.codename1.ui.Graphics  and the method 
drawShape. It's perfectly fast on Android but on iOS my application freezes (no 
error message, just not responding).

refs: 
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/codenam
eone-discussions/aLRyNq3rHNQ/rTuMK3umlY8J

test case in attachment.

Just place the SignComponent in Form f:
SignComponent sign = new SignComponent(f);
f.addComponent(sign);

Original issue reported on code.google.com by ivan.ila...@gmail.com on 17 Mar 2015 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
I think I see the problem.   iOS doesn't yet support drawShape for mutable 
images.   There still may be a bug here as I thought it should have failed 
gracefully if you call drawShape() on a mutable image.

Support is planned but not sure when I will have a chance to complete it.

Original comment by steve.ha...@codenameone.com on 17 Mar 2015 at 11:23

GoogleCodeExporter commented 9 years ago
in method paintBackground I'm not drawing on mutable image
(only in getImage() which I use for saving image later, you can ignore it for 
this testcase)

Original comment by ivan.ila...@gmail.com on 17 Mar 2015 at 11:44

GoogleCodeExporter commented 9 years ago

Original comment by steve.ha...@codenameone.com on 23 Mar 2015 at 5:30

GoogleCodeExporter commented 9 years ago
Fixed.  The problem was that it was choking on drawing an empty shape.
https://code.google.com/p/codenameone/source/detail?r=2221

Will be included in the next server update (probably within next couple of 
days).

Original comment by steve.ha...@codenameone.com on 23 Mar 2015 at 6:09