diff options
| author | Manolo Gouy <Manolo> | 2017-06-21 16:08:32 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-06-21 16:08:32 +0000 |
| commit | 93a99431ed1e4889a103f7bcccf4f498f05f5139 (patch) | |
| tree | 4041d5ee7dbd4f782397c9760a679f24a9136f26 /src/Fl_Graphics_Driver.cxx | |
| parent | fa3d8c6259c0326df980f0347a23b68d0620ea92 (diff) | |
Move line_width_ protected member variable from Fl_Xlib_Graphics_Driver to Fl_Scalable_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12269 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index ab3f1e499..4c992302e 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -187,6 +187,7 @@ void Fl_Graphics_Driver::uncache_pixmap(fl_uintptr_t p) { #ifndef FL_DOXYGEN Fl_Scalable_Graphics_Driver::Fl_Scalable_Graphics_Driver() : Fl_Graphics_Driver() { scale_ = 1; + line_width_ = 0; } void Fl_Scalable_Graphics_Driver::rect(int x, int y, int w, int h) @@ -438,7 +439,9 @@ void Fl_Scalable_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a } void Fl_Scalable_Graphics_Driver::line_style(int style, int width, char* dashes) { - line_style_unscaled(style, width * scale_, dashes); + if (width == 0) line_width_ = scale_ < 2 ? 0 : scale_; + else line_width_ = width>0 ? width*scale_ : -width*scale_; + line_style_unscaled(style, line_width_, dashes); } void Fl_Scalable_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { |
