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 | |
| 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')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 5 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 1 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx | 3 |
4 files changed, 4 insertions, 6 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) { diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H index 2bc5aac50..7930e39fc 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H @@ -93,7 +93,6 @@ protected: int p_size; typedef struct {short x, y;} XPOINT; XPOINT *p; - int line_width_; int clip_x(int x); #if USE_XFT static Window draw_window; diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx index b446a1fd8..53bedc2ce 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx @@ -56,7 +56,6 @@ Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) { mask_bitmap_ = NULL; p_size = 0; p = NULL; - line_width_ = 0; line_delta_ = 0; #if USE_PANGO pfd_ = pango_font_description_new(); diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx index 6629d7bfa..1fe4d5a0b 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx @@ -35,9 +35,6 @@ #include "Fl_Xlib_Graphics_Driver.H" void Fl_Xlib_Graphics_Driver::line_style_unscaled(int style, float width, char* dashes) { - // save line width for X11 clipping - if (width == 0) line_width_ = scale_ < 2 ? 0 : scale_; - else line_width_ = width>0 ? width : -width; int ndashes = dashes ? strlen(dashes) : 0; // emulate the WIN32 dash patterns on X |
