Prism icon indicating copy to clipboard operation
Prism copied to clipboard

Edge cases when `tilt` is set to `0`

Open aheze opened this issue 3 years ago • 0 comments

When the tilt is set to 0, this gets printed in the console:

ignoring singular matrix: ProjectionTransform(m11: 0.0, m12: 1.0, m13: 0.0, m21: 0.0, m22: 1.0, m23: 0.0, m31: 0.0, m32: 0.0, m33: 1.0)
ignoring singular matrix: ProjectionTransform(m11: 0.0, m12: 1.0, m13: 0.0, m21: 0.0, m22: 1.0, m23: 0.0, m31: 0.0, m32: 0.0, m33: 1.0)
ignoring singular matrix: ProjectionTransform(m11: 0.0, m12: 1.0, m13: 0.0, m21: 0.0, m22: 1.0, m23: 0.0, m31: 0.0, m32: 0.0, m33: 1.0)
ignoring singular matrix: ProjectionTransform(m11: 0.0, m12: 1.0, m13: 0.0, m21: 0.0, m22: 1.0, m23: 0.0, m31: 0.0, m32: 0.0, m33: 1.0)
ignoring singular matrix: ProjectionTransform(m11: 0.0, m12: 1.0, m13: 0.0, m21: 0.0, m22: 1.0, m23: 0.0, m31: 0.0, m32: 0.0, m33: 1.0)

Also, the shadow gets significantly darker:

https://user-images.githubusercontent.com/49819455/192589013-f6b2d63a-f914-4db8-877e-7b170601201c.mov

Could this be due to CGAffineTransform edge cases when the value is 0? Maybe we should have an if check for 0 and adjust as needed.

Current workaround

Set the shadow opacity to 0 when settings the shadow to 0.

aheze avatar Sep 27 '22 16:09 aheze