xml - android draw an image on canvas after traslate -
i want draw image canvas same coordinate everytime.but cant achive that.this code:
@override protected void ondraw(canvas canvas) { // draw thumb nail canvas.translate(mtranslatex - mthumbxpos, mtranslatey - mthumbypos); mthumb.draw(canvas); canvas.save(); if (firsttime) { mfirsttranslatey= mtranslatex; mfirstthumbxpos= mthumbxpos; mfirsttranslatey= mtranslatey; mfirstthumbypos= mthumbypos; firsttime = false; }else { canvas.restore(); canvas.translate(mfirsttranslatex - mfirstthumbxpos, mfirsttranslatey - mfirstthumbypos); mthumbpresent.draw(canvas); } }
}
i make negative translate every time , make translate first position of thumbnail.i use seek arc library.i have thumbnail change degree , want draw these 2 circles(21 , 32) on image below.
Comments
Post a Comment