mirror of
https://github.com/EmergeTools/Pow.git
synced 2026-03-30 09:45:54 +00:00
Co-authored-by: Robert Böhnke <robb@robb.is> Co-authored-by: Kasper Lahti <kasper@lahti.email>
13 lines
326 B
Swift
13 lines
326 B
Swift
import CoreGraphics
|
|
|
|
extension CGAffineTransform {
|
|
init(shearX x: CGFloat, y: CGFloat) {
|
|
self = .identity
|
|
self.c = x
|
|
self.b = y
|
|
}
|
|
}
|
|
|
|
func CGAffineTransformShear(_ t: CGAffineTransform, _ x: CGFloat, _ y: CGFloat) -> CGAffineTransform {
|
|
t.concatenating(CGAffineTransform(shearX: x, y: y))
|
|
}
|