Skip to main content
GameDev.net gamedev.net
🔒 Locked

Drawing Program Questions

Started by malpass Aug 4, 2003 at 7:23 AM 0 replies 200+ views
Original Post
malpass
malpass
OK, I decided to make a simple drawing program this morning cuz I was bored. So fars its got a nifty color selector with a fill and erase color, a toolbar with a working pencil tool to start with that can use the fill (left click) color and erase with right, like paint (I''ll add them last cuz i''ll make a whole bunch). It has the following working menu items: New, Open..., Save, Save As..., Print, Exit, Image Size, ViewColorBar,ToolBar,StatusBar). My question is first off, when the mouse enters the image that is being editted I change the cursor to another, but for some reason this cursor is always appearing in b&w, so I took a peak at paints icons and they were b&w. Is this because they have to be or is that just how paint decided to have them? Either way, anyone know a way to fix this. Second, before I can add a copy, cut, paste etc.. I''ll need the selection tool made because you cant select anything to copy cut etc.. without it. When I started to think about it I wondered how would I go about makng it correctly. IE When you are dragging it creates a smooth dotted box. Is this a built it efficient function like a caret or are they just drawing it like you would when creating a line? And finally, if anyones made a program like this do they have any advice on this tool and the making in general.
Nik02
Nik02
1: Most professional graphics progs draw the 'drawing cursor' using xor blending mode. It basically 'inverts' the image on it's pixels.
The beauty of this method is that you can restore the original color by drawing the icon again on the same place.
EDIT: (Paint doesn't do it this way. It uses standard bw cursors, which has been the programmer's decision.)

2: I recommend using the xor blending mode here, too.
It's the method paint (and windows in general) uses when drawing selection rects.

The best advice is that don't try to emulate Paint, but preferably look at Photoshop, Paint Shop Pro or Gimp for ideas

[edited by - Nik02 on August 5, 2003 11:30:59 AM]
Niko Suni

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.