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



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

On 8 nov. 03, at 01:00, Trygve Inda wrote:

Any ideas on this?...

In a rectangular 24bit RGB pixel field, two areas A & B, both are contiguous
(no islands), but B is an island within A. Given a point in B, find the
straight line distance to the nearest point in A... And do it quickly.

What I am ultimately trying to do is antialias the edge of a "blob" (B). I
figure if I can find the distance to the edge I can just adjust the
transparency when it gets within 2 pixels or so. Maybe there is a better
way, but this was my initial thought.

Thanks for any suggestions.

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: 
 >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.