Closed nikochiko closed 4 months ago
I tried max w h
as the args and it caused distortions in the placement of shapes (i.e. a circle at 0,0 was not centered on the Y axis). I think the euclidean norm may work, I'll also test out a few of the aspect ratio correction equations I know.
Its very odd that it is doing this though, we aren't drawing on a pixel level and this shouldn't really be happening. Or at least, this doesn't happen with frameworks like p5.js or the others I've used. There may be something else at play, some config missing.
The denormalisation logic also needed to be corrected. I have a fix for this locally.
Code:
The initial cairo scaling must be done by
Cairo.scale (max w h) (max w h)
instead ofCairo.scale w h
.