Revision: 13399
http://sourceforge.net/p/skim-app/code/13399
Author: hofman
Date: 2023-03-22 15:26:07 +0000 (Wed, 22 Mar 2023)
Log Message:
-----------
draw toolbar window at its location in the image
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2023-03-21 15:01:30 UTC (rev
13398)
+++ trunk/SKMainWindowController_FullScreen.m 2023-03-22 15:26:07 UTC (rev
13399)
@@ -355,11 +355,12 @@
break;
if (tbWindow) {
CGImageRef tbCgImage = CGWindowListCreateImage(CGRectNull,
kCGWindowListOptionIncludingWindow, (CGWindowID)[tbWindow windowNumber],
kCGWindowImageBoundsIgnoreFraming);
+ NSRect tbFrame = [tbWindow frame];
size_t width = CGImageGetWidth(cgImage), height =
CGImageGetHeight(cgImage);
- size_t tbWidth = CGImageGetWidth(tbCgImage), tbHeight =
CGImageGetHeight(tbCgImage);
+ CGFloat sx = width / NSWidth(frame), sy = height / NSHeight(frame);
CGContextRef ctx = CGBitmapContextCreate(NULL, width, height, 8, 4
* width, CGImageGetColorSpace(cgImage), kCGBitmapByteOrder32Host |
kCGImageAlphaPremultipliedFirst);
CGContextDrawImage(ctx, CGRectMake(0.0, 0.0, width, height),
cgImage);
- CGContextDrawImage(ctx, CGRectMake(0.0, height - tbHeight,
tbWidth, tbHeight), tbCgImage);
+ CGContextDrawImage(ctx, CGRectMake(sx * (NSMinX(tbFrame) -
NSMinX(frame)), sy * (NSMinY(tbFrame) - NSMinY(frame)), sx * NSWidth(tbFrame),
sy * NSHeight(tbFrame)), tbCgImage);
CGImageRelease(tbCgImage);
CGImageRelease(cgImage);
cgImage = CGBitmapContextCreateImage(ctx);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit