Re: Cairo::Context CTM and DrawingArea::on_draw()



Thanks a lot!
Jody

On Fri, Feb 22, 2013 at 4:08 PM, Kjell Ahlstedt
<kjell ahlstedt bredband net> wrote:
2013-02-22 15:24, jody skrev:

Hi

Does anybody know what the Current Transformation Matrix (CTM) is for
the Cairo::Context i get from
   virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);

Is there a way to look at the elements of a Cairo::Matrix?

Thank You
   Jody

Cairo::Context contains the methods

  void get_matrix(Matrix& matrix);
  void get_matrix(cairo_matrix_t& matrix);
  Matrix get_matrix() const;

Cairo::Matrix derives from cairo_matrix_t,

class Matrix : public cairo_matrix_t
{
............
};

and cairo_matrix_t is an open struct,

typedef struct _cairo_matrix {
    double xx; double yx;
    double xy; double yy;
    double x0; double y0;
} cairo_matrix_t;

Kjell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]