Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Need a graphics algorithm



Hmm then if your edges are well defined (i.e. if you have a polygonal representation of the edges), you may as well follow the polygon using a simple line drawing algorithm (Bresenham), then antialias what's around the line pixel you're following. That would be your best option, I guess.

Florent

On 8 nov. 03, at 17:21, Trygve Inda wrote:

A better solution would be (I assume that you have B in a separate
bitmap, since you want to adjust the transparency) to pre-process B
before it gets copied into A. Just scan each line and when you
encounter an edge, perform "antialiasing" by manipulating the alpha
value of the pixels around (just like the traditional antialiasing
techniques)

Florent

B isn't really in its own bitmap, but the edges are well defined so it may
as well be. Your idea would work, but if I want 5 pixels of "blend", when
scanning the top line and adding transparency, I'd need to do it to the 2nd
line (and 3rd 4th etc) all of which have no "edges".

Finding the single edge pixels is easy, but finding all pixels with in 5
pixels of the edge is harder and also keeping track so I don't add
transparency to the same pixel more than once.

Trygve
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


--
Florent Pillet, Code Segment email@hidden
Developer tools and end-user products for Palm OS & Mac OS X
ICQ: 117292463 http://perso.wanadoo.fr/fpillet
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: OT: Need a graphics algorithm (From: Trygve Inda <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.