[Pythonmac-SIG] Problems with CoreGraphics API post-Snow Leopard

João Leão joaoleao at gmx.net
Tue Apr 17 18:17:47 CEST 2012


> João Leão <joaoleao at gmx.net> wrote:
> 
>> But now I'm getting another error (and I'll probably get some more) with another function that expects a CGFloat object instead of a plain integer.
>> The code looks like this:
>> ---
>> self.pdf.drawPlainTextInRect(text_prov, textRect, 10)
>> ---
>> 
>> And the error (again caused by the last argument, in this case "10"):
>> ---
>> TypeError: in method 'CGContext_drawPlainTextInRect', argument 4 of type 'CGFloat'
>> ---
>> 
>> 
>> I'm sure that it can't be so hard to create a CGFloat but I didn't find the right documentation or sample code to do it.
>> Does anybody know how to do this?
> 
> Did you try "self.pdf.drawPlainTextInRect(text_prov, textRect, 10.0)"?

Yes I did, but it didn't work.
Thanks anyway.

> 
> Bill



More information about the Pythonmac-SIG mailing list