Compare commits
2 Commits
31edd35463
...
9d2f1e4c90
Author | SHA1 | Date | |
---|---|---|---|
|
9d2f1e4c90 | ||
|
39a53cdb1d |
@ -311,13 +311,13 @@ extension Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var linkedElements: [LinkedElement] {
|
var linkedElements: [LinkedElement] {
|
||||||
let items = sortedItems
|
let items = sortedItems.filter { $0.state == .standard }
|
||||||
let connected = items.enumerated().map { i, element in
|
let connected = items.enumerated().map { i, element in
|
||||||
let previous = i+1 < items.count ? items[i+1] : nil
|
let previous = i+1 < items.count ? items[i+1] : nil
|
||||||
let next = i > 0 ? items[i-1] : nil
|
let next = i > 0 ? items[i-1] : nil
|
||||||
return (previous, element, next)
|
return (previous, element, next)
|
||||||
}
|
}
|
||||||
return connected + elements.filter { !$0.state.isShownInOverview }.map { (nil, $0, nil )}
|
return connected + elements.filter { $0.state != .standard }.map { (nil, $0, nil )}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -251,11 +251,7 @@ final class ImageGenerator {
|
|||||||
let sourceRep = image.representations[0]
|
let sourceRep = image.representations[0]
|
||||||
let destinationSize = NSSize(width: sourceRep.pixelsWide, height: sourceRep.pixelsHigh)
|
let destinationSize = NSSize(width: sourceRep.pixelsWide, height: sourceRep.pixelsHigh)
|
||||||
.scaledDown(to: desiredWidth)
|
.scaledDown(to: desiredWidth)
|
||||||
//image.size.scaledDown(to: desiredWidth)
|
|
||||||
|
|
||||||
print("\(job.destination):")
|
|
||||||
print(" Source: \(image.size.width) x \(image.size.height)")
|
|
||||||
print(" Wanted: \(destinationSize.width) x \(destinationSize.height) (\(job.width))")
|
|
||||||
// create NSBitmapRep manually, if using cgImage, the resulting size is wrong
|
// create NSBitmapRep manually, if using cgImage, the resulting size is wrong
|
||||||
let rep = NSBitmapImageRep(bitmapDataPlanes: nil,
|
let rep = NSBitmapImageRep(bitmapDataPlanes: nil,
|
||||||
pixelsWide: Int(destinationSize.width),
|
pixelsWide: Int(destinationSize.width),
|
||||||
|
Loading…
Reference in New Issue
Block a user