22

Hey everyone,

Basically the title. I'd like to learn how to make my own drawing program and I'm slightly surprised that I can't seem to find anything about it. No tutorials or discussions about requirements or just general tutorials.

Does anyone have any recommendations on where I could start?

you are viewing a single comment's thread
view the rest of the comments
[-] VaxHacker@programming.dev 3 points 21 hours ago

There are a few basic things you need to sort out first. Keep it as simple as possible so start monochrome, and just add functionality to draw dots on a canvas. You'll need file handling capability almost immediately so figure out a way to (de-)serialise the information to recreate the artwork to read and write it to a file.

That'll keep you going for a few weeks, unless you're vibing it ~~in which case months~~ by which point you might have had other ideas of features to add, assuming you already know how to write GUI applications.

Interesting point about monochrome. If I remember correctly though, pixels are rendered with rgba values right? So does monochrome do anything programmatically different than color? Or maybe grayscale does?

And no, i'm not vibing this...i want to learn how to do this myself and not just regurgitate some hallucinated bullshit.

I am lacking in how to write GUI applications without using a game engine. I used a lot of Unity with C# and way before that I was using actionscript with Flash lol but other than a handful of WPF apps and WinForms with Powershell I haven't done straight GUI applications.

[-] IMALlama@lemmy.world 2 points 12 hours ago

Monochrome just means "a painting, drawing, or photograph in a single hue." But I think their intent was trying to describe an absolute minimum editor. Think Microsoft paint with the pencil tool but it only draws a single pixel per click.

Their list of things is fairly reasonable and will result in a fairly long main quests arc. Example. Depending on your familiarity with these items, as well as your familiarity with rust, it could keep you busy for a while in a non-throwaway way.

I wonder if part of the reason you're running into a wall is because you're asking what could be one of many different questions and haven't provided many hints to help infer intent.

For example, you could be asking "how do I write a Rust application with a GUI if Rust doesn't provide out of the box GUI functionality?" In the case you'll need to use one of the many GUI libraries that are out there. These will let you do screen layout, add buttons, etc.

You might also be asking, "am I going to have to build my own UI elements, like buttons and menus, from scratch?". The answer to this is no, unless you want some kind of new/novel UI element. For example, I made a checked list box item in C# about 8 years ago. All the GUI libraries will provide mechanisms to declare and position things like menus and buttons. They'll also provide hooks to let your application know the user did a thing.

Finally, you might be asking about how to actually draw/render the picture portion of your graphics editor. The GUI library you choose will significantly impact this. Example. Example. Example. Note that these may or may not be good choices to use.

this post was submitted on 31 Dec 2025
22 points (100.0% liked)

Rust

7628 readers
218 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS