Various Pixel bugs:

STR #993, STR #990, and a few others

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-08-29 21:16:38 +00:00
parent e9ba94e22d
commit dc6357bf1a
7 changed files with 19 additions and 22 deletions

View File

@ -45,9 +45,9 @@ void Fl_Dial::draw(int X, int Y, int W, int H) {
int foo = (box() > _FL_ROUND_UP_BOX && Fl::box_dx(box()));
if (foo) {X--; Y--; W+=2; H+=2;}
fl_color(color());
fl_pie(X, Y, W-1, H-1, 270-a1, angle > a1 ? 360+270-angle : 270-360-angle);
fl_pie(X, Y, W, H, 270-a1, angle > a1 ? 360+270-angle : 270-360-angle);
fl_color(selection_color());
fl_pie(X, Y, W-1, H-1, 270-angle, 270-a1);
fl_pie(X, Y, W, H, 270-angle, 270-a1);
if (foo) {
fl_color(FL_FOREGROUND_COLOR);
fl_arc(X, Y, W, H, 0, 360);

View File

@ -84,9 +84,9 @@ void fl_pie(int x,int y,int w,int h,double a1,double a2) {
int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
SelectObject(fl_gc, fl_brush());
Pie(fl_gc, x, y, x+w+1, y+h+1, xa, ya, xb, yb);
Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
#elif defined(__APPLE_QD__)
Rect r; r.left=x; r.right=x+w+1; r.top=y; r.bottom=y+h+1;
Rect r; r.left=x; r.right=x+w; r.top=y; r.bottom=y+h;
a1 = a2-a1; a2 = 450-a2;
PaintArc(&r, (short int)a2, (short int)a1);
#elif defined(__APPLE_QUARTZ__)
@ -108,7 +108,7 @@ void fl_pie(int x,int y,int w,int h,double a1,double a2) {
}
CGContextFillPath(fl_gc);
#else
XFillArc(fl_display, fl_window, fl_gc, x,y,w,h, int(a1*64),int((a2-a1)*64));
XFillArc(fl_display, fl_window, fl_gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64));
#endif
}

View File

@ -84,7 +84,6 @@ public:
}
HRESULT STDMETHODCALLTYPE DragEnter( IDataObject *pDataObj, DWORD /*grfKeyState*/, POINTL pt, DWORD *pdwEffect) {
if( !pDataObj ) return E_INVALIDARG;
printf("DND Enter\n");
// set e_modifiers here from grfKeyState, set e_x and e_root_x
// check if FLTK handles this drag and return if it can't (i.e. BMP drag without filename)
POINT ppt;
@ -121,7 +120,6 @@ public:
*pdwEffect = lastEffect = DROPEFFECT_NONE;
return S_OK;
}
printf("DND Drag\n");
// set e_modifiers here from grfKeyState, set e_x and e_root_x
Fl::e_x_root = pt.x;
Fl::e_y_root = pt.y;
@ -143,7 +141,6 @@ public:
return S_OK;
}
HRESULT STDMETHODCALLTYPE DragLeave() {
printf("DND Leave\n");
if ( fl_dnd_target_window && fillCurrentDragData(0))
{
Fl::handle( FL_DND_LEAVE, fl_dnd_target_window );

View File

@ -43,7 +43,7 @@ static void fl_oval_frame(int x, int y, int w, int h, Fl_Color c) {
}
static void fl_oval_box(int x, int y, int w, int h, Fl_Color c) {
fl_oval_flat_box(x,y,w-1,h-1,c);
fl_oval_flat_box(x,y,w,h,c);
fl_oval_frame(x,y,w,h,FL_BLACK);
}

View File

@ -127,7 +127,7 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
fl_arc(x+w-h, y, h, h, 315.0, 405.0);
fl_color(shade_color(g[*c++], bc));
fl_arc(x+w-h, y, h, h, 270.0, 315.0);
fl_xyline(x+d, y+h, x+w-d);
fl_xyline(x+d, y+h-1, x+w-d);
fl_arc(x, y, h, h, 225.0, 270.0);
fl_color(shade_color(g[*c++], bc));
fl_arc(x, y, h, h, 135.0, 225.0);
@ -140,7 +140,7 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
fl_arc(x, y, w, w, 45.0, 135.0);
fl_color(shade_color(g[*c++], bc));
fl_arc(x, y, w, w, 0.0, 45.0);
fl_yxline(x+w, y+d, y+h-d);
fl_yxline(x+w-1, y+d, y+h-d);
fl_arc(x, y+h-w, w, w, 315.0, 360.0);
fl_color(shade_color(g[*c++], bc));
fl_arc(x, y+h-w, w, w, 225.0, 315.0);
@ -244,7 +244,7 @@ static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
fl_pie(x+w-h, y, h, h, 315.0+i*na, 405.0+i*na);
fl_color(shade_color(g[c[clen - i]], bc));
fl_pie(x+w-h, y, h, h, 270.0, 315.0+i*na);
fl_xyline(x+d, y+h, x+w-d);
fl_xyline(x+d, y+h-1, x+w-d);
fl_pie(x, y, h, h, 225.0+i*na, 270.0);
fl_color(shade_color(g[c[clen - i] - 2], bc));
fl_pie(x, y, h, h, 135.0+i*na, 225.0+i*na);
@ -262,7 +262,7 @@ static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
fl_pie(x, y, w, w, 45.0+i*na, 135.0+i*na);
fl_color(shade_color(g[c[i] - 2], bc));
fl_pie(x, y, w, w, 0.0, 45.0+i*na);
fl_yxline(x+w, y+d, y+h-d);
fl_yxline(x+w-1, y+d, y+h-d);
fl_pie(x, y+h-w, w, w, 315.0+i*na, 360.0);
fl_color(shade_color(g[c[clen - i]], bc));
fl_pie(x, y+h-w, w, w, 225.0+i*na, 315.0+i*na);
@ -307,8 +307,8 @@ static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
static void up_round(int x, int y, int w, int h, Fl_Color c) {
shade_round(x, y, w, h-1, "RVQNOPQRSTUVWVQ", c);
frame_round(x, y, w, h-1, "IJLM", c);
shade_round(x, y, w, h, "RVQNOPQRSTUVWVQ", c);
frame_round(x, y, w, h, "IJLM", c);
}
@ -324,8 +324,8 @@ static void down_box(int x, int y, int w, int h, Fl_Color c) {
static void down_round(int x, int y, int w, int h, Fl_Color c) {
shade_round(x, y, w, h-1, "STUVWWWVT", c);
frame_round(x, y, w, h-1, "IJLM", c);
shade_round(x, y, w, h, "STUVWWWVT", c);
frame_round(x, y, w, h, "IJLM", c);
}

View File

@ -71,11 +71,11 @@ static void draw(int which, int x,int y,int w,int h, int inset, uchar color)
fl_rectf(x+d/2, y, w-(d&-2), h);
} else {
if (w < h) {
if (which != UPPER_LEFT) fl_yxline(x+w-1, y+d/2, y+h-d/2);
if (which != LOWER_RIGHT) fl_yxline(x, y+d/2, y+h-d/2);
if (which != UPPER_LEFT) fl_yxline(x+w-1, y+d/2-1, y+h-d/2+1);
if (which != LOWER_RIGHT) fl_yxline(x, y+d/2-1, y+h-d/2+1);
} else if (w > h) {
if (which != UPPER_LEFT) fl_xyline(x+d/2, y+h-1, x+w-d/2);
if (which != LOWER_RIGHT) fl_xyline(x+d/2, y, x+w-d/2);
if (which != UPPER_LEFT) fl_xyline(x+d/2-1, y+h-1, x+w-d/2+1);
if (which != LOWER_RIGHT) fl_xyline(x+d/2-1, y, x+w-d/2+1);
}
}
}

View File

@ -32,7 +32,7 @@
static void fl_shadow_frame(int x, int y, int w, int h, Fl_Color c) {
fl_color(FL_DARK3);
fl_rectf(x+BW, y+h-BW, w, BW);
fl_rectf(x+BW, y+h-BW, w - BW, BW);
fl_rectf(x+w-BW, y+BW, BW, h - BW);
fl_color(c);
fl_rect(x,y,w-BW,h-BW);