summaryrefslogtreecommitdiff
path: root/FL/fl_draw.H
AgeCommit message (Collapse)Author
2 dayswi[maxim nikonov
2026-01-03Clarify that a font must be loaded before measuring text (#1356)Albrecht Schlosser
Documentation only: users must load a font with fl_font(face, size) before measuring text with methods like fl_measure(), fl_height(), fl_width(), fl_text_extents() etc.
2025-11-01Add option to uniform line drawing in scaled mode (#167)Matthias Melcher
2025-07-02Remove deprecated methods and functionsAlbrecht Schlosser
In FLTK 1.5 we remove most (but not all) methods and functions that were deprecated in FLTK 1.3 or earlier.
2025-05-14Fix doxygen warningsAlbrecht Schlosser
1. src/Fl_add_idle.cxx: add missing parameter docs 2. FL/fl_draw.H: rename 1st parameter of fl_draw_pixmap(...) from 'data' to 'cdata'. The 2nd warning appears to be caused by a 'friend' declaration in FL/Fl_Graphics_Driver.H, line 98: 'friend FL_EXPORT int fl_draw_pixmap(const char*const* cdata, ...)' This 'friend' declaration seems to "confuse" some (newer?) doxygen versions, definitely doxygen 1.13.2.
2024-11-20Fix fl_draw_image sometimes crashes when window is scaled - cont'd (#1134)ManoloFLTK
2024-11-19Add 2 missing FL_EXPORT qualifiersManoloFLTK
2024-11-19 Fix fl_draw_image sometimes crashes when window is scaled (#1134)ManoloFLTK
2024-10-15Fix documentation typos and trailing whitespaceAlbrecht Schlosser
2024-08-28Fix Doxygen problems with fl_draw() functions.ManoloFLTK
2024-08-14Adding Fl_Widget::label_image_spacing() (#1039)Matthias Melcher
- May need a better method name. - This makes the gap between the image in a label and the label text user settable. - Can be tested using test/label app
2024-08-14Adding gap parameter to fl_draw(...)Matthias Melcher
This allows the user to define the spacing between a possible imge and the text.
2024-07-21Update docs and screenshot for fl_line_style() (#1016)Albrecht Schlosser
As a follow-up to the discussion I used the posted screenshot demo (thanks to Greg), redesigned it using Fl_Grid, and added it as a new test program, including Makefiles and CMakeLists.txt. New file: test/line_style_docs.cxx to create screenshot. Note that the old test/line_style.cxx is not obsolete, it can be used to test the line styles interactively. Docs have been updated in both chapter "Drawing Things" and the function description. Also added the new demo to test/demo.menu under "Images for Manual...".
2024-07-20fl_line_style() diagrams replace ascii art (#1016)Greg Ercolano
2024-07-20fl_line_style() docs refer to the enum (#1016)Greg Ercolano
2024-07-01Documentation: remove implication of concave 3 sided polygons existence (#1000)Cyprinus Carpio
2024-06-21Remove trailing whitespaceAlbrecht Schlosser
no code changes
2024-04-26Box types can now defined and draw their own focus frame, STR 2145, #659Matthias Melcher
2024-04-14Add example to fl_arc docs.Matthias Melcher
2023-12-02Improve contrast of check marks and radio buttons (#443)Albrecht Schlosser
- add fl_draw_radio(...) to standardize radio button drawing - src/Fl_Light_Button.cxx: use fl_contrast() to determine color of radio button and check (light) button check marks, and use new fl_draw_radio() method - src/Fl_Menu.cxx: same as src/Fl_Light_Button.cxx and use fl_draw_check() instead of "manually" drawing the check mark (forgotten in an earlier update)
2023-10-18Fix trailing whitespaceAlbrecht Schlosser
2023-10-16Add virtual void Fl_Graphics_Driver::draw_circle()ManoloFLTK
2023-10-16Doxygen-only: warn when current color is changedManoloFLTK
Also, remove the statement that rectangles are drawn with 1-pixel lines which is wrong with HighDPI displays.
2023-08-26Fixes a bunch of typos in comments.Matthias Melcher
2023-02-06Fix "\todo provide user documentation for fl_set_status function"ManoloFLTK
2023-01-05Refactor drawing small circles: add fl_draw_circle()Albrecht Schlosser
This method can be used to draw small circles as part of the GUI. It is independent of the current scheme. Very small circles are approximated by drawing several rectangles.
2022-11-30Add a unit test for drawing complex shapes (#565)Matthias Melcher
2022-11-24Refactor code to make rounded rectangles accessible (#553)Matthias Melcher
This adds fl_rounded_rect and fl_rounded_rectf so the user can draw rounded rectangles. This uses existing and optimised code that is rearranged.
2022-11-22Refactor and simplify "arrow drawing" in widgetsAlbrecht Schlosser
"Arrows" in widgets are those GUI elements mostly represented by triangles pointing in a particular direction as in scrollbars, choice widgets, some menus, valuators and Fl_Counter widgets. The code has been simplified and standardized such that all these GUI elements are drawn identically per FLTK scheme. Widget authors no longer need to write code to calculate arrow sizes and draw polygons etc. Different schemes can and do implement different drawing functions. Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and src/Fl_Menu.cxx
2022-10-13Document fl_circle() with and w/o complex drawing API (#511)ManoloFLTK
2022-07-05Documentation: add missing mentions of the Wayland platform.ManoloFLTK
2022-01-14Improve focus box drawing and documentationAlbrecht Schlosser
Add new method Fl_Widget::draw_focus(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color bg) ... with background color for correct contrast testing (in Fl_Tabs) Draw the focus box of the "tabs" of Fl_Tabs widgets with the correct boxtype and background color. Make 'unsigned int visible_focus()' const so it can be used in 'const' methods. Do not draw the focus box if the per-widget focus box option is off.
2022-01-07Re-organize cross-platform support for text input methods.ManoloFLTK
FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms (X11, Windows, macOS). This support has an interface with FLTK that is common for X11 and Windows, via (undocumented) functions fl_set_spot(), fl_set_status() and fl_reset_spot(). In contrast, and because it's been developed independently, the interface between the macOS TIM and FLTK 1.3 is completely different : static functions FL::insertion_point_location() and Fl::reset_marked_text(). The present change implements a single TIM/FLTK interface used by all platforms based on functions fl_set_spot() and fl_reset_spot(). The previous macOS-specific functions FL::insertion_point_location() and Fl::reset_marked_text() are maintained only for compatibility with 1.3 and deprecated.
2021-11-16Add use of fl_capture_window() by test/deviceManoloFLTK
Also, rename fl_capture_window_part() to fl_capture_window().
2021-11-16Add rectangle drawing functions with Fl_RectAlbrecht Schlosser
2021-11-16Reformat to FLTK style, improve documentationAlbrecht Schlosser
No code changes. Replace '#define fl_clip ..' with an inline method.
2021-11-15Add fl_draw_check() to draw better check marks (issue #68)Albrecht Schlosser
This new function can and should be used to draw check marks in widgets that need it, e.g. Fl_Check_Browser (issue #68) and Fl_Check_Button.
2021-05-31Windows platform: use GDI+ to antialias oblique lines and curves.ManoloFLTK
2021-05-28New virtual member function Fl_Graphics_Driver::colored_rectf().ManoloFLTK
2021-02-27Rename fl_remove_scale() to fl_override_scale() as discussed in fltk.generalManoloFLTK
Re: Can custom box type functions handle their own high-DPI screen scaling?
2021-02-25Add fl_remove_scale()/fl_restore_scale() to transiently draw without scaling ↵ManoloFLTK
factor. This new API is a response to this message in fltk.general : Can custom box type functions handle their own high-DPI screen scaling?
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-04-26Doc: more detail about fl_clip_region() when drawing elsewhere than on the ↵ManoloFLTK
display
2020-02-03Move fl_font(face, size) to fl_draw.cxxAlbrecht Schlosser
I believe this is a better place. Also: add FL_EXPORT since it's no longer inline.
2020-02-03Fix regression calling fl_font() w/o draw contextAlbrecht Schlosser
According to the documentation fl_font(face, size) may be called "outside a draw context if necessary to call fl_width()". This worked in 1.3.5 but did not in 1.4 (so far). I reworded the docs to make clear that other measurement functions can be called as well and refactored the code to make sure that fl_font(face, size) will open the display if necessary.
2020-01-20Improve documentation of clipping functionsAlbrecht Schlosser
Clarify functionality of fl_not_clipped() and fl_clip_box(). Add developer documentation for Fl_Graphics_Driver::clip_box(). Documentation only, no code changes in this commit.
2019-04-09Add public function Fl_RGB_Image *fl_capture_window_part()ManoloFLTK
In the context of HighDPI screens, the API of function fl_read_image() is inadequate because a rectangle of size WxH drawing units of a window may contain many more than W*H pixels. Function fl_capture_window_part() returns an Fl_RGB_Image object whose drawing size matches the size of the rectangle and whose data size matches the, possibly larger, size in pixels of the corresponding area of the mapped window.
2018-08-04Have the Doxygen doc of fl_draw_pixmap() show the default value of the last ↵Manolo Gouy
argument. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24Added separate diagram for fl_arc(x,y,r,a1,a2) (very different from ↵Greg Ercolano
fl_arc(x,y,w,h,a1,a2)) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24Extra refs for fl_pie/fl_arc diagrams..Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121