Fork me on GitHub
#quil
<
2023-01-19
>
dabrazhe12:01:46

Hi all. Is there a way to swap the coordinate Y, so that 0 will be in the lower left corner of the drawing, increasing upwards?

genmeblog12:01:20

Yes, but it's tricky. First (translate 0 height) then call (scale 1.0 -1.0) to flip over x axis.

genmeblog12:01:16

There will be issue with text, all printed letters will be upside down. So you have to revert translation/scaling and calculate a position manually.

dabrazhe12:01:45

I tried using camera, but it fails with an exception that the rendered is not supported

dabrazhe12:01:59

Thank you for the response. It's a shame is't not a standard setting though. The reversed axis makes it quite hard to reason about math functions

genmeblog13:01:51

Origin at top-left position and y-axis going down is typical in 2d graphics (any framework) since ages. I got used to it personally.

✔️ 2