FLTK logo

STR #3002

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

STR #3002

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:MacOS
Summary:display thin horizontal lines across a Fl_Text_Editor area
Version:1.3.2
Created By:cagr
Assigned To:manolo
Fix Version:1.3.3
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 cagr
02:35 Dec 12, 2013
Capture.png
0.3M
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 cagr
09:31 Nov 10, 2013
Hello,

since I switched to mavericks, the Fl_Text_Editor presents a weird behavior. When I display a Fl_Text_editor window, some very thin horizontal lines appear across the whole window area. They are spaced one from the others along the chosen font size as in a notebook.
I use the last incarnation of fltk 1.3.x, which solved the other problem about the font warning.

Claude
 
 
#2 manolo
09:19 Nov 13, 2013
I see none of that here on mavericks using the editor test program.
Can the OP post how to reproduce the problem?
 
 
#3 cagr
02:30 Dec 12, 2013
hello,

Sorry for the delay, but it took me quite a while to find both time and machines to test the problem I described in a previous mail. So I tried the "editor" program on different machines with Mavericks and I could not reproduce the problem. The only machine I still have this problem with is my own, which is a bit unfortunate I should say. I use a Mac pro retina 2013 (last version not the early one), with two graphic cards, and I guess there is an interpolation problem somewhere at stake. I tried with all possible  resolutions but to no avail. I still have some weird lines crossing the whole edition window. However, it seems that the problem is related to font size. With certain sizes the lines disappear but there are still pixel "blotches" all over the edition area that are not cleaned during refresh. The effect is rather unpleasant.
Thank you very much for your time.
 
 
#4 cagr
02:36 Dec 12, 2013
I have added a screenshot of the editor program as it displays on my screen  
 
#5 cagr
04:04 Dec 15, 2013
Hello again,

I finally decided to have a look in the code, and I managed to find a fix, so to call, in FLTK.

In fl_rect.cxx, in the function void Fl_Graphics_Driver::rectf(int x, int y, int w, int h);

I replaced the line:
    CGRect  rect = CGRectMake(x, y, w - 0.9 , h - 0.9);

by the line
    CGRect  rect = CGRectMake(x, y, w - 0.1 , h - 0.1);

The result is now what I expect...

However, I must recognize that I have little if no idea why it works. I guess it has to do with how characters and cursors are cleaned and redrawn. However with these values, it works fine.

Thanks again for your library
 
 
#6 cagr
05:01 Dec 15, 2013
Actually, I still had some pixels left by the cursor, so:

    CGRect  rect = CGRectMake(x, y - 0.1, w , h);
 
 
#7 greg.ercolano
09:15 Dec 15, 2013
That's great you found a fix..

Would like to see Manolo's input on this, as I know he's
been working on the Fl_Graphics_Driver code and the
fltk <-> OSX Cocoa interface:

$ svn praise fl_rect.cxx | grep CGRectMake
  3788 matthiaswm   CGRect rect = CGRectMake(x, y, w-1, h-1);
  9074     manolo   CGRect  rect = CGRectMake(x, y, w - 0.9 , h - 0.9);
  8572     manolo   CGContextFillRect(fl_gc, CGRectMake(x - 0.5, y - 0.5, 1, 1) );
  7351       matt   CGRect u = CGRectMake(0,0,0,0);

I purposefully used 'svn praise' here :D We love manolo's additions..
 
 
#8 ianmacarthur
15:05 Sep 04, 2014
Do we have a view on this one?

FWIW, I don't see this on Mavericks either... It seems like just that one machine the OP has! Weird.

Particularly strange because what we are doing seems right to me, so far as I can tell.

Do not know. Manolo probably knows better!
 
 
#9 manolo
00:50 Dec 11, 2014
Fixed in Subversion repository.

Claude ommitted to mention he/she was using a computer with a
'retina' display (this means 1 graphics unit = 2 pixels,
or, in other words, 4 pixels behind each 1-unit square).
The horizontal lines did appear on retina displays with FLTK 1.3.2,
but that is fixed in FLTK 1.3.3
 
     

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