You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Windows, open_graph dimensions do not take into account the height of the title bar, meaning it takes some default 17px from the top of the window things (I don't know exactly what), which means that the window is cropped at the top and at the right, which has to be manually compensated. Also, from OCaml we cannot see the actual height, which is customizable, but the C code could.
On another note, resize_window is not implemented, and it certainly would be great to have it (else as of now the window always has the size defined in the open_graph).
You may want to try it and confirm whether it works for you.
Since this project is not actively developed, am not sure how likely it is that these fixes (if they are indeed correct) will be integrated. But in any case, it would be great if you could confirm whether they fix things on your side.
Thank you for answering!
Though I'm not much of a C programmer, it looks good to me.
(It will take me a bit of time to test it, as I'm on linux and it happened as I tried to make my code work on someone else's windows computer.)
About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?
About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?
The Graphics library is not deprecated properly speaking, just not actively developed and barely maintained because nobody seems to care enough about it to contribute actual code to improve it.
Concerning alternatives, the OCaml-SDL bindings look rather popular, if only because there are several of them...
Activity
nojb commentedon Oct 12, 2024
Dear @agoujot, thanks for the bug report!
I was able to reproduce both of your issues. I tried a quick fix over at
master...nojb:graphics:fix_win32
You may want to try it and confirm whether it works for you.
Since this project is not actively developed, am not sure how likely it is that these fixes (if they are indeed correct) will be integrated. But in any case, it would be great if you could confirm whether they fix things on your side.
agoujot commentedon Oct 12, 2024
Thank you for answering!
Though I'm not much of a C programmer, it looks good to me.
(It will take me a bit of time to test it, as I'm on linux and it happened as I tried to make my code work on someone else's windows computer.)
About graphics' support, do you know why it was deprecated, as it's pretty good and I didn't find alternatives as good, despite graphics' being very old and nearly unmaintained?
xavierleroy commentedon Oct 15, 2024
The Graphics library is not deprecated properly speaking, just not actively developed and barely maintained because nobody seems to care enough about it to contribute actual code to improve it.
Concerning alternatives, the OCaml-SDL bindings look rather popular, if only because there are several of them...