Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jokode

macrumors newbie
Original poster
Dec 14, 2008
16
0
Hi,
I am not new to iphone coding as I have one app out in the store, so I'm not a complete noob - however please forgive this question as it might be very silly...

How can I prevent a partially transparent circle and a rectangle that I have drawn in quartz which overlap from 'double' drawing?

By double drawing I mean the areas which overlap are shaded darker than the areas that dont overlap - because that area has been draw into twice. This wouldnt be a problem if everything is solid color, but I am trying to draw partially transparent and having areas that overlap go dark just makes no sense for my app!

I really don't know a lot about drawing with a technology such as quartz as I have never really done it before - but I feel like is probably a common problem.

Is there a function or concept in quartz that I should be using to do this?

Any help would be very appreciated!

Joe.
 

Delirium39

macrumors regular
May 19, 2008
205
0
It's not double drawing. If you draw two shadows on top of each other, you get a darker shadow. Your first image is drawn on a background color. Your second image is drawn on the background color plus the first image. Adding 50% black to 50% black does not equal 50% black. Make sense?
 

detz

macrumors 65816
Jun 29, 2007
1,051
0
Transparent images will show what's behind them, that's what transparency is. I'm not sure what the issue is, if yo make the image in the front semi-transparent it will merge with the colors behind it.
 

Jokode

macrumors newbie
Original poster
Dec 14, 2008
16
0
Thanks for the feedback - after looking over the responses and code again, I think the problem is in my approach.. I'll go back to the drawing board :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.