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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 10-24-2009, 06:17 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 21
Default I have a Quartz Drawing problem

Hi guys,

I have a view (MKMapView) and on it I've a transparent view on which I draw different things. Now I would like to give the user the option to erase things so that the "background view" (the mapView) will be seen in the erased places. Do you think it's possible?

Thanks
Alex1987 is offline   Reply With Quote
Old 10-25-2009, 01:02 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 21
Default

There are apps that do something of the sort, so I know it can be done. Sumthing with layers or stencil buffer perhaps. Nobody knows?
Alex1987 is offline   Reply With Quote
Old 10-25-2009, 01:18 PM   #3 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 5
Default

I think you can simply use the drawRect method in your UIView. You can pass a rectangle that should be drawn and if you get the touches and calculate a rect around them you should be able to "erase" the rect the user touches.
Not sure if this is too much effort though ;-)
mkzero is offline   Reply With Quote
Old 10-25-2009, 02:02 PM   #4 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 21
Default

Quote:
Originally Posted by mkzero View Post
I think you can simply use the drawRect method in your UIView. You can pass a rectangle that should be drawn and if you get the touches and calculate a rect around them you should be able to "erase" the rect the user touches.
Not sure if this is too much effort though ;-)
Well it's not that easy. What if a user draws a circle and then erases part of it (let's just say that the erased area is not a rectangle) - what then?
Alex1987 is offline   Reply With Quote
Reply

Bookmarks

Tags
draw, iphone, mkmapview, quartz

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: 329
22 members and 307 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, Dattee, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, viniciusdamone, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

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