mirror of https://github.com/fltk/fltk
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
This commit is contained in:
parent
fa3d8c6259
commit
93a99431ed
|
@ -410,6 +410,7 @@ public:
|
|||
float scale() { return scale_; }
|
||||
protected:
|
||||
float scale_; // scale between user and graphical coordinates: graphical = user * scale_
|
||||
int line_width_;
|
||||
void cache_size(Fl_Image *img, int &width, int &height);
|
||||
virtual Fl_Region scale_clip(float f)=0;
|
||||
void unscale_clip(Fl_Region r);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue