X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb3a0d420a58658bffb26e9d7430f292c2d639d6..c3a58b249e576b73b01cd74deb1cf879aa6e1975:/src/msw/graphics.cpp?ds=sidebyside diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index d7b1c86969..ff3313993a 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -175,6 +175,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(); @@ -766,6 +770,20 @@ void wxGDIPlusMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d, m_matrix->SetElements(a,b,c,d,tx,ty); } +// gets the component valuess of the matrix +void wxGDIPlusMatrixData::Get(wxDouble* a, wxDouble* b, wxDouble* c, + wxDouble* d, wxDouble* tx, wxDouble* ty) const +{ + REAL elements[6]; + m_matrix->GetElements(elements); + if (a) *a = elements[0]; + if (b) *b = elements[1]; + if (c) *c = elements[2]; + if (d) *d = elements[3]; + if (tx) *tx= elements[4]; + if (ty) *ty= elements[5]; +} + // makes this the inverse matrix void wxGDIPlusMatrixData::Invert() {