Documentation: homogenize uses of "FLTK units" and "drawing units".

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2018-03-11 07:17:20 +00:00
parent 67fc24f3d2
commit 7ab977ac86
3 changed files with 13 additions and 14 deletions

View File

@ -30,14 +30,13 @@ Fl_Image_Surface_Driver *Fl_Image_Surface_Driver::newImageSurfaceDriver(int w, i
/** Constructor with optional high resolution.
\param w and \param h set the size of the resulting image. The value of the \p high_res
parameter controls whether \p w and \p h are interpreted as pixel or drawing units.
parameter controls whether \p w and \p h are interpreted as pixel or FLTK units.
\param high_res If zero, the created image surface is sized at \p w x \p h pixels.
If non-zero, the pixel size of the created image surface follows
the value of the display scaling factor (see Fl_Graphics_Driver::scale()). This gives
the created image surface the same number of pixels as an area of the display of size
\p w x \p h expressed in drawing units. On the Mac OS platform, the image surface pixel
size is always twice as high and wide as \p w and \p h.
If non-zero, the pixel size of the created image surface depends on
the value of the display scale factor (see Fl_Graphics_Driver::scale()):
the resulting image has the same number of pixels as an area of the display of size
\p w x \p h expressed in FLTK units.
If \p highres is non-zero, always use Fl_Image_Surface::highres_image() to get the image data.
\param pixmap Is used internally by FLTK; applications just use its default value.
@ -94,7 +93,7 @@ Fl_RGB_Image *Fl_Image_Surface::image() {
/** Returns a possibly high resolution image made of all drawings sent to the Fl_Image_Surface object.
The Fl_Image_Surface object should have been constructed with Fl_Image_Surface(W, H, 1).
The returned Fl_Shared_Image object is scaled to a size of WxH drawing units and may have a
The returned Fl_Shared_Image object is scaled to a size of WxH FLTK units and may have a
pixel size larger than these values.
The returned object should be deallocated with Fl_Shared_Image::release() after use.
\version 1.3.4

View File

@ -240,11 +240,11 @@ void Fl_SVG_Image::draw(int X, int Y, int W, int H, int cx, int cy) {
f = Fl::screen_driver()->retina_factor() * fl_graphics_driver->scale();
}
int w1 = w(), h1 = h();
/* When f > 1, there may be several pixels per drawing unit in an area
/* When f > 1, there may be several pixels per FLTK unit in an area
of size w() x h() of the display. This occurs, e.g., with Apple retina displays
and when the display is rescaled.
The SVG is rasterized to the area dimension in pixels. The image is then drawn
scaled to its size expressed in drawing units. With this procedure,
scaled to its size expressed in FLTK units. With this procedure,
the SVG image is drawn using the full resolution of the display.
*/
resize(f*w(), f*h());

View File

@ -376,12 +376,12 @@ void Fl_Shared_Image::draw(int X, int Y, int W, int H, int cx, int cy) {
/** Sets the drawing size of the shared image.
This function gives the shared image its own size, independently from the size of the original image
that is typically larger.
This can be useful to draw a shared image on a drawing surface whose resolution is higher
than the drawing unit for this surface: all pixels of the original image become available to fill
an area of the drawing surface sized at <tt>width,height</tt>.
Examples of such drawing surfaces: laser printers, PostScript files, PDF printers, HiDPI displays.
This can be useful to draw a shared image on a drawing surface with more than 1 pixel per
FLTK unit: all pixels of the original image become available to fill an area of the drawing surface
sized at <tt>width,height</tt> FLTK units.
Examples of such drawing surfaces: HiDPI displays, laser printers, PostScript files, PDF printers.
\param width,height maximum width and height (in drawing units) to use when drawing the shared image
\param width,height maximum width and height (in FLTK units) to use when drawing the shared image
\param proportional if not null, keep the width and height of the shared image proportional to those of its original image
\param can_expand if null, the width and height of the shared image will not exceed those of the original image