Add wxGraphicsMatrix::Get

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-12-05 23:42:52 +00:00
parent 474e2ff2c8
commit 248802d010
13 changed files with 374 additions and 1 deletions

View File

@@ -186,6 +186,10 @@ public :
virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
wxDouble tx=0.0, wxDouble ty=0.0);
// gets the component valuess of the matrix
virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const;
// makes this the inverse matrix
virtual void Invert();
@@ -866,6 +870,18 @@ void wxCairoMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d,
cairo_matrix_init( &m_matrix, a, b, c, d, tx, ty);
}
// gets the component valuess of the matrix
void wxCairoMatrixData::Get(wxDouble* a, wxDouble* b, wxDouble* c,
wxDouble* d, wxDouble* tx, wxDouble* ty) const
{
if (a) *a = m_matrix.xx;
if (b) *b = m_matrix.yx;
if (c) *c = m_matrix.xy;
if (d) *d = m_matrix.yy;
if (tx) *tx= m_matrix.x0;
if (ty) *ty= m_matrix.y0;
}
// makes this the inverse matrix
void wxCairoMatrixData::Invert()
{