From a18f4ea75b43b4be130caf02e2a03e8d6570ce2f Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 3 Jul 2003 08:22:44 +0000 Subject: [PATCH] Added XrMatrixGetAffine --- ChangeLog | 3 +++ src/Xr.h | 6 ++++++ src/xrmatrix.c | 13 +++++++++++++ 3 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index da54b159e..6283f9782 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-07-03 Carl Worth + * src/xrmatrix.c (XrMatrixGetAffine): Added XrMatrixGetAffine + (from Soorya Kuloor) + * src/xr.c (XrGetAlpha): Added XrGetAlpha (XrGetRGBColor): Added XrGetRGBColor diff --git a/src/Xr.h b/src/Xr.h index 9799679b2..6462e10e2 100644 --- a/src/Xr.h +++ b/src/Xr.h @@ -443,6 +443,12 @@ XrMatrixSetAffine (XrMatrix *xrs, double c, double d, double tx, double ty); +XrStatus +XrMatrixGetAffine (XrMatrix *matrix, + double *a, double *b, + double *c, double *d, + double *tx, double *ty); + XrStatus XrMatrixTranslate (XrMatrix *matrix, double tx, double ty); diff --git a/src/xrmatrix.c b/src/xrmatrix.c index c4b38641b..856ccf726 100644 --- a/src/xrmatrix.c +++ b/src/xrmatrix.c @@ -104,6 +104,19 @@ XrMatrixSetAffine (XrMatrix *matrix, return XrStatusSuccess; } +XrStatus +XrMatrixGetAffine (XrMatrix *matrix, + double *a, double *b, + double *c, double *d, + double *tx, double *ty) +{ + *a = matrix->m[0][0]; *b = matrix->m[0][1]; + *c = matrix->m[1][0]; *d = matrix->m[1][1]; + *tx = matrix->m[2][0]; *ty = matrix->m[2][1]; + + return XrStatusSuccess; +} + XrStatus _XrMatrixSetTranslate(XrMatrix *matrix, double tx, double ty)