flex - Scaling with BitmapData -


I am working on an application that will allow a user to scale an image. The problem is that I have been living with the method given below that scaling is always happening at the last scale point. For example: If I measure the image one and then we measure the one below the image, I have to scale it down twice to get it back, I should do it

Anyone with this Help is greatly appreciated.

Here is my current code:

  Private var source BMD: BitmapData = testImage.source as BitmapData Private Var MatrixSQLLax: number = 1; Private var matrix scanned Y: number = 1; Private var baseScaleX: number = .05; Private var baseScaleY: number = .05; Private function source zoom (zoom type: boolean = false): zero {var matrix: matrix = new matrix (); Var matrix image: bitmapdata; If (zoomtype) {matrixScaleX = matrix sclex + base SCALX; MatrixScilli Y = MatrixScilli Y + Basically Y; Matrix.a = matrix sslx; Matrix.d = matrixScaleY} Other {matrixScaleX = matrixScaleX - baseScaleX; Matrix Scale Y = Matrix Scale - BaseScale; Matrix.a = matrix sslx; Matrix.d = matrixScaleY; } Matriximage = new bitmapdata (sourceBMD.width, sourceBMD.height, incorrect, 0x0000000); Trace ('matrix sslx:' + matrix sslx); Trace ('matrix scalicity:' + matrix scare); Trace ('bescakalex:' + bescalex); Trace ('basecake:' + basescalee); Trace ('matrix:' + objectatling (matrix)); Matriximedro (source BMD, matrix); TestImage.source = matriximage; }  

It looks okay, I suspected that this problem is with your input Or this place is being called.

To make this work, events in your code need to:

Capture Input - & gt; Scale image - & gt; Drag the image .

Since you are seeing the image to draw the picture at the end of this function, I will check that this function is being called after the input is finished after the input.

Can you confirm what is happening?


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -