Announcement

Collapse
No announcement yet.

help image zoom in or zoom out

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • help image zoom in or zoom out

    Right now, I am making viewer application and i have trouble image with big resolution. I want my viewer can be zoom in or zoom out if the resolution is too
    big but i don't know how to make it..... Is it possible to make zoom in or out for image object? I need help for all of you guys. Thanks

  • #2
    ok, heres a quick functions to zoom your image

    place this in globals
    Code:
    function ZoomImage(ImageObject,Step)
    	Image.SetSize(ImageObject, Image.GetSize(ImageObject).Width+Step, Image.GetSize(ImageObject).Width+Step );
    end

    Example Call: set image object name and zoom step size

    Zoom In
    Code:
    ZoomImage("Image",+5)
    Zoom Out
    Code:
    ZoomImage("Image",-5)
    Last edited by RizlaUK; 01-21-2008, 06:43 AM.
    Embrace change in your life, you never know, it could all work out for the best

    Comment


    • #3
      I tryed your script and all but when I put in the zoom in script I get an error that says: Unexpected symbol near '+'. The zoom out works fine.

      Comment


      • #4
        Sorry, that was due to a last min change, just remove the "+"

        Zoom In:
        Code:
        ZoomImage("Image",5)
        Zoom Out
        Code:
        ZoomImage("Image",-5)
        Embrace change in your life, you never know, it could all work out for the best

        Comment


        • #5
          Thanks RizlaUK for your help :yes

          For correction :

          function ZoomImage(ImageObject,Step)
          Image.SetSize(ImageObject,Image.GetSize(ImageObjec t).Width+Step,Image.GetSize(ImageObject).Height+St ep);

          end

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎