i experimenting creating gui , graphics based applications in haskell using gtk2hs , cairo. working on program user can create , manipulate simple geometric shapes on screen.
the 3 manipulations want user able are: translation, rotation , scaling. ideal implementation of have transformation handles present in image manipulation programs such photoshop:
(i.e object can translated dragging somewhere inside it, scaled dragging appropriate white box, , rotated clicking , dragging in direction of rotation outside of object's box)
i cannot find simple way of doing "out-of-the-box" in either gtk or cairo documentation, , have been unable find suitable library searching on google. know of haskell api allow me manipulate graphics in way or, failing that, know how go implementing own version of type of functionality in haskell?
there not built-in widgets this; you'll have build drawing appropriate elements (e.g. actual shape, bounding box or similar, rectangles on corners , edges of bounding bex, etc.) , handling mouse events checking whether events fall on these elements or not. should not difficult... though may bit tedious.
Comments
Post a Comment