NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

ALBEOLAMBDA just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Making an art program?

911 Views | 2 Replies
New Topic Respond to this Topic

Making an art program? Aug 13, 2021


So I wanna make an art program. Just simple art program? I dont know why the hell im asking here but I wanna make a program similar to paint.net. If anyone can give me some help it will be very appericated


BBS Signature

You'll need to work with a framework that allows you to manipulate bitmap information on a canvas, and then convert it to PNG/JPG/other formats as needed. This can be done in JS, in Flash, in SDL, and several other engines, but I'll be focusing on Flash/AS3 since it's what I'm most familiar with.


In AS3, that can be done with the flash.display.BitmapData class. You can create a canvas with it, and then capture mouse events (position, left/right mouse button, etc.) and use that to draw different shapes on the canvas in different colours, based on the colour that the user has selected.


I could go on and on but that would be too long; the gist of it is -- and this is true for any application, not just an art program -- to identify/specify your requirements:

  • What are your outputs? (A PNG, JPG or other raster image)
  • How can you get the inputs required to produce those outputs? (Through a canvas/bitmap data available in a framework of some kind)
  • What other inputs can influence the output? (E.g. a colour picker, a brush setting, etc.)

And repeat these three questions to as much detail as you want for all the inputs/outputs in your chain.


For example, taking the "colour" example above, say you want to draw a dot with different colours. You then have:

  • Output: coloured dot (blue, black, green, etc.)
  • Inputs required to produce those outputs: colour picker tool, hex code of colour from colour picker, use hex colour and setPixel32 to draw a dot with a colour that the user has selected
  • Inputs that can influence the output: filters (invert colour, glow, bloom filters could probably modify the "final" colour put down on the canvas)


And you stop when you have it already -- for example, a native ColourPicker component probably exists in flash, so you can assume that all the questions that need to be asked for that component have already been answered, and so you just need to focus on the outputs produced by the component itself.


Then you refer to the API reference to find out what you need to get what you want, and some of this comes with experience, the others by scanning the relevant areas of the documentation (some more roughly than others -- for example, you may not know that "bitmap data" is required to draw to canvas in AS3, but you do know that there may be things related to that in the flash.display package -- or if you search for how to draw canvases in AS3 on google, which leads you to the BitmapData class)


This isn't the only way to do this -- there's many other ways of decomposing a program into its parts. But at the end they all aim to do something similar, to allow you to get started on the smallest unit of work that is relevant to the ultimate goal you have in hand.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

Response to Making an art program? Oct 28, 2023


At 8/13/21 10:28 PM, GearToward wrote:So I wanna make an art program. Just simple art program? I dont know why the hell im asking here but I wanna make a program similar to paint.net. If anyone can give me some help it will be very appericated


for a simple one, i would recommend https://penguinmod.com as its very simple and as a tool called the "Pen Tool" which will be a life saver for you