Sudha247 / ocaml-joy

MIT License
22 stars 14 forks source link

Normalise to a co-ordinate system with (0, 0) at the center #36

Closed nikochiko closed 1 year ago

nikochiko commented 1 year ago

The canvas provided by graphics library starts with (0, 0) at the bottom-left corner and all positive co-ordinates. it's easier to draw on a canvas with (0, 0) at the center because then the exact dimensions of the canvas don't matter that much.

Transformations such as translate already help with this, because shapes start in the center by default and translate can take both positive and negative values for dx and dy. For completeness though, we should also do this by default for new shapes that are created when the optional x and y is provided.

As part of this task:

nangahamandine commented 1 year ago

Hi, can I work on this?

nikochiko commented 1 year ago

Sure, go ahead

nangahamandine commented 1 year ago

Okay, thanks

nangahamandine commented 1 year ago

I want to redo all the changes I made and open another PR in order to effectively implement the necessary changes. My apologies for all the confusion. Please give me time to go through all your corrections again and redo the issue. Thank you for being patient with me.

nikochiko commented 1 year ago

Merged: https://github.com/Sudha247/ocaml-joy/pull/43