mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 14:31:40 +08:00
Fix compiler warning.
Back-porting from branch-1.3-porting. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -88,10 +88,10 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL)
|
||||
int vmm = GetDeviceCaps(hdc, VERTSIZE);
|
||||
int vdots = GetDeviceCaps(hdc, VERTRES);
|
||||
ReleaseDC(NULL, hdc);
|
||||
float factorw = (100. * hmm) / hdots;
|
||||
float factorh = (100. * vmm) / vdots;
|
||||
float factorw = (100.f * hmm) / hdots;
|
||||
float factorh = (100.f * vmm) / vdots;
|
||||
|
||||
RECT rect; rect.left = 0; rect.top = 0; rect.right = w * factorw; rect.bottom = h * factorh;
|
||||
RECT rect; rect.left = 0; rect.top = 0; rect.right = (LONG)(w * factorw); rect.bottom = (LONG)(h * factorh);
|
||||
gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL);
|
||||
if (gc != NULL) {
|
||||
SetTextAlign(gc, TA_BASELINE|TA_LEFT);
|
||||
|
||||
+3
-3
@@ -787,9 +787,9 @@ void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) {
|
||||
int vmm = GetDeviceCaps(hdc, VERTSIZE);
|
||||
int vdots = GetDeviceCaps(hdc, VERTRES);
|
||||
ReleaseDC(NULL, hdc);
|
||||
float factorw = (100. * hmm) / hdots;
|
||||
float factorh = (100. * vmm) / vdots + 0.5;
|
||||
width /= factorw; height /= factorh; // convert to screen pixel unit
|
||||
float factorw = (100.f * hmm) / hdots;
|
||||
float factorh = (100.f * vmm) / vdots + 0.5f;
|
||||
width = (int)(width/factorw); height = (int)(height/factorh); // convert to screen pixel unit
|
||||
RECT rect = {0, 0, width, height};
|
||||
Fl_Offscreen off = fl_create_offscreen(width, height);
|
||||
fl_begin_offscreen(off);
|
||||
|
||||
Reference in New Issue
Block a user