author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年10月15日 13:11:54 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年10月15日 13:11:54 +0200 |
commit | 137e4d264c73b3087a5d0968362c5b9ca3108f2d (patch) | |
tree | a80691d187615ec2e63f25182be7895b9a8a313f /agg-plot/utils.cpp | |
parent | 7d157c5bd8ddf920094907a35c9329ce0688e3d4 (diff) | |
download | gsl-shell-137e4d264c73b3087a5d0968362c5b9ca3108f2d.tar.gz |
-rw-r--r-- | agg-plot/utils.cpp | 14 |
diff --git a/agg-plot/utils.cpp b/agg-plot/utils.cpp index eb0e908a..c1554d46 100644 --- a/agg-plot/utils.cpp +++ b/agg-plot/utils.cpp @@ -7,17 +7,17 @@ agg::trans_affine identity_matrix; void trans_affine_compose (agg::trans_affine& a, const agg::trans_affine& b) { - double a_tx = a.tx, a_ty = a.ty; + double a_tx = a.tx, a_ty = a.ty; - a.premultiply(b); + a.premultiply(b); - a.tx = b.sx * a_tx + b.shx * a_ty + b.tx; - a.ty = b.shy * a_tx + b.sy * a_ty + b.ty; + a.tx = b.sx * a_tx + b.shx * a_ty + b.tx; + a.ty = b.shy * a_tx + b.sy * a_ty + b.ty; } agg::trans_affine affine_matrix(const agg::rect_i& r) { - double w = r.x2 - r.x1, h = r.y2 - r.y1; - double tx = r.x1, ty = r.y1; - return agg::trans_affine(w, 0.0, 0.0, h, tx, ty); + double w = r.x2 - r.x1, h = r.y2 - r.y1; + double tx = r.x1, ty = r.y1; + return agg::trans_affine(w, 0.0, 0.0, h, tx, ty); } |