STR #1764

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]

STR #1764

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Unassigned
Summary:FLTK2.0 should support some form of DrawContext
Version:2.0-feature
Created By:gga
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files


Trouble Report Comments:

Post Text ]
Name/Time/Date Text top right image
 
#1 gga
04:03 Aug 06, 2007
Currently, all draw functions in FLTK operate under a global context, on top of the current active widget.

This is highly problematic.

FLTK's draw functions should be allowed to function on top of a context class.  Thus, instead of:
       fltk::drawline  or fltk::drawtext
you'd have:
       dc.draw_line() and dc.draw_text()

This would allow you to inherit from the base DeviceContext class to create your own device context.

For example, it is often needed to have the draw functions work with printing or to have the drawing happen to an off-screen buffer or to an fltk::Image so a separate thread can create or update images.

Also, this would make fltk's code much more multithread friendly, as you could have a draw matrix per context, for example.

This is also needed as some GUI toolkits (X11, for example), now allow updating stuff outside of the main thread.

Currently, FLTK's design makes all this quite impossible without creating different function names for all the same drawing routines.
 
 
#2 fabien
12:27 Feb 22, 2008
interesting point for a potential feature to study in next version probably...  
bottom left image   bottom right image

Return to Bugs & Features | Post Text | Post File ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.