drawing concepts
drawing concepts
- Subject: drawing concepts
- From: Antonio Inojal <email@hidden>
- Date: Thu, 25 Jul 2002 14:35:13 -0400
Hello, I am trying to create a very simple test for a moving ball. Now,
the most obvious way to this is ( if the background is white), to draw a
circle, the draw a white circle in the same position, then draw another
circle of a color in another position, and so on. The problem with this
is that it causes flicker, very nasty things. Now, I could go ahead and
draw white around the areas which are overlap ( kind of dificult to
explain ). But this would take too much work. What about if I want to
work with an image on the background, using this method it is almost
impossible unless I had a record of each pixel. I thought that maybe I
could achieve what I wanted to do by using layers. Meaning putting an
NSView on top of another. My drawing will be done in the foreground. But
the problem is this: When one draws something (and correct me if I am
wrong) on the foreground, you cannot make it disappear, or make it
transparent. For example, say that I could make certain parts of the
view transparent. With this, instead of placing a white circle, as
above, on the same spot as the colored circle, I make that area
transparent. Then draw somewhere else without the worry of flicker. If
anyone knows how to paint transparent on a view or if there is a better
way that you know, please tell me. Also, if one knows of any
documentation on this subject please direct me and others there. Thank
You very much for your time. I appreciate it.
Tony
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.