summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-13 21:12:52 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-13 21:13:04 +0100
commit9fad60140167661bfa1f442db3b81ba9e10d37e9 (patch)
tree564b6cdd0e52c523a9a51e136d2edb0bbd60ece2 /src/drivers/GDI
parent5ade8fcb09ad2f30d0ee84228f062bdfc8ecdc50 (diff)
Remove compilation warnings issued by Visual Studio 2019.
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx2
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx17
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx26
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx35
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx2
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx68
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx4
7 files changed, 78 insertions, 76 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
index 9d7591712..9cb5a425c 100644
--- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx
@@ -77,7 +77,7 @@ Fl_GDI_Copy_Surface_Driver::~Fl_GDI_Copy_Surface_Driver() {
SetClipboardData (CF_ENHMETAFILE, hmf);
// then put a BITMAP version of the graphics in the clipboard
float scaling = driver()->scale();
- int W = width * scaling, H = height * scaling;
+ int W = int(width * scaling), H = int(height * scaling);
RECT rect = {0, 0, W, H};
Fl_Image_Surface *surf = new Fl_Image_Surface(W, H);
Fl_Surface_Device::push_current(surf);
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 31e54c37f..b70f579cb 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -104,7 +104,8 @@ HDC fl_makeDC(HBITMAP bitmap) {
}
void Fl_GDI_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen bitmap, int srcx, int srcy) {
- x *= scale(); y *= scale(); w *= scale(); h *= scale(); srcx *= scale(); srcy *= scale();
+ x = int(x * scale()); y = int(y * scale()); w = int(w * scale()); h = int(h * scale());
+ srcx = int(srcx * scale()); srcy = int(srcy * scale());
if (srcx < 0) {w += srcx; x -= srcx; srcx = 0;}
if (srcy < 0) {h += srcy; y -= srcy; srcy = 0;}
int off_width, off_height;
@@ -157,7 +158,7 @@ void Fl_GDI_Graphics_Driver::translate_all(int x, int y) {
depth = stack_height - 1;
}
GetWindowOrgEx((HDC)gc(), origins+depth);
- SetWindowOrgEx((HDC)gc(), origins[depth].x - x*scale(), origins[depth].y - y*scale(), NULL);
+ SetWindowOrgEx((HDC)gc(), int(origins[depth].x - x*scale()), int(origins[depth].y - y*scale()), NULL);
depth++;
}
@@ -179,8 +180,8 @@ void Fl_GDI_Graphics_Driver::transformed_vertex0(float x, float y) {
p_size = p ? 2*p_size : 16;
p = (POINT*)realloc((void*)p, p_size*sizeof(*p));
}
- p[n].x = x;
- p[n].y = y;
+ p[n].x = int(x);
+ p[n].y = int(y);
n++;
}
}
@@ -255,14 +256,14 @@ HRGN Fl_GDI_Graphics_Driver::scale_region(HRGN r, float f, Fl_GDI_Graphics_Drive
POINT pt = {0, 0};
if (dr && dr->depth >= 1) { // account for translation
GetWindowOrgEx((HDC)dr->gc(), &pt);
- pt.x *= (f - 1);
- pt.y *= (f - 1);
+ pt.x = int(pt.x * (f - 1));
+ pt.y = int(pt.y * (f - 1));
}
RECT *rects = (RECT*)&(pdata->Buffer);
int delta = (f > 1.75 ? 1 : 0) - int(f/2);
for (DWORD i = 0; i < pdata->rdh.nCount; i++) {
- int x = rects[i].left * f + pt.x;
- int y = rects[i].top * f + pt.y;
+ int x = int(rects[i].left * f) + pt.x;
+ int y = int(rects[i].top * f) + pt.y;
RECT R2;
R2.left = x + delta;
R2.top = y + delta;
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
index 6055ab1a5..9bd3aaa44 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
@@ -32,29 +32,29 @@
void Fl_GDI_Graphics_Driver::arc_unscaled(float x, float y, float w, float h, double a1, double a2) {
if (w <= 0 || h <= 0) return;
- int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
- int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
- 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));
+ int xa = int( x+w/2+int(w*cos(a1/180.0*M_PI)) );
+ int ya = int( y+h/2-int(h*sin(a1/180.0*M_PI)) );
+ int xb = int( x+w/2+int(w*cos(a2/180.0*M_PI)) );
+ int yb = int( y+h/2-int(h*sin(a2/180.0*M_PI)) );
if (fabs(a1 - a2) < 90) {
if (xa == xb && ya == yb) SetPixel(gc_, xa, ya, fl_RGB());
- else Arc(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
- } else Arc(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
+ else Arc(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
+ } else Arc(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
}
void Fl_GDI_Graphics_Driver::pie_unscaled(float x, float y, float w, float h, double a1, double a2) {
if (w <= 0 || h <= 0) return;
if (a1 == a2) return;
- int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
- int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
- 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));
+ int xa = int( x+w/2+int(w*cos(a1/180.0*M_PI)) );
+ int ya = int( y+h/2-int(h*sin(a1/180.0*M_PI)) );
+ int xb = int( x+w/2+int(w*cos(a2/180.0*M_PI)) );
+ int yb = int( y+h/2-int(h*sin(a2/180.0*M_PI)) );
SelectObject(gc_, fl_brush());
if (fabs(a1 - a2) < 90) {
if (xa == xb && ya == yb) {
- MoveToEx(gc_, x+w/2, y+h/2, 0L);
+ MoveToEx(gc_, int(x+w/2), int(y+h/2), 0L);
LineTo(gc_, xa, ya);
SetPixel(gc_, xa, ya, fl_RGB());
- } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
- } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
+ } else Pie(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
+ } else Pie(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
}
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index 38bfc4b1b..cf476f7c4 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -398,10 +398,10 @@ void Fl_GDI_Graphics_Driver::delete_bitmask(Fl_Bitmask bm) {
}
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_Bitmap *bm, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale();
- Y = Y*scale();
+ X = int(X * scale());
+ Y = int(Y * scale());
cache_size(bm, W, H);
- cx *= scale(); cy *= scale();
+ cx = int(cx * scale()); cy = int(cy * scale());
HDC tempdc = CreateCompatibleDC(gc_);
int save = SaveDC(tempdc);
@@ -467,7 +467,8 @@ void Fl_GDI_Printer_Graphics_Driver::draw_bitmap(Fl_Bitmap *bm, int XP, int YP,
// draw it to printer context with background color as transparent
float scaleW = bm->data_w()/float(bm->w());
float scaleH = bm->data_h()/float(bm->h());
- fl_TransparentBlt(gc_, X, Y, W, H, tempdc, cx * scaleW, cy * scaleH, W * scaleW, H * scaleH, RGB(r, g, b) );
+ fl_TransparentBlt(gc_, X, Y, W, H, tempdc,
+ int(cx * scaleW), int(cy * scaleH), int(W * scaleW), int(H * scaleH), RGB(r, g, b) );
delete img_surf;
RestoreDC(tempdc, save);
DeleteDC(tempdc);
@@ -498,10 +499,10 @@ void Fl_GDI_Graphics_Driver::cache(Fl_RGB_Image *img)
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale();
- Y = Y*scale();
+ X = int(X * scale());
+ Y = int(Y * scale());
cache_size(img, W, H);
- cx *= scale(); cy *= scale();
+ cx = int(cx * scale()); cy = int(cy * scale());
if (W + cx > img->data_w()) W = img->data_w() - cx;
if (H + cy > img->data_h()) H = img->data_h() - cy;
if (!*Fl_Graphics_Driver::id(img)) {
@@ -542,8 +543,8 @@ void Fl_GDI_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP,
HDC new_gc = CreateCompatibleDC(gc_);
int save = SaveDC(new_gc);
SelectObject(new_gc, (HBITMAP)*Fl_Graphics_Driver::id(rgb));
- Wfull = W*(rgb->data_w()/float(Wfull)); Hfull = H*(rgb->data_h()/float(Hfull));
- int cx2 = cx * scale(), cy2 = cy * scale();
+ Wfull = int(W * (rgb->data_w() / float(Wfull))); Hfull = int(H * (rgb->data_h() / float(Hfull)));
+ int cx2 = int(cx * scale()), cy2 = int(cy * scale());
if (cx2+Wfull > rgb->data_w()) Wfull = rgb->data_w()-cx2;
if (cy2+Hfull > rgb->data_h()) Hfull = rgb->data_h()-cy2;
float scaleW = float(rgb->data_w())/rgb->w();
@@ -554,10 +555,10 @@ void Fl_GDI_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP,
float s = scale(); scale(1); cache_size(rgb, Wfull, Hfull); scale(s);
}
if ( (rgb->d() % 2) == 0 ) {
- alpha_blend_(XP*scale(), YP*scale(), W, H, new_gc, cx*scaleW, cy*scaleH, Wfull, Hfull);
+ alpha_blend_(int(XP*scale()), int(YP*scale()), W, H, new_gc, int(cx*scaleW), int(cy*scaleH), Wfull, Hfull);
} else {
SetStretchBltMode(gc_, HALFTONE);
- StretchBlt(gc_, XP*scale(), YP*scale(), W, H, new_gc, cx*scaleW, cy*scaleH, Wfull, Hfull, SRCCOPY);
+ StretchBlt(gc_, int(XP*scale()), int(YP*scale()), W, H, new_gc, int(cx*scaleW), int(cy*scaleH), Wfull, Hfull, SRCCOPY);
}
RestoreDC(new_gc, save);
DeleteDC(new_gc);
@@ -582,7 +583,7 @@ void Fl_GDI_Printer_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP,
if ( *pw != rgb->data_w() || *ph != rgb->data_h()) rgb->uncache();
}
if (!*id(rgb)) cache(rgb);
- draw_fixed(rgb, 0, 0, WP/tr.eM11, HP/tr.eM22, cx/tr.eM11, cy/tr.eM22);
+ draw_fixed(rgb, 0, 0, int(WP / tr.eM11), int(HP / tr.eM22), int(cx / tr.eM11), int(cy / tr.eM22));
SetWorldTransform(gc_, &old_tr);
}
@@ -637,10 +638,10 @@ void Fl_GDI_Graphics_Driver::cache(Fl_Bitmap *bm) {
}
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_Pixmap *pxm, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale();
- Y = Y*scale();
+ X = int(X * scale());
+ Y = int(Y * scale());
cache_size(pxm, W, H);
- cx *= scale(); cy *= scale();
+ cx = int(cx * scale()); cy = int(cy * scale());
Fl_Region r2 = scale_clip(scale());
if (*Fl_Graphics_Driver::mask(pxm)) {
HDC new_gc = CreateCompatibleDC(gc_);
@@ -688,8 +689,8 @@ void Fl_GDI_Printer_Graphics_Driver::draw_pixmap(Fl_Pixmap *pxm, int XP, int YP,
// print all of offscreen but its parts in background color
float scaleW = pxm->data_w()/float(pxm->w());
float scaleH = pxm->data_h()/float(pxm->h());
- fl_TransparentBlt(gc_, X, Y, W, H, new_gc, cx * scaleW, cy * scaleH, W * scaleW, H * scaleH,
- need_pixmap_bg_color );
+ fl_TransparentBlt(gc_, X, Y, W, H, new_gc,
+ int(cx * scaleW), int(cy * scaleH), int(W * scaleW), int(H * scaleH), need_pixmap_bg_color );
RestoreDC(new_gc,save);
DeleteDC(new_gc);
need_pixmap_bg_color = 0;
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 e71fa65d7..18fba5fb8 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx
@@ -48,7 +48,7 @@ void Fl_GDI_Graphics_Driver::line_style_unscaled(int style, float width, char* d
if ((style || n) && !width) width = scale(); // fix cards that do nothing for 0?
if (!fl_current_xmap) color(FL_BLACK);
LOGBRUSH penbrush = {BS_SOLID,fl_RGB(),0}; // can this be fl_brush()?
- int tw = width < 1? 1: width;
+ int tw = ( width < 1.f ? 1 : int(width) );
HPEN newpen = ExtCreatePen(s1, tw, &penbrush, n, n ? a : 0);
if (!newpen) {
Fl::error("fl_line_style(): Could not create GDI pen object.");
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
index fba77eb17..50e00c5a9 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
@@ -33,10 +33,10 @@
// --- line and polygon drawing with integer coordinates
void Fl_GDI_Graphics_Driver::point_unscaled(float fx, float fy) {
- int width = scale() >= 1 ? scale() : 1;
+ int width = (scale() >= 1 ? int(scale()) : 1);
RECT rect;
- rect.left = fx; rect.top = fy;
- rect.right = fx + width; rect.bottom = fy + width;
+ rect.left = int(fx); rect.top = int(fy);
+ rect.right = int(fx) + width; rect.bottom = int(fy) + width;
FillRect(gc_, &rect, fl_brush());
}
@@ -71,32 +71,32 @@ void Fl_GDI_Graphics_Driver::focus_rect(int x, int y, int w, int h) {
void Fl_GDI_Graphics_Driver::rectf_unscaled(float x, float y, float w, float h) {
if (w<=0 || h<=0) return;
RECT rect;
- rect.left = x; rect.top = y;
- rect.right = x + w; rect.bottom = y + h;
+ rect.left = int(x); rect.top = int(y);
+ rect.right = int(x + w); rect.bottom = int(y + h);
FillRect(gc_, &rect, fl_brush());
}
void Fl_GDI_Graphics_Driver::line_unscaled(float x, float y, float x1, float y1) {
- MoveToEx(gc_, x, y, 0L);
- LineTo(gc_, x1, y1);
- SetPixel(gc_, x1, y1, fl_RGB());
+ MoveToEx(gc_, int(x), int(y), 0L);
+ LineTo(gc_, int(x1), int(y1));
+ SetPixel(gc_, int(x1), int(y1), fl_RGB());
}
void Fl_GDI_Graphics_Driver::line_unscaled(float x, float y, float x1, float y1, float x2, float y2) {
- MoveToEx(gc_, x, y, 0L);
- LineTo(gc_, x1, y1);
- LineTo(gc_, x2, y2);
- SetPixel(gc_, x2, y2, fl_RGB());
+ MoveToEx(gc_, int(x), int(y), 0L);
+ LineTo(gc_, int(x1), int(y1));
+ LineTo(gc_, int(x2), int(y2));
+ SetPixel(gc_, int(x2), int(y2), fl_RGB());
}
void Fl_GDI_Graphics_Driver::xyline_unscaled(float x, float y, float x1) {
int line_delta_ = (scale() > 1.75 ? 1 : 0);
int tw = line_width_ ? line_width_ : 1; // true line width
if (x > x1) { float exch = x; x = x1; x1 = exch; }
- int ix = x+line_delta_; if (scale() >= 2) ix -= int(scale()/2);
- int iy = y+line_delta_;
+ int ix = int(x) + line_delta_; if (scale() >= 2.f) ix -= int(scale()/2);
+ int iy = int(y) + line_delta_;
if (scale() > 1.9 && line_width_/scale() >= 2) iy--;
- int ix1 = int(x1/scale()+1.5)*scale()-1; // extend line to pixel before line beginning at x1/scale_ + 1
+ int ix1 = int( int(x1/scale()+1.5f) * scale() ) - 1; // extend line to pixel before line beginning at x1/scale_ + 1
ix1 += line_delta_; if (scale() >= 2) ix1 -= 1;; if (scale() >= 4) ix1 -= 1;
MoveToEx(gc_, ix, iy, 0L); LineTo(gc_, ix1+1, iy);
// try and make sure no unfilled area lies between xyline(x,y,x1) and xyline(x,y+1,x1)
@@ -110,10 +110,10 @@ void Fl_GDI_Graphics_Driver::yxline_unscaled(float x, float y, float y1) {
int line_delta_ = (scale() > 1.75 ? 1 : 0);
int tw = line_width_ ? line_width_ : 1; // true line width
- int ix = x+line_delta_;
+ int ix = int(x) + line_delta_;
if (scale() > 1.9 && line_width_/scale() >= 2) ix--;
- int iy = y+line_delta_; if (scale() >= 2) iy -= int(scale()/2);
- int iy1 = int(y1/scale()+1.5)*scale()-1;
+ int iy = int(y) + line_delta_; if (scale() >= 2) iy -= int(scale()/2);
+ int iy1 = int( int(y1/scale()+1.5) * scale() ) - 1;
iy1 += line_delta_; if (scale() >= 2) iy1 -= 1;; if (scale() >= 4) iy1 -= 1; // extend line to pixel before line beginning at y1/scale_ + 1
MoveToEx(gc_, ix, iy, 0L); LineTo(gc_, ix, iy1+1);
// try and make sure no unfilled area lies between yxline(x,y,y1) and yxline(x+1,y,y1)
@@ -124,35 +124,35 @@ void Fl_GDI_Graphics_Driver::yxline_unscaled(float x, float y, float y1) {
}
void Fl_GDI_Graphics_Driver::loop_unscaled(float x, float y, float x1, float y1, float x2, float y2) {
- MoveToEx(gc_, x, y, 0L);
- LineTo(gc_, x1, y1);
- LineTo(gc_, x2, y2);
- LineTo(gc_, x, y);
+ MoveToEx(gc_, int(x), int(y), 0L);
+ LineTo(gc_, int(x1), int(y1));
+ LineTo(gc_, int(x2), int(y2));
+ LineTo(gc_, int(x), int(y));
}
void Fl_GDI_Graphics_Driver::loop_unscaled(float x, float y, float x1, float y1, float x2, float y2, float x3, float y3) {
- MoveToEx(gc_, x, y, 0L);
- LineTo(gc_, x1, y1);
- LineTo(gc_, x2, y2);
- LineTo(gc_, x3, y3);
- LineTo(gc_, x, y);
+ MoveToEx(gc_, int(x), int(y), 0L);
+ LineTo(gc_, int(x1), int(y1));
+ LineTo(gc_, int(x2), int(y2));
+ LineTo(gc_, int(x3), int(y3));
+ LineTo(gc_, int(x), int(y));
}
void Fl_GDI_Graphics_Driver::polygon_unscaled(float x, float y, float x1, float y1, float x2, float y2) {
POINT p[3];
- p[0].x = x; p[0].y = y;
- p[1].x = x1; p[1].y = y1;
- p[2].x = x2; p[2].y = y2;
+ p[0].x = int(x); p[0].y = int(y);
+ p[1].x = int(x1); p[1].y = int(y1);
+ p[2].x = int(x2); p[2].y = int(y2);
SelectObject(gc_, fl_brush());
Polygon(gc_, p, 3);
}
void Fl_GDI_Graphics_Driver::polygon_unscaled(float x, float y, float x1, float y1, float x2, float y2, float x3, float y3) {
POINT p[4];
- p[0].x = x; p[0].y = y;
- p[1].x = x1; p[1].y = y1;
- p[2].x = x2; p[2].y = y2;
- p[3].x = x3; p[3].y = y3;
+ p[0].x = int(x); p[0].y = int(y);
+ p[1].x = int(x1); p[1].y = int(y1);
+ p[2].x = int(x2); p[2].y = int(y2);
+ p[3].x = int(x3); p[3].y = int(y3);
SelectObject(gc_, fl_brush());
Polygon(gc_, p, 4);
}
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
index c556121cc..87e694f18 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
@@ -42,7 +42,7 @@ void Fl_GDI_Graphics_Driver::end_line() {
void Fl_GDI_Graphics_Driver::end_loop() {
fixloop();
- if (n>2) transformed_vertex0(p[0].x, p[0].y);
+ if (n>2) transformed_vertex0(float(p[0].x), float(p[0].y));
end_line();
}
@@ -67,7 +67,7 @@ void Fl_GDI_Graphics_Driver::begin_complex_polygon() {
void Fl_GDI_Graphics_Driver::gap() {
while (n>gap_+2 && p[n-1].x == p[gap_].x && p[n-1].y == p[gap_].y) n--;
if (n > gap_+2) {
- transformed_vertex0(p[gap_].x, p[gap_].y);
+ transformed_vertex0(float(p[gap_].x), float(p[gap_].y));
counts[numcount++] = n-gap_;
gap_ = n;
} else {