freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Scaline for rasterizer?


From: Aya Koshigaya
Subject: Re: [ft] Scaline for rasterizer?
Date: Tue, 8 Sep 2009 11:49:29 +0200

Ah, forget my question... I solved it already.. :)

Just multiply the 100.453 with 64 and that's it.. ^^

Thanks a lot,
Aya


On 08.09.2009, at 11:44, Aya Koshigaya wrote:

Hi,

okay.. so if I am right, to draw a line at a Y = 100, i'd give the rasterizer the value "100 << 6".. right? But as soon as I want a line at 100.453, I have to do some calculations to get the "453" speratated etc.. so, is there any easy to use FT-funktion for converting a float to the fixed float value?

Thanks,
Aya


On 08.09.2009, at 11:21, Mickey Gabel wrote:

Aya Koshigaya wrote:
Mhh ... okay, thanks :)
But how do I convert my value to a 26.6 float? And how do I store it in the rasterizer, since FT_POS is declared as "signed long".. not float..?
Thanks,
Aya

Fixed-point arithmetic is not very complicated to understand. It's mostly regular integer math with a fixed scaling.
You can start here: http://en.wikipedia.org/wiki/Fixed-point_arithmetic

FT2 has some very nice functions for using fixed-point. See http://www.freetype.org/freetype2/docs/reference/ft2-computations.html .





_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype



_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype





reply via email to

[Prev in Thread] Current Thread [Next in Thread]