Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-08-2011, 03:42 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Location: New Zealand
Posts: 7
ethorneloe is on a distinguished road
Default Question about masking images and soft edges

Hi,

I have been reading the Quartz 2D Programming Guide on creating image masks, but I can't seem to find anything about how to create soft edges. All the shape and path drawing examples seem to always have hard edges. Does anyone know of a way to paint shapes and create masks that have soft edges? Basically the effect I'm looking for is the same as if you were in Photoshop and used a soft brush to paint a circle, and the edges of the circle are soft and semi-transparent.

thanks
ethorneloe is offline   Reply With Quote
Old 06-08-2011, 08:30 AM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Whatever is black in the image will be visible and whatever is white will be invisible. Everything in between will be partly visible. So take a hint from that. If you have an image of 100x100 and draw a 50px radius circle and fill it black, after that draw a 51px circle (without fill) that is 70% black, then 52px at 40% black or something to that effect. Those two will be partially visible and will give an effect of a soft edge.
baja_yu is offline   Reply With Quote
Old 06-08-2011, 05:00 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2011
Location: New Zealand
Posts: 7
ethorneloe is on a distinguished road
Default

Thanks for the reply.

I'll give that a go. Was hoping there was something in an API that would enable painting with soft edges, and that I just wasn't finding it.
ethorneloe is offline   Reply With Quote
Reply

Bookmarks

Tags
core animation, graphics, mask, quartz2d

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 326
7 members and 319 guests
chemistry, Dnnake, iOS.Lover, jenniead38, lendo, pbart, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:19 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0