Re: How to create Custom Knobs with Sprite animation ?
Re: How to create Custom Knobs with Sprite animation ?
- Subject: Re: How to create Custom Knobs with Sprite animation ?
- From: Graham Cox <email@hidden>
- Date: Mon, 16 Jun 2008 14:49:04 +1000
On 16 Jun 2008, at 7:54 am, David Paulicke wrote:
Ok ,
I want to create a Custom GUI and don´t want to use the prebuild
Cocoa Controls ( Sliders , Knobs , buttons ) . Instead i want to use
my own Knobs/Sliders i´ve drawed myself .
OK, probably a bad idea but don't let me stop you.
I want to animate the Knob via Sprite Animation . That means : I
have one Single Image , called " Imagestrip " containing all the
single Frames ( pictures ) for the Animation.
Again :
The imagestrip itself consists of 2 or more frames, arranged in a
single graphic image. There is no spaces between the frames, and
each frame must be the same width and height. When loaded, the
frames will be indexed in a left-to-right, top-to-bottom fashion,
starting in the top left corner.
When drawing the image to the screen you specify which frame to draw
with the frame parameter.
To actually make your image animate, you'll need to cycle through
the frames (like a flip book, cartoon, or any other video) quickly
to give the illusion of motion.
There is no built-in support for doing this but coding it yourself is
straightforward. BTW "sprite" doesn't specifically mean this method of
animating - it's more general. This is just one typical way of doing it.
My Question was : How to achieve that via Cocoa . Rather in Code i
just need a Guidline or a Plan what i should look for , where to
start , general things , what Concepts i should look for.
NSImage
-drawInRect:fromRect:operation:fraction:
hth,
Graham_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden