NSImage -> Jigsaw peices
Hello, Im making a port of the origional jigsaw puzzle game that Mac used to have before someone didnt remake it for os x
So does anyone know how to draw parts of an NSImage into a specific shape, to create the jigsaw peices, this isnt at all obvious to me...
thanks,
So does anyone know how to draw parts of an NSImage into a specific shape, to create the jigsaw peices, this isnt at all obvious to me...
thanks,
Sir, e^iπ + 1 = 0, hence God exists; reply!
Something like:
Define a NSBezierPath in the shape of a Jigsaw piece
Save the clip path [gContext saveGraphicsState]
Use [jigsawPath addClip] to add it to the current clipping path
Then draw the image
Restore the clip path [gContext restoreGraphicsState]
Define a NSBezierPath in the shape of a Jigsaw piece
Save the clip path [gContext saveGraphicsState]
Use [jigsawPath addClip] to add it to the current clipping path
Then draw the image
Restore the clip path [gContext restoreGraphicsState]
willThimbleby: Works great thanks,
Taxxodium: No, a jigsaw
Taxxodium: No, a jigsaw
Sir, e^iπ + 1 = 0, hence God exists; reply!
You could also play with the masking features in Tiger. Ofcourse that will limit your game to Tiger users, but saves you the trouble of programmatically drawing the jigsaw figure
"When you dream, there are no rules..."
I dont have tiger
Sir, e^iπ + 1 = 0, hence God exists; reply!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Basic NSImage drawing help please! | xenocide | 6 | 4,779 |
Feb 2, 2009 11:01 AM Last Post: FlamingHairball |
|
| NSImage and PNG's | bmantzey | 3 | 4,339 |
Nov 29, 2008 07:01 PM Last Post: arekkusu |
|
| Movie -> Jigsaw Pieces | unknown | 2 | 2,649 |
Nov 13, 2005 02:03 PM Last Post: Volte |
|
| NSImage PDF -> JPG | unknown | 3 | 3,339 |
Oct 23, 2005 08:36 PM Last Post: PowerMacX |
|
| How to get resolution of an NSImage or NSBitmapImageRep? | aegidian | 4 | 4,658 |
Oct 18, 2005 02:39 AM Last Post: aegidian |
|

