On 12/16/09 8:53 AM, King wrote:
>
> Thanks for providing a nicer interface for cairo graphics. It is glued
> without into my application without
> any problems.
>
> Just one question.
> To draw antialised text in cario graphics, you can do:
>
> ctx.text_path("World")
> ctx.set_source_rgb(0.39, 0.07, 0.78)
> ctx.fill_preserve()
>
> How do you do this using wx.lib.graphics?
DrawText should be drawing the text in anti-alias mode, or at least with
the same anti-alias setting that it is using for everything else. See
the attached screenshot of part of one of the samples I pointed you to
yesterday, along with a zoom in on the text. If you're not getting the
same results then something is wrong.
> Although it's rendering the text but not at correct position and does
> not render
> as per the font that has been assigned earlier using SetFont method.
See the implementation of DrawText for what has to be done to apply the
font and to offset the text origin correctly. You have the source code,
use it.