Re: diacanvas2
- From: Rick L Vinyard Jr <rvinyard cs nmsu edu>
- To: Pavlo Korzhyk <pavlo korzhyk gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: diacanvas2
- Date: Wed, 15 Nov 2006 23:13:51 -0700
Pavlo Korzhyk wrote:
But rotations
In the Drawable class (which most classes such as Shape, Rectangle, Arc,
Group, Polyline, Bezierline....) inherit from:
/** Rotate to r radians */
void set_rotate( double r );
/** Rotate by r radians
* If previous rotation was pr then new rotation is pr+r
*/
void rotate( double r );
, movements,
Same Drawable class:
/** Set absolute position */
void set_translate_x( double tx );
void set_translate_y( double ty );
void set_translate( double tx, double ty );
/** Translate by given value */
void translate_x( double tx );
void translate_y( double ty );
void translate( double tx, double ty );
And to round out affine transforms there are scaling methods and skewing
methods.
But, if you're looking for animations, see the AffineAnimator class,
with an example in the papyrus-demo named example_affineanimator.cpp
doubleclicks, mouse selections etc are much more complex task for
a developer.
These are handled by attaching an event handler to an object. With an
event handler attached, which (intentionally) handles most of the Gdk
events that I felt were appropriate for drawing operations. But, if
anyone feels some are missing it wouldn't be too hard to add them.
example_selector.cpp, example_translator.cpp and
example_freehandsketcher.cpp have examples which capture Gtk window events.
DiaSolver is probably a thingy that simplifies automatic updates of
links between objects.
That's one area I've been thinking about... nothing concrete yet though.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]