mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
Fl_Text_Display: avoid blinking by painting the full widget background only to the printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8466 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
#include <FL/Fl_Text_Buffer.H>
|
#include <FL/Fl_Text_Buffer.H>
|
||||||
#include <FL/Fl_Text_Display.H>
|
#include <FL/Fl_Text_Display.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
|
#include <FL/Fl_Printer.H>
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
@@ -3359,8 +3360,10 @@ void Fl_Text_Display::draw(void) {
|
|||||||
// draw the non-text, non-scrollbar areas.
|
// draw the non-text, non-scrollbar areas.
|
||||||
if (damage() & FL_DAMAGE_ALL) {
|
if (damage() & FL_DAMAGE_ALL) {
|
||||||
// printf("drawing all (box = %d)\n", box());
|
// printf("drawing all (box = %d)\n", box());
|
||||||
// draw the background
|
if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) {
|
||||||
fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() );
|
// if to printer, draw the background
|
||||||
|
fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() );
|
||||||
|
}
|
||||||
// draw the box()
|
// draw the box()
|
||||||
int W = w(), H = h();
|
int W = w(), H = h();
|
||||||
draw_box(box(), x(), y(), W, H, color());
|
draw_box(box(), x(), y(), W, H, color());
|
||||||
|
|||||||
Reference in New Issue
Block a user