Results 1 to 4 of 4

Thread: how to change coordinates

  1. #1
    Junior Member
    Join Date
    Nov 2009

    how to change coordinates


    I am developping a 2D API based on OpenVG and I am using AmanithVG implementation for now.
    However I would like to use a coordinate system where 0,0 corresponds to top left (like GDI or
    quartz) instead of bottom left, so how can I did this ?

    I suppose I need something like :

    vgLoadMatrix( ?, ?, ?, ?, ?, ?, ?, ?, ?);
    vgLoadMatrix( ?, ?, ?, ?, ?, ?, ?, ?, ?);

    Let's say my window is width x height what should I pass to vgLoadMatrix ?


  2. #2

    Re: how to change coordinates

    It's been a while, but you can probably scale based on the size of your window, rotate by 270 or -90 then translate by -height.

  3. #3
    Senior Member
    Join Date
    Feb 2006

    Re: how to change coordinates

    No, just vgScale(1,-1), and vgTranslate(0, height);
    not sure which order though off the top of my head.

  4. #4

    Re: how to change coordinates

    Good point Ivo! Couldn't remember the easiest way to inverse the y. The negative scale is ringing some bells.

Similar Threads

  1. Obj-coordinates to pixel-coordinates: wich steps?
    By lucafr in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 09-11-2008, 11:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts