Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect rendering of SVG image #31

Closed
GoogleCodeExporter opened this issue Jul 24, 2015 · 6 comments
Closed

Incorrect rendering of SVG image #31

GoogleCodeExporter opened this issue Jul 24, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant