actionscript 3 - How to scale around point using BitmapData -


i've searched haven't found wanting bitmapdata object.

i'm using following code:

matrix.identity(); matrix.translate(pan.x, pan.y); matrix.translate(-zoompoint.x, -zoompoint.y); matrix.scale(scale, scale); matrix.translate(zoompoint.x, zoompoint.y);  // later draw call this.bitmapdata.draw(srcbitmap, matrix, null, null, null, true); 

pan point containing translation values scale contains 0..1 zoompoint point containing mouse click

panning works, using method scale not scale around mouse. has done successfully?

thanks.

the matrix translate scale first, might have take account when set translation. needed scale , select area previously, , came this: bitmapdata - scale , select area in 1 matrix?


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -