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 #63

Open
GoogleCodeExporter opened this issue Dec 8, 2015 · 5 comments
Open

Incorrect rendering of SVG image #63

GoogleCodeExporter opened this issue Dec 8, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Render the atttached file.

What is the expected output? What do you see instead?
Should be simple menu with 3 horizontal bars but only background.




Original issue reported on code.google.com by jakub.zi...@gmail.com on 15 May 2015 at 12:35

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Thanks for the report.

I suspect it is probably the <use> in the <clipPath> that is the problem.  Does 
this version of the file work?

Original comment by paul.leb...@gmail.com on 15 May 2015 at 1:58

Attachments:

@GoogleCodeExporter
Copy link
Author

No :/ same problem with your version. Only background is rendered. 

Original comment by jakub.zi...@gmail.com on 15 May 2015 at 2:09

@GoogleCodeExporter
Copy link
Author

Ok i find. When i use SVGImageView and define in xml 

    <com.caverock.androidsvg.SVGImageView
        android:id="@+id/menu"
        android:layout_width="40dp"
        android:layout_height="40dp"
        svgimageview:svg="svg/Issue63b.svg" />

it dosn't work but if i load svg using SVG.getFromAsset

SVG svg = SVG.getFromAsset(ctx.getResources().getAssets(), 
SVG_FOLDER_NAME+"/"+name);
ret = Bitmap.createBitmap(width, height, Config.ARGB_8888);
Canvas canvas = new Canvas(ret);
svg.setDocumentHeight(height);
svg.setDocumentWidth(width);
svg.renderToCanvas(canvas);

everything is fine. It does not matter whether I use my or your svg version.

Original comment by jakub.zi...@gmail.com on 15 May 2015 at 2:34

@GoogleCodeExporter
Copy link
Author

menuButton = (SVGImageView)findViewById(R.id.menu);
menuButton.setImageAsset("svg/menu.svg");

this way don't work to. 

Original comment by jakub.zi...@gmail.com on 15 May 2015 at 2:43

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