When I run code like this in a CALayer
override open func draw(in ctx: CGContext) {
let rectDEVICESPACE = ctx.convertToDeviceSpace(bounds).size
print("bounds \(bounds)")
print("rectDEVICESPACE \(rectDEVICESPACE)")
After trying for many, many, many minutes we have found it impossible to find any transform or scale.
convertToDeviceSpace
always just returns the same thing.
Tried mountains of devices, simulators, etc etc.
What is a specific actual situation where convertToDeviceSpace
will do anything other than identity?
This is terrifying since the Apple documentation and all existing code samples use exactly that when, for example, figuring out the raw pixel size when you're blitting around. An error would be an enormous flaw.
What is a specific actual situation where convertToDeviceSpace
will do anything other than multiply by 1.0?
What am I doing wrong, specifically, in testing - that I never see any result other than just identity?