Revision: 15197
http://sourceforge.net/p/skim-app/code/15197
Author: hofman
Date: 2025-05-12 15:22:49 +0000 (Mon, 12 May 2025)
Log Message:
-----------
Wwe can get the image scale from the returned image
Modified Paths:
--------------
trunk/SKTransitionController.m
Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m 2025-05-12 14:44:23 UTC (rev 15196)
+++ trunk/SKTransitionController.m 2025-05-12 15:22:49 UTC (rev 15197)
@@ -154,8 +154,7 @@
return transitionFilter;
}
-- (CIImage *)currentImageForView:(NSView *)view scale:(CGFloat *)scalePtr {
- NSRect bounds = [view bounds];
+- (CIImage *)currentImageForView:(NSView *)view {
NSBitmapImageRep *contentBitmap = [view bitmapImageRepCachingDisplay];
CIImage *image = [[CIImage alloc] initWithBitmapImageRep:contentBitmap];
NSArray *colorFilters = SKColorEffectFilters();
@@ -165,7 +164,6 @@
image = [filter outputImage];
}
}
- if (scalePtr) *scalePtr = CGRectGetWidth([image extent]) / NSWidth(bounds);
return image;
}
@@ -182,13 +180,13 @@
animating = YES;
- CIImage *initialImage = [self currentImageForView:view scale:NULL];
+ CIImage *initialImage = [self currentImageForView:view];
return ^(NSRect rect, BOOL forward, void (^completionHandler)(void)){
NSRect bounds = [view bounds];
- CGFloat imageScale = 1.0;
- CIImage *finalImage = [self currentImageForView:view
scale:&imageScale];
+ CIImage *finalImage = [self currentImageForView:view];
+ CGFloat imageScale = CGRectGetWidth([initialImage extent]) /
NSWidth(bounds);
CGRect cgRect = CGRectIntegral(scaleRect(rect, imageScale));
CGRect cgBounds = scaleRect(bounds, imageScale);
CGRect extent = [currentTransition shouldRestrict] ? cgRect : cgBounds;
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