aelmahalawey / androidsvg

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

Incorrect rendering of SVG image #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Render the attached SVG file. When I rotate my tablet, causing the image to 
repeatedly render to the Canvas, I see different results. Mainly the errors 
consist of different areas of the face being incorrectly shaded. There is also 
frequently a line across the ear on the left side of the image.

What is the expected output? What do you see instead?

Shading does not look quite right, as if colors were being reused in the wrong 
place. At least once (see attached) many polygons were missing and the 
background showed through.

What version of the product are you using? On what operating system?

android-svg-1.2.1 on a Nexus 7, Android 4.4.2. Problem also exhibits on a 
Motorola Xoom, Android 4.1.2.

Original issue reported on code.google.com by kr...@appropel.com on 4 Feb 2014 at 7:08

Attachments:

GoogleCodeExporter commented 8 years ago
Hi. Thanks for the report.

I have a suspicion this might be a duplicate of Issue 25.  I have just realised 
that fix did not get backported to 1.2.1.

In any case I'll check this out tomorrow and release an update.

Original comment by paul.leb...@gmail.com on 4 Feb 2014 at 7:59

GoogleCodeExporter commented 8 years ago
My test app is rendering this fine.  Are you drawing this to the screen 
yourself, or are you using SVGImageView to do it?

Original comment by paul.leb...@gmail.com on 5 Feb 2014 at 3:40

GoogleCodeExporter commented 8 years ago
I'm drawing it myself with SVG.renderToCanvas(). I already had a view class 
that used svg-android, and I rewrote it to use androidsvg. I can attach this 
class if that would help.

Original comment by kr...@appropel.com on 5 Feb 2014 at 3:44

GoogleCodeExporter commented 8 years ago
Yes please. Or send it to me at androidsvgfeedback@gmail.com if you prefer.

Original comment by paul.leb...@gmail.com on 5 Feb 2014 at 4:42

GoogleCodeExporter commented 8 years ago
The issue went away when I modified my class to render into a Bitmap on a 
separate thread. I'm not sure what the practical difference is but it renders 
just fine 100% of the time now.

Original comment by kr...@appropel.com on 6 Feb 2014 at 2:23

GoogleCodeExporter commented 8 years ago
Closing this issue.  Turns out that the SVG was being rendered using the 
hardware 2D renderer and it was limitations of the hardware renderer that were 
causing the artifacts.

Original comment by paul.leb...@gmail.com on 6 Feb 2014 at 3:12