KMGuideCoverView.swift 634 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // KMGuideCoverView.swift
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by Niehaoyu on 2023/12/8.
  6. //
  7. import Cocoa
  8. class KMGuideCoverView: NSView, NibLoadable {
  9. override func draw(_ dirtyRect: NSRect) {
  10. super.draw(dirtyRect)
  11. guard let context = NSGraphicsContext.current?.cgContext else {
  12. return
  13. }
  14. NSColor(red: 1, green: 1, blue: 1, alpha: 0.01).set()
  15. context.addRect(dirtyRect)
  16. context.fillPath()
  17. context.setBlendMode(.clear)
  18. context.fillPath()
  19. }
  20. override func awakeFromNib() {
  21. super.awakeFromNib()
  22. }
  23. }