FLTK logo

[master] cacaa17 - Minor simplification in Fl_Gl_Window_Driver::capture_gl_rectangle()

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] cacaa17 - Minor simplification in Fl_Gl_Window_Driver::capture_gl_rectangle() "ManoloFLTK" Apr 16, 2021  
 
commit cacaa1749991178a58768ea437d9b8fbb779b0b4
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Apr 16 09:30:46 2021 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Apr 16 09:31:02 2021 +0200

    Minor simplification in Fl_Gl_Window_Driver::capture_gl_rectangle()

 src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
index 27360cc..121c0db 100644
--- src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
+++ src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
@@ -58,8 +58,7 @@ Fl_RGB_Image* Fl_Gl_Window_Driver::capture_gl_rectangle(int x, int y, int w, int
   glPixelStorei(GL_PACK_SKIP_ROWS, 0);
   glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
   //
-  int ns = Fl_Window_Driver::driver(glw)->screen_num();
-  float s = Fl::screen_driver()->scale(ns);
+  float s = glw->pixels_per_unit();
   if (s != 1) {
     x = int(x * s); y = int(y * s); w = int(w * s); h = int(h * s);
   }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.