Results 1 to 2 of 2

Thread: zoomin/zoomout

  1. #1
    Join Date
    Jan 2009
    Posts
    33
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default zoomin/zoomout

    hi,
    i have used opengl to draw a complex shape(many polygons only combined)
    can any one help me how can i write code for zoom in particular polygon?
    or how to zoom whole shape?
    pease send me a sample code for this one so that i'll be thankful to you.
    thanks and regards
    k. bhogasena reddy

  2. #2
    Join Date
    Nov 2008
    Location
    Częstochowa/Poland
    Posts
    50
    Thanks
    2
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: zoomin/zoomout

    Qt Code:
    1. float zoom;//incremetn or decrement in a function and call PaintGl
    2. //in your PaintGl function
    3. glLoadIdentity();
    4. glScalef(zoom,zoome,zoom);
    To copy to clipboard, switch view to plain text mode 
    You can also use translation for this.
    I hope this helps.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.