2 Replies Latest reply on Oct 7, 2009 11:18 PM by ckisthebest

    How to fit image in image control?

    ckisthebest Level 1

      I am using image control to display images.

       

      I have placed image control inside canvas.

       

      While loading I am maintaining image aspect ratio and based on it i am resizing image and canvas both.

       

      Now i have requirement that I dont want to change height and width of image and canvas control, instead image should be scalled to fit in canvas.

       

      I know image have scaleX, scaleY and scalecontent property.

       

      Can anybody guide me how to calculate scaleX and scaley so image fits in image control?

       

      Thanks,

      -CK