FLTK logo

STR #905

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 1.1 | SVN ⇄ GIT ]

STR #905

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Wrong drawing of filled circles
Version:1.1-current
Created By:Portale
Assigned To:matt
Fix Version:1.1.7 (SVN: v4449)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 Portale
16:23 Jun 08, 2005
Fl_Dial_different_on_platforms.png
3k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 Portale
16:23 Jun 08, 2005
The Fl_dials look different on the different platforms. While on X/Linux, they are nice and filled, on windows and OSX, the filling is not fitting into the outline.

See screenshot.

There are three locations in the code, where obviosly some tweaking was done:

fl_oval_box.cxx, fl_oval_box() [line 46]:
   fl_oval_flat_box(x,y,w-1,h-1,c);

Fl_Dial.cxx, Fl_Dial::draw() [line 48]:
   fl_pie(X, Y, W-1, H-1, 270-a1, angle > a1 ? 360+270-angle : 270-360-angle);

Fl_Dial.cxx, Fl_Dial::draw() [line 50]:
   fl_pie(X, Y, W-1, H-1, 270-angle, 270-a1);

Removing all those "-1"s, makes the Fl_Dials look fine on Windows and OSX.

Since it is 1 versus 2 and the tweaks are in favor of the one, it seems that drawing filled circles is wrong on X? Maybe the "-1" should only be in the call of XFillArc call in fl_circle()?

The outlines are the same on all platforms by the way.
 
 
#2 Portale
16:29 Jun 08, 2005
What I forgot: the screenshots show the Fl_Fill_dial, which actually uses fl_arc. In order to fix the problem for window/mac, only the second two code lines in Fl_Dial.cxx that I listed had to be modified.

The Fl_Line_Dial (not on the screenshot) is corrected by the change of the line in fl_oval_box.cxx.
 
 
#3 Portale
16:58 Jun 13, 2005
Another example for an obvious tweak: removing the "-1" from
  frame_round(x, y, w, h-1, "IJLM", c);
in
  down_round(..), fl_plastic.cxx

makes the fl_round_button look round on windows.
 
 
#4 Portale
16:59 Jun 13, 2005
makes the fl_round_button look round on windows...

...in plastic mode.
 
 
#5 matt
05:14 Jul 20, 2005
I "fixed" fl_pie on OS X Quickdraw to draw the same as the X11 implementation. In FLTK2, we will make sure that fl_pie, fl_arc and fl_rect all draw the same on all platforms. Still need to fix Win32  
 
#6 matt
14:52 Jul 23, 2005
Same kind of "fix" for Win32. Now everything behaves like the original X11 code.  
     

Return to Bugs & Features ]

 
 

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'.