From f5f0cf99084feba5545e8444abc6e61d1142a7c8 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 18 Feb 2011 17:22:43 +0000 Subject: 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 --- FL/fl_draw.H | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'FL/fl_draw.H') diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 1211c44a7..b3e4a31ed 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -333,10 +333,26 @@ inline void fl_push_matrix() { fl_graphics_driver->push_matrix(); }; Restores the current transformation matrix from the stack. */ inline void fl_pop_matrix() { fl_graphics_driver->pop_matrix(); }; -FL_EXPORT void fl_scale(double x, double y); -FL_EXPORT void fl_scale(double x); -FL_EXPORT void fl_translate(double x, double y); -FL_EXPORT void fl_rotate(double d); +/** + Concatenates scaling transformation onto the current one. + \param[in] x,y scale factors in x-direction and y-direction + */ +inline void fl_scale(double x, double y) { fl_graphics_driver->scale(x, y); }; +/** + Concatenates scaling transformation onto the current one. + \param[in] x scale factor in both x-direction and y-direction + */ +inline void fl_scale(double x) { fl_graphics_driver->scale(x, x); }; +/** + Concatenates translation transformation onto the current one. + \param[in] x,y translation factor in x-direction and y-direction + */ +inline void fl_translate(double x, double y) { fl_graphics_driver->translate(x, y); }; +/** + Concatenates rotation transformation onto the current one. + \param[in] d - rotation angle, counter-clockwise in degrees (not radians) + */ +inline void fl_rotate(double d) { fl_graphics_driver->rotate(d); }; /** Concatenates another transformation onto the current one. -- cgit v1.2.3