Re: Quickly drawing non-antialiased, discrete, pixels
Re: Quickly drawing non-antialiased, discrete, pixels
- Subject: Re: Quickly drawing non-antialiased, discrete, pixels
- From: Dietmar Planitzer <email@hidden>
- Date: Tue, 07 Jan 2003 11:14:15 +0100
>
From: Greg Titus <email@hidden>
>
>
Think of intersecting line strips in a single path, painted with a
>
color that has some alpha. If you draw the strips in a single path, the
>
intersecting pixels get painted once (thus the need to calculate
>
intersections). If you draw the strips in separate paths with separate
>
strokes or fills, the pixels get painted twice and end up a different
>
color because of the alpha blending.
>
>
This is a very important and intended asymmetry. Stroking a path needs
>
to result in drawing the effected pixels exactly once, no matter what
>
the composition of the path.
Indeed, makes sense.
Though, checking for intersections should no longer be necessary if the
current alpha value == 1.0 (fully opaque) and anti-aliasing is turned off.
Anyway, I've two minimal improvements to share for the example code I gave
yesterday:
a) line width and x advancement should be reduced to 0.25. This yields
visually more pleasing results and gives a tiny speed-up.
b) Accumulating 400 points in the inner loop is faster than accumulating
200.
Both changes together gain approx. 200ms.
Regards,
Dietmar Planitzer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.