I want to plot a pixel in blue at coordinates (100,100) on a canvas of size (200,200)
I think i can use the arsd module.
But i have no idea what "dub add" comment I should use.
What i should import
How this demo program would look.
Cfr,
https://www.reddit.com/r/scala/comments/1h2g8a2/simple_graphics_api/
https://www.reddit.com/r/fsharp/comments/1h2g7pv/simple_graphics_api/
Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 29 Plot one pixel in blue on a canvas | ||||
---|---|---|---|---|
| ||||
November 29 Re: Plot one pixel in blue on a canvas | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alain De Vos | On Friday, 29 November 2024 at 14:02:38 UTC, Alain De Vos wrote: >I want to plot a pixel in blue at coordinates (100,100) on a canvas of size (200,200) Check this lib from p0nce maybe https://code.dlang.org/packages/canvasity.
Couple of demos are presented in the description. |
November 29 Re: Plot one pixel in blue on a canvas | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sergey | On Friday, 29 November 2024 at 15:01:12 UTC, Sergey wrote: >On Friday, 29 November 2024 at 14:02:38 UTC, Alain De Vos wrote: >I want to plot a pixel in blue at coordinates (100,100) on a canvas of size (200,200) Check this lib from p0nce maybe https://code.dlang.org/packages/canvasity.
Couple of demos are presented in the description. Can i how the image on screen while i draw ? |
December 01 Re: Plot one pixel in blue on a canvas | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alain De Vos | On Friday, 29 November 2024 at 14:02:38 UTC, Alain De Vos wrote: >I want to plot a pixel in blue at coordinates (100,100) on a canvas of size (200,200) You can use Chitra library. It is still under active development, working on adding support for text and curves. Refer this documentation to install the dependencies and add Chitra to your project. Chitra is based on Cairo Graphics for 2D graphics and PangoCairo for rendering texts. https://github.com/aravindavk/chitra-d Example for your use case,
Or just run the file without installing it, like below. Create a file
And run as Let me know if this works for you. Thanks. |
December 01 Re: Plot one pixel in blue on a canvas | ||||
---|---|---|---|---|
| ||||
Posted in reply to Aravinda VK | On Sunday, 1 December 2024 at 16:40:56 UTC, Aravinda VK wrote: >On Friday, 29 November 2024 at 14:02:38 UTC, Alain De Vos wrote: >I want to plot a pixel in blue at coordinates (100,100) on a canvas of size (200,200) You can use Chitra library. It is still under active development, working on adding support for text and curves. Refer this documentation to install the dependencies and add Chitra to your project. Chitra is based on Cairo Graphics for 2D graphics and PangoCairo for rendering texts. https://github.com/aravindavk/chitra-d Example for your use case,
Or just run the file without installing it, like below. Create a file
And run as Let me know if this works for you. Thanks. Missed adding color in the above example (Also added the alternate syntax using
|