From f38d1cf42490a1719a96528143e863b3a4b9f999 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:08:08 +0100 Subject: Documentation: fix outdated statements of quantities being expressed in pixels --- documentation/src/basics.dox | 11 +++++++---- documentation/src/drawing.dox | 14 +++++++++----- documentation/src/osissues.dox | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) (limited to 'documentation/src') diff --git a/documentation/src/basics.dox b/documentation/src/basics.dox index 418533ec8..e875108ab 100644 --- a/documentation/src/basics.dox +++ b/documentation/src/basics.dox @@ -95,14 +95,17 @@ Fl_Widget(x, y, width, height, label) The \p x and \p y parameters determine where the widget or window is placed on the screen. In FLTK the top left corner of the window or screen is the origin -(i.e. x = 0, y = 0) -and the units are in pixels. +(i.e. x = 0, y = 0). The \p width and \p height parameters determine -the size of the widget or window in pixels. The maximum widget +the size of the widget or window. The maximum widget size is typically governed by the underlying window system or hardware. +\ref drawing_DrawingUnit describes the unit FLTK employs for +x, y, width, and \c height, and more generally, for +all graphical quantities. + \p label is a pointer to a character string to label the widget with or \p NULL. If not specified the label defaults to \p NULL. The label string must be in static @@ -170,7 +173,7 @@ The \p labelfont() method sets the typeface and style that is used for the label, which for this example we are using \p FL_BOLD and \p FL_ITALIC. -The \p labelsize() method sets the height of the font in pixels. +The \p labelsize() method sets the height of the font in FLTK units. The \p labeltype() method sets the type of label. FLTK supports normal, embossed, diff --git a/documentation/src/drawing.dox b/documentation/src/drawing.dox index bf7c03717..e70f12e76 100644 --- a/documentation/src/drawing.dox +++ b/documentation/src/drawing.dox @@ -35,7 +35,7 @@ these will operate on the new current drawing surface; Fl_Surface_Device::pop_current(). -\section drawing_DrawingUnit What Drawing Units Do FLTK Drawing Functions Use? +\section drawing_DrawingUnit What Units Do FLTK Functions Use? Before version 1.4 all graphical quantities used by FLTK were in pixel units: a window of width 500 units was 500 pixels wide, a line of length 10 units was @@ -54,8 +54,11 @@ a twice higher DPI. If the first screen's scale factor is set to 1 and that of t second screen to 2, the GUI of any FLTK app appears equally sized on the two screens. FLTK uses several units to measure graphical elements: -