Re: Pixels Are Not Little Squares

Krzysztof Kosiński <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAFLw2WTNRprnFHzEJ-_yOy1DRCJqw+_nGqg+AxQ4_njaMqdbcg@mail.gmail.com>
The little square model is OK for Cairo, since it uses a box filter for
sampling tje omage when rendering. This is necessary for antialiasing. You
can substitute "pixel centers" with "pixel positions" and "pixel edges"
with "boundaries of the support of the box filter evaluated for the
relevant pixels".
On Apr 22, 2016 09:53, "Bill Spitzak" <[email protected]> wrote:

> I think it is clearest to say the boundaries between the pixels are at
> integers.
>
> The centers (I don't think there is anything wrong with saying center) is
> a i+.5, j+.5 where i and j are integers.
>
>
> On Thu, Apr 21, 2016 at 9:05 PM, Lawrence D'Oliveiro <
> [email protected]> wrote:
>
>> The explanation of how to draw sharp single-pixel-wide lines
>> <http://cairographics.org/FAQ/#sharp_lines> could be better phrased.
>> The claim
>>
>>     When some people hear pixels described as little squares it sets
>>     their teeth on edge.
>>
>> is nonsense. Saying this doesn’t set anyone’s “teeth on edge” (not of
>> knowledgeable people, anyway), it is simply wrong
>> <http://www.alvyray.com/Memos/MemosCG.htm#PixelIsNotSquare>.
>>
>> The explanation could be expressed simply as an issue of where to
>> position the pixels* with respect to the coordinate system. In my Cairo
>> Gotchas notebook
>> <
>> https://github.com/ldo/qahirah_notebooks/blob/master/Cairo%20Gotchas.ipynb
>> >,
>> I currently say
>>
>>     Cairo locates pixels at integer+½ units in device coordinates. This
>>     way, adjacent filled areas which share the same integer-coordinate
>>     boundary will abut nicely without overlaps or gaps. So if you want
>>     to draw lines that don’t get smeared across extra pixels, you will
>>     have to position them at coordinates n such that n mod 1 = ½
>>
>> which is a much more direct way of putting it, don’t you think? And
>> completely avoiding any misleading comments about “little squares”.
>>
>> *Note I said “pixels”, not “pixel centres”.
>> --
>> cairo mailing list
>> [email protected]
>> https://lists.cairographics.org/mailman/listinfo/cairo
>
>
>
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo
>

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.