Doxygen: rewording for more clarity.

This commit is contained in:
ManoloFLTK
2019-04-14 09:27:41 +02:00
parent a65d7818be
commit 0f6cbd1cda
2 changed files with 9 additions and 9 deletions
+6 -6
View File
@@ -209,9 +209,9 @@ public:
/** Gives the window width in OpenGL pixels.
When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::w()
which is expressed in FLTK units, may differ from the window width in pixels.
Calls to OpenGL functions expecting pixel values (e.g., glViewport) must therefore
use this method rather than method w().
This method detects when the GUI is rescaled or when the window has been moved
Calls to OpenGL functions expecting pixel values (\em e.g., \c glViewport) should therefore
use pixel_w() rather than w().
Method pixel_w() detects when the GUI is rescaled or when the window has been moved
between low and high resolution displays and automatically adjusts the returned value.
\version 1.3.4
*/
@@ -219,9 +219,9 @@ public:
/** Gives the window height in OpenGL pixels.
When an Fl_Gl_Window is mapped to a HighDPI display, the value given by Fl_Gl_Window::h()
which is expressed in FLTK units, may differ from the window height in pixels.
Calls to OpenGL functions expecting pixel values (e.g., glViewport) must therefore
use this method rather than method h().
This method detects when the GUI is rescaled or when the window has been moved
Calls to OpenGL functions expecting pixel values (\em e.g., \c glViewport) should therefore
use pixel_h() rather than h().
Method pixel_h() detects when the GUI is rescaled or when the window has been moved
between low and high resolution displays and automatically adjusts the returned value.
\version 1.3.4
*/
+3 -3
View File
@@ -185,13 +185,13 @@ HighDPI displays (including the so-called 'retina' displays of Apple
hardware) are supported by FLTK in such a way that 1 unit of an FLTK
quantity (say, the value given by Fl_Gl_Window::w()) corresponds to more
than 1 pixel on the display. Conversely, when a program specifies the width and height of the
OpenGL viewport, it is necessary to use an API that returns quantities expressed in pixels
as follows:
OpenGL viewport, it is necessary to use an API that returns quantities expressed in pixels.
That can be done as follows:
\code
Fl_Gl_Window *glw = ...;
glViewport(0, 0, glw->pixel_w(), glw->pixel_h());
\endcode
which makes use of the Fl_Gl_Window::pixel_w() and Fl_Gl_Window::pixel_h() functions giving
which makes use of the Fl_Gl_Window::pixel_w() and Fl_Gl_Window::pixel_h() methods giving
the size in pixels of an Fl_Gl_Window that is potentially mapped to a HighDPI display.
Method Fl_Gl_Window::pixels_per_unit() can also be useful in this context.
\note A further coding rule is necessary to properly support retina displays