Skip to content

Canvas changed after renderToCanvas #50

@GoogleCodeExporter

Description

@GoogleCodeExporter
The problem. 
If I have a Canvas canv and a Paint paint which I use to draw some text and svg 
images then the following calls don't produce the same

svg.renderToCanvas(canv,frame);
canv.drawText(""+initiative,shift,textHeight,paint);

or 

canv.drawText(""+initiative,shift,textHeight,paint);
svg.renderToCanvas(canv,frame);

I'm not completely sure this is a bug but it took me some time to understand 
this. I'm using androidsvg-1.2.1. 


Now that I understood this I'm working with the workaround

canv.save();
svg.renderToCanvas(canv,frame);
canv.restore();
canv.drawText(""+initiative,shift,textHeight,paint);


Original issue reported on code.google.com by yannick....@math.uzh.ch on 14 Jan 2015 at 4:43

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions