[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] two puzzled function
From: |
Werner LEMBERG |
Subject: |
Re: [ft] two puzzled function |
Date: |
Fri, 19 May 2006 23:15:04 +0200 (CEST) |
> handle->preload = !!preload;
>
> Q1: why two '!' here ?
The first `!' inverts the value, the second `!' inverts again but
normalizes the value to `1'. With other words, this is a cheap method
to map 0 to 0 and everything else to 1.
> FTDemo_Set_Current_Size( handle, ( point_size * res + 36 ) / 72 );
>
> Q2: what's the mean of: "( pt * res + 36 ) / 72" ?
this converts PS points to pixels, with proper rounding (this is the
`+36')
Werner