Skip to content

Commit

Permalink
Clean up after export changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arclite committed Jun 22, 2024
1 parent 3eba0d1 commit 89b1bd4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 107 deletions.
71 changes: 0 additions & 71 deletions Automator/Sources/RedactActionExportOperation.swift

This file was deleted.

24 changes: 0 additions & 24 deletions Automator/Sources/RedactedImageExporter.swift

This file was deleted.

6 changes: 2 additions & 4 deletions Modules/Capabilities/Brushes/Sources/BrushStampFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import AppKit
import ErrorHandlingMac
import GeometryMac
import OSLog

public enum BrushStampFactory {
public static func brushImages(for shape: Shape, color: NSColor, scale: CGFloat) throws -> (CGImage, CGImage) {
Expand All @@ -29,7 +28,6 @@ public enum BrushStampFactory {
private static func scaledImage(from image: NSImage, toHeight height: CGFloat, color: NSColor) throws -> CGImage {
let brushScale = height / image.size.height
let scaledBrushSize = image.size * brushScale
os_log("scaling brush images from %{public}@ to %{public}@, scale: %{public}f", String(describing: image.size), String(describing: scaledBrushSize), brushScale)

guard let imageRep = NSBitmapImageRep(
bitmapDataPlanes: nil,
Expand Down Expand Up @@ -146,7 +144,7 @@ public enum BrushStampFactory {
}

guard let scaledCGImage = scaledBrushImage.cgImage else {
throw BrushStampFactoryError.cannotGenerateCGImage(color: color, scale: 1)
throw BrushStampFactoryError.cannotGenerateStampCGImage(color: color, scale: 1)
}

return scaledCGImage
Expand All @@ -155,6 +153,6 @@ public enum BrushStampFactory {

enum BrushStampFactoryError: Error {
case cannotGenerateCGImage(shape: Shape, color: UIColor, scale: CGFloat)
case cannotGenerateCGImage(color: UIColor, scale: CGFloat)
case cannotGenerateStampCGImage(color: UIColor, scale: CGFloat)
}
#endif
8 changes: 0 additions & 8 deletions Modules/Capabilities/Brushes/Sources/NSImageExtensions.swift

This file was deleted.

0 comments on commit 89b1bd4

Please sign in to comment.