mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
Documentation: homogenize to 'scale factor' and 'drawing unit'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12737 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -225,7 +225,7 @@ public:
|
|||||||
Fl_Graphics_Driver();
|
Fl_Graphics_Driver();
|
||||||
virtual ~Fl_Graphics_Driver() {} ///< Destructor
|
virtual ~Fl_Graphics_Driver() {} ///< Destructor
|
||||||
static Fl_Graphics_Driver &default_driver();
|
static Fl_Graphics_Driver &default_driver();
|
||||||
/** Current scale factor between FLTK and graphical coordinates: graphical = FLTK * scale() */
|
/** Current scale factor between FLTK and drawing units: drawing = FLTK * scale() */
|
||||||
float scale() { return scale_; }
|
float scale() { return scale_; }
|
||||||
/** Return whether the graphics driver can do alpha blending */
|
/** Return whether the graphics driver can do alpha blending */
|
||||||
virtual char can_do_alpha_blending() { return 0; }
|
virtual char can_do_alpha_blending() { return 0; }
|
||||||
|
|||||||
@@ -1154,6 +1154,10 @@ void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen osrc, int srcx,
|
|||||||
Copy a rectangular area of the size \p w*h from \p srcx,srcy
|
Copy a rectangular area of the size \p w*h from \p srcx,srcy
|
||||||
in the offscreen buffer into the current drawing surface at \p x,y.
|
in the offscreen buffer into the current drawing surface at \p x,y.
|
||||||
|
|
||||||
|
void fl_scale_offscreen(Fl_Offscreen &osrc)
|
||||||
|
\par
|
||||||
|
Adapts the offscreen's size in pixels to a changed value of the scale factor
|
||||||
|
while keeping the offscreen's graphical content.
|
||||||
|
|
||||||
\htmlonly
|
\htmlonly
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -186,9 +186,12 @@ void fl_end_offscreen() {
|
|||||||
Fl_Surface_Device::pop_current();
|
Fl_Surface_Device::pop_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adapts an offscreen buffer to a changed value of the graphical scaling factor.
|
/** Adapts an offscreen buffer to a changed value of the scale factor.
|
||||||
The \p ctx argument must have been created by fl_create_offscreen()
|
The \p ctx argument must have been created by fl_create_offscreen()
|
||||||
and the calling context must not be between fl_begin_offscreen() and fl_end_offscreen().
|
and the calling context must not be between fl_begin_offscreen() and fl_end_offscreen().
|
||||||
|
The graphical content of the offscreen is preserved. The current scale factor
|
||||||
|
value is given by <tt>Fl_Graphics_Driver::default_driver().scale()</tt>.
|
||||||
|
\version 1.4
|
||||||
*/
|
*/
|
||||||
void fl_scale_offscreen(Fl_Offscreen &ctx) {
|
void fl_scale_offscreen(Fl_Offscreen &ctx) {
|
||||||
int i, w, h;
|
int i, w, h;
|
||||||
|
|||||||
Reference in New Issue
Block a user