Robert Pearce wrote:
Minor thing this...
In the DrawingArea section of the tutorial, on the page about arcs,
at
http://developer.gnome.org/gtkmm-tutorial/2.22/sec-cairo-drawing-arcs.html.en
> the second paragraph shows how to draw an ellipse then says "this
contradicts the Cairo documentation". I don't think it does.
The apparent problem arises from a co-ordinate reference
discrepancy. When the Cairo documentation discusses ellipses, it uses
x,y,w,h to represent the bounding box of the desired ellipse. Thus
the ellipse is centred at x+w/2,y+h/2 and the translate operation
uses that as the new origin. In the Gtkmm tutorial, however, x,y
refers to the centre of the desired ellipse already, and the bounding
box would be x-width/2,y-height/2,width,height.
If you take this context difference into account, both examples do
the same thing. I would suggest, therefore, that the "This
contradicts" wording be changed to something like "This looks
different to the official Cairo documentation because we are defining
our desired position differently. They do the same thing in
reality."
Terribly late reply!
I found this note from April 2011 when I was looking for something else.
I corrected this text in the gtkmm tutorial in September.
http://developer.gnome.org/gtkmm-tutorial/3.2/sec-cairo-drawing-arcs.html.en
My correction is not exactly as you suggested, but I'm convinced that
it's correct. When I was working with the tutorial, I did not remember
having seen your note. Obviously I did not pay due attention to it when
you posted it.
Kjell
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list