diff options
| author | Manolo Gouy <Manolo> | 2011-02-18 17:22:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-18 17:22:43 +0000 |
| commit | f5f0cf99084feba5545e8444abc6e61d1142a7c8 (patch) | |
| tree | 3071b29b37c9c11a35cb73b65e6d825ff5695832 /src/fl_vertex.cxx | |
| parent | 199b32d9213584e232aee11d2a4d16a26f1d508d (diff) | |
Added scale(), translate(), and rotate() functions to the Fl_Graphics_Driver class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_vertex.cxx')
| -rw-r--r-- | src/fl_vertex.cxx | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index bb123e9a0..478d85474 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -69,29 +69,7 @@ void Fl_Graphics_Driver::mult_matrix(double a, double b, double c, double d, dou m = o; } -/** - Concatenates scaling transformation onto the current one. - \param[in] x,y scale factors in x-direction and y-direction -*/ -void fl_scale(double x,double y) {fl_mult_matrix(x,0,0,y,0,0);} - -/** - Concatenates scaling transformation onto the current one. - \param[in] x scale factor in both x-direction and y-direction -*/ -void fl_scale(double x) {fl_mult_matrix(x,0,0,x,0,0);} - -/** - Concatenates translation transformation onto the current one. - \param[in] x,y translation factor in x-direction and y-direction -*/ -void fl_translate(double x,double y) {fl_mult_matrix(1,0,0,1,x,y);} - -/** - Concatenates rotation transformation onto the current one. - \param[in] d - rotation angle, counter-clockwise in degrees (not radians) -*/ -void fl_rotate(double d) { +void Fl_Graphics_Driver::rotate(double d) { if (d) { double s, c; if (d == 0) {s = 0; c = 1;} @@ -99,7 +77,7 @@ void fl_rotate(double d) { else if (d == 180) {s = 0; c = -1;} else if (d == 270 || d == -90) {s = -1; c = 0;} else {s = sin(d*M_PI/180); c = cos(d*M_PI/180);} - fl_mult_matrix(c,-s,s,c,0,0); + mult_matrix(c,-s,s,c,0,0); } } |
