@@ -4,7 +4,7 @@ import Foundation
44
55public enum CGContextCoordinates {
66 case original
7- case adjusted
7+ case natural
88}
99
1010extension Image where Pixel == RGBA < UInt8 > {
@@ -350,7 +350,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt8> {
350350 )
351351 }
352352
353- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
353+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
354354 let width = self . width
355355 let height = self . height
356356
@@ -369,7 +369,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt8> {
369369 switch coordinates {
370370 case . original:
371371 break
372- case . adjusted :
372+ case . natural :
373373 context. scaleBy ( x: 1 , y: - 1 )
374374 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
375375 }
@@ -430,7 +430,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt16> {
430430 )
431431 }
432432
433- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
433+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
434434 let width = self . width
435435 let height = self . height
436436
@@ -449,7 +449,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt16> {
449449 switch coordinates {
450450 case . original:
451451 break
452- case . adjusted :
452+ case . natural :
453453 context. scaleBy ( x: 1 , y: - 1 )
454454 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
455455 }
@@ -510,7 +510,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt32> {
510510 )
511511 }
512512
513- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
513+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
514514 let width = self . width
515515 let height = self . height
516516
@@ -529,7 +529,7 @@ extension Image where Pixel == PremultipliedRGBA<UInt32> {
529529 switch coordinates {
530530 case . original:
531531 break
532- case . adjusted :
532+ case . natural :
533533 context. scaleBy ( x: 1 , y: - 1 )
534534 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
535535 }
@@ -666,7 +666,7 @@ extension Image where Pixel == UInt8 {
666666 )
667667 }
668668
669- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
669+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
670670 let width = self . width
671671 let height = self . height
672672
@@ -685,7 +685,7 @@ extension Image where Pixel == UInt8 {
685685 switch coordinates {
686686 case . original:
687687 break
688- case . adjusted :
688+ case . natural :
689689 context. scaleBy ( x: 1 , y: - 1 )
690690 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
691691 }
@@ -746,7 +746,7 @@ extension Image where Pixel == UInt16 {
746746 )
747747 }
748748
749- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
749+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
750750 let width = self . width
751751 let height = self . height
752752
@@ -765,7 +765,7 @@ extension Image where Pixel == UInt16 {
765765 switch coordinates {
766766 case . original:
767767 break
768- case . adjusted :
768+ case . natural :
769769 context. scaleBy ( x: 1 , y: - 1 )
770770 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
771771 }
@@ -826,7 +826,7 @@ extension Image where Pixel == UInt32 {
826826 )
827827 }
828828
829- public mutating func withCGContext( coordinates: CGContextCoordinates = . adjusted , _ body: ( CGContext ) throws -> Void ) rethrows {
829+ public mutating func withCGContext( coordinates: CGContextCoordinates = . natural , _ body: ( CGContext ) throws -> Void ) rethrows {
830830 let width = self . width
831831 let height = self . height
832832
@@ -845,7 +845,7 @@ extension Image where Pixel == UInt32 {
845845 switch coordinates {
846846 case . original:
847847 break
848- case . adjusted :
848+ case . natural :
849849 context. scaleBy ( x: 1 , y: - 1 )
850850 context. translateBy ( x: 0.5 , y: 0.5 - CGFloat( height) )
851851 }
0 commit comments