From eeb65bef23b2d269ea38474c04a55ffca5c6e63e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 10 Jan 2016 19:08:16 +0000 Subject: 1) Replicate in branch-1.3-porting all recent changes of branch-1.3 2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders() that contains all the platform-specific code of all operations related to drawing window borders and title bars. What is platform-specific and what is not is therefore much clearer, to ease porting. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Copy_Surface.cxx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/Fl_Copy_Surface.cxx') diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx index 1f0b654c5..a0b942b67 100644 --- a/src/Fl_Copy_Surface.cxx +++ b/src/Fl_Copy_Surface.cxx @@ -89,7 +89,7 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL) int vdots = GetDeviceCaps(hdc, VERTRES); ReleaseDC(NULL, hdc); float factorw = (100. * hmm) / hdots; - float factorh = (100. * vmm) / vdots + 0.5; + float factorh = (100. * vmm) / vdots; RECT rect; rect.left = 0; rect.top = 0; rect.right = w * factorw; rect.bottom = h * factorh; gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL); @@ -217,20 +217,10 @@ void Fl_Copy_Surface::prepare_copy_pdf_and_tiff(int w, int h) #endif // __APPLE__ -#if !defined(__APPLE__) -/** Copies a window and its borders and title bar to the clipboard. */ void Fl_Copy_Surface::draw_decorated_window(Fl_Window* win, int delta_x, int delta_y) { -#if defined(WIN32) - helper->draw_decorated_window(win, delta_x, delta_y, this); -#elif defined(__APPLE__) -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: do you want to draw a window border around a printout" -#else - helper->draw_decorated_window(win, delta_x, delta_y, this); -#endif + helper->draw_decorated_window(win, delta_x, delta_y); } -#endif #if defined(WIN32) #elif defined(__APPLE__) -- cgit v1.2.3