Results 1 to 4 of 4

Thread: How to change text color

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    How to change text color

    I can draw texts by vgDrawGlyph() or vgDrawGlyph() function.
    But the text is in black color. Is there anyway I can change the color of the text?

    Thanks.

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

    Re: How to change text color

    Same way as you would with a path.
    Create a paint object with vgCreatePaint(), use vgSetPaint() to make it current for either fill or stroke (or both), and modify the paint object's state with either the vgSetColor() or the vgSetParameter*() functions.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    Re: How to change text color

    Yes, it works now. Thanks a lot!

  4. #4
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    Re: How to change text color

    Is there a formal tool to convert glyphs in font files to openvg source codes?
    I have tried font2openvg. It works but only for ASCII characters currently. Also, it is not quite stable either.
    Thanks

Similar Threads

  1. Replies: 0
    Last Post: 12-27-2010, 03:08 PM
  2. how to change coordinates
    By smartmobili in forum OpenVG
    Replies: 3
    Last Post: 11-03-2009, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean