• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quickly drawing non-antialiased, discrete, pixels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Quickly drawing non-antialiased, discrete, pixels
      • From: Marco Scheurer <email@hidden>
References: 
 >Re: Quickly drawing non-antialiased, discrete, pixels (From: Greg Titus <email@hidden>)

  • Prev by Date: Re: Making framework accessible to plug-ins?
  • Next by Date: Converting OSX Path to a OS9 Path
  • Previous by thread: Re: Quickly drawing non-antialiased, discrete, pixels
  • Next by thread: Re: Quickly drawing non-antialiased, discrete, pixels
  • Index(es):
    • Date
    • Thread