summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Graphics_Driver.cxx6
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.H1
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx1
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx1
4 files changed, 4 insertions, 5 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index 4f69967d6..9ef46f9f3 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -800,6 +800,7 @@ Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
Fl_Scalable_Graphics_Driver::Fl_Scalable_Graphics_Driver() : Fl_Graphics_Driver() {
line_width_ = 0;
fontsize_ = -1;
+ is_solid_ = true;
}
void Fl_Scalable_Graphics_Driver::rect(int x, int y, int w, int h)
@@ -850,7 +851,7 @@ void Fl_Scalable_Graphics_Driver::xyline(int x, int y, int x1) {
int xx1 = (x < x1 ? x1 : x);
if (s != s_int && line_width_ <= s_int) {
int lwidth = this->floor((y+1)) - this->floor(y);
- bool need_change_width = (lwidth != s_int);
+ bool need_change_width = (lwidth != s_int && is_solid_);
void *data = NULL;
if (need_change_width) data = change_pen_width(lwidth);
xyline_unscaled(this->floor(xx), this->floor(y) + int(lwidth/2.f), this->floor(xx1+1)-1);
@@ -870,7 +871,7 @@ void Fl_Scalable_Graphics_Driver::yxline(int x, int y, int y1) {
int yy1 = (y < y1 ? y1 : y);
if (s != s_int && line_width_ <= s_int) {
int lwidth = (this->floor((x+1)) - this->floor(x));
- bool need_change_width = (lwidth != s_int);
+ bool need_change_width = (lwidth != s_int && is_solid_);
void *data = NULL;
if (need_change_width) data = change_pen_width(lwidth);
yxline_unscaled(this->floor(x) + int(lwidth/2.f), this->floor(yy), this->floor(yy1+1) - 1);
@@ -1050,6 +1051,7 @@ void Fl_Scalable_Graphics_Driver::draw_circle(int x0, int y0, int d, Fl_Color c)
void Fl_Scalable_Graphics_Driver::line_style(int style, int width, char* dashes) {
if (width == 0) line_width_ = int(scale() < 2 ? 0 : scale());
else line_width_ = int(width>0 ? width*scale() : -width*scale());
+ is_solid_ = ((style & 0xff) == FL_SOLID && (!dashes || !*dashes));
line_style_unscaled(style, line_width_, dashes);
}
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
index c3449f1c9..01ecf9531 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
@@ -60,7 +60,6 @@ protected:
uchar *mask_bitmap_;
uchar **mask_bitmap() FL_OVERRIDE {return &mask_bitmap_;}
POINT *long_point;
- bool is_solid_;
int style_;
public:
Fl_GDI_Graphics_Driver();
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index bebe6d4e9..97b3244d1 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -96,7 +96,6 @@ Fl_GDI_Graphics_Driver::Fl_GDI_Graphics_Driver() {
long_point = NULL;
depth = -1;
origins = NULL;
- is_solid_ = true;
style_ = FL_SOLID;
}
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx
index 8b2eb47fb..9d086f353 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx
@@ -58,7 +58,6 @@ void Fl_GDI_Graphics_Driver::line_style_unscaled(int style, int width, char* das
DeleteObject(oldpen);
DeleteObject(fl_current_xmap->pen);
fl_current_xmap->pen = newpen;
- is_solid_ = ((style & 0xff) == FL_SOLID && (!dashes || !*dashes));
style_ = style;
}