Results 1 to 3 of 3

Thread: VG_MOVE_TO_ABS issue

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    2

    VG_MOVE_TO_ABS issue

    Hi team,

    I'm using the Khronos OpenVG-1.1 Reference Implementation, on my ubuntu-8.10 machine, which uses GLUT to open a valid context.

    I'm trying to draw some text(TrueType) using OpenVG APIs. I'm able to draw a single character perfectly but if I'm trying to draw a string of characters then I'm getting a trailing line whenever I'm doing a VG_MOVE_TO_ABS move to the starting point of next character. Please find the screenshot here.



    Any opinion on this. What am I doing wrong here?
    Thanks for your concern.

    Regards
    Amit Pundir

  2. #2
    Senior Member
    Join Date
    Feb 2006
    Posts
    115

    Re: VG_MOVE_TO_ABS issue

    Looks to me like you're not doing a VG_CLOSE_PATH before the next VG_MOVE_TO.
    When you do one character, the path closes automatically as you'd expect, but you need to add them in explicitly when stringing letters together like this.

    In any event though, it's probably a better idea to render letter by letter anyways.
    Making a huge monolithic path to handle an entire phrase or sentence is probably not a good idea as it complicates rendering for the driver (due to fill rules for example, the individual line segments must either be checked for intersections or sorted or some other similar operation inside the driver). Using a one path per character approach probably also saves work as various bits of rendering can be cached inside the driver and accelerated.

    If you have a OpenVG 1.1 implementation, use the font library functions instead.

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    2

    Re: VG_MOVE_TO_ABS issue

    Thanks Moravec.

    I will try to do a letter by letter rendering next.

    Thanks for your concern.
    Regards
    Amit Pundir

Posting Permissions

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