Hi.
I don't want to know exactly how it's done... I'm just after a bit of guidance on which bit of material I should look at, or sample code to crib from.
Anyway, the 'problem'.
I've not written the application yet, and I'm just thinking up ways of using said up. This will be my first Cocoa app (I work in the software industry, Java mainly).
Basically, I'll have a background image (a house plot, or a map), which will be user definable. This will be displayed in a view inside a window. The user will then be able to create a 'plot' which will have a number of attributes associated with it. Part of this will be it's geographical layout. So, what I intend to do is draw a semi-transparent rectangle (or 4 cornered polygon) on top of the image.
In my model, I'd have an object storing the x-y coordinates of each vertex. I'd then draw (using NSPath I understand) the appropriate shape on top of the image. That I can pretty much work out how to do.
What I'm stuck on find info about, is how to then allow the user to drag that shape around, and drag the vertices around to change the shape.
The corresponding model object will then need to be updated (guess I can use Cocoa Bindings for that... in much the same way as you can with textboxes etc).
Cheers,
GT
I don't want to know exactly how it's done... I'm just after a bit of guidance on which bit of material I should look at, or sample code to crib from.
Anyway, the 'problem'.
I've not written the application yet, and I'm just thinking up ways of using said up. This will be my first Cocoa app (I work in the software industry, Java mainly).
Basically, I'll have a background image (a house plot, or a map), which will be user definable. This will be displayed in a view inside a window. The user will then be able to create a 'plot' which will have a number of attributes associated with it. Part of this will be it's geographical layout. So, what I intend to do is draw a semi-transparent rectangle (or 4 cornered polygon) on top of the image.
In my model, I'd have an object storing the x-y coordinates of each vertex. I'd then draw (using NSPath I understand) the appropriate shape on top of the image. That I can pretty much work out how to do.
What I'm stuck on find info about, is how to then allow the user to drag that shape around, and drag the vertices around to change the shape.
The corresponding model object will then need to be updated (guess I can use Cocoa Bindings for that... in much the same way as you can with textboxes etc).
Cheers,
GT