I found affine transformation functionality (rotate, shear, translate, scale) in Athens/Cairo in Pharo Smalltalk.
I am looking for a perspective transformation. Is this possible at all? At least there seem to be no convenience methods for this in the Cairo API.
There is no perspective transformation, because matrices used in computation is 2x3 affine matrices, which cannot produce such transformation (no combination of scale/rotation on 2-D coordinate space can produce such result). OpenGL uses full 4x4 matrix for coordinate transformations (well, usually it is 3x3 + translation column), but it is enough to create transformations like perspective projection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With