Improve docu of member variable Fl_SVG_Image::proportional - cont'd (#1361)
This commit is contained in:
parent
4644521f8c
commit
d30ca18664
@ -31,10 +31,12 @@ struct NSVGimage;
|
|||||||
if the file could not be opened or read, and ERR_FORMAT if the SVG format could not be decoded.
|
if the file could not be opened or read, and ERR_FORMAT if the SVG format could not be decoded.
|
||||||
If the image has loaded correctly, w(), h(), and d() should return values greater than zero.
|
If the image has loaded correctly, w(), h(), and d() should return values greater than zero.
|
||||||
|
|
||||||
|
Member \ref proportional of an Fl_SVG_Image object must be set to \c false to allow the image
|
||||||
|
object to be rasterized with an altered aspect ratio.
|
||||||
|
|
||||||
Rasterization is not done until the image is first drawn or resize() or normalize() is called. Therefore,
|
Rasterization is not done until the image is first drawn or resize() or normalize() is called. Therefore,
|
||||||
\ref array is NULL until then. The delayed rasterization ensures an Fl_SVG_Image is always rasterized
|
\ref array is NULL until then. The delayed rasterization ensures an Fl_SVG_Image is always rasterized
|
||||||
to the exact screen resolution at which it is drawn. Member \ref proportional of an Fl_SVG_Image object
|
to the exact screen resolution at which it is drawn.
|
||||||
must be set to \c false to allow this image to be rasterized with an altered aspect ratio.
|
|
||||||
|
|
||||||
The Fl_SVG_Image class draws images computed by \c nanosvg with the following known limitations
|
The Fl_SVG_Image class draws images computed by \c nanosvg with the following known limitations
|
||||||
|
|
||||||
|
|||||||
@ -274,6 +274,8 @@ Fl_RGB_Scaling Fl_Image::RGB_scaling() {
|
|||||||
data_w() and data_h(), respectively
|
data_w() and data_h(), respectively
|
||||||
\note This function generally changes the values returned by the w() and h() member functions.
|
\note This function generally changes the values returned by the w() and h() member functions.
|
||||||
In contrast, the values returned by data_w() and data_h() remain unchanged.
|
In contrast, the values returned by data_w() and data_h() remain unchanged.
|
||||||
|
\note If the processed image is an Fl_SVG_Image, setting \ref Fl_SVG_Image::proportional
|
||||||
|
to \c false is required if \p proportional here is null.
|
||||||
\version 1.4 (1.3.4 and FL_ABI_VERSION for Fl_Shared_Image only)
|
\version 1.4 (1.3.4 and FL_ABI_VERSION for Fl_Shared_Image only)
|
||||||
|
|
||||||
Example code: scale an image to fit in a box
|
Example code: scale an image to fit in a box
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user