Changeset - adaf02e991b4
[Not reviewed]
default
0 1 0
Jason Maltzen (jmaltzen) - 9 years ago 2015-11-19 03:35:37
jason.maltzen@unsanctioned.net
Fix up screen scraping code to work on retina displays (by converting to an Image and then to a Pixbuf)
1 file changed with 11 insertions and 3 deletions:
0 comments (0 inline, 0 general)
MainWindow.cs
Show inline comments
...
 
@@ -95,4 +95,10 @@ public partial class MainWindow : Gtk.Wi
 
		
 
		if (unmodifiedSwatch != null)
 
		{
 
		unmodifiedSwatch.Clear();
 
		}
 
		if (reactionSwatch != null)
 
		{
 
		reactionSwatch.Clear();
 
		}
 

...
 
@@ -483,4 +489,6 @@ public partial class MainWindow : Gtk.Wi
 
		bool colorMatch;
 
		screenBuffer.GetFromDrawable(rootWindow,
 
			rootWindow.Colormap, 0, 0, 0, 0, screenWidth, screenHeight);
 
		Gdk.Image rootImage = rootWindow.GetImage(0, 0, screenWidth, screenHeight);
 
		screenBuffer.GetFromImage(rootImage, rootImage.Colormap, 0, 0, 0, 0, screenWidth, screenHeight);
 
		//screenBuffer.GetFromDrawable(rootWindow,
 
		//	rootWindow.Colormap, 0, 0, 0, 0, screenWidth, screenHeight);
 
		int stride = screenBuffer.Rowstride;
...
 
@@ -584,3 +592,3 @@ public partial class MainWindow : Gtk.Wi
 
								
 
								
 
								// write out the screenshot
 
								// screenBuffer.Save("screenshot.png", "png");
0 comments (0 inline, 0 general)