Revision: 13710
http://sourceforge.net/p/skim-app/code/13710
Author: hofman
Date: 2023-10-31 15:51:33 +0000 (Tue, 31 Oct 2023)
Log Message:
-----------
set interpolation quality and anti alias when drawingpages to image
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2023-10-31 15:34:47 UTC (rev 13709)
+++ trunk/SKBasePDFView.m 2023-10-31 15:51:33 UTC (rev 13710)
@@ -415,6 +415,8 @@
- (void)drawPagesInRect:(NSRect)rect toContext:(CGContextRef)context {
PDFDisplayBox *box = [self displayBox];
CGFloat scale = [self scaleFactor];
+ CGContextSetInterpolationQuality(context, [self interpolationQuality] ==
kPDFInterpolationQualityNone ? kCGInterpolationNone : [self
interpolationQuality] == kPDFInterpolationQualityLow ? kCGInterpolationLow :
kCGInterpolationHigh);
+ CGContextSetShouldAntialias(context, [self shouldAntiAlias]);
for (PDFPage *page in [self visiblePages]) {
NSRect pageRect = [self convertRect:[page boundsForBox:box]
fromPage:page];
if (NSIntersectsRect(pageRect, rect) == NO) continue;
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