RSS/Atom feed Twitter
Site is read-only, email is disabled

Creating a painting program using the GIMP or its widgets

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Creating a painting program using the GIMP or its widgets Kristoffer Lundén 07 Sep 22:10
  Creating a painting program using the GIMP or its widgets Sven Neumann 07 Sep 22:33
Kristoffer Lundén
2004-09-07 22:10:15 UTC (over 19 years ago)

Creating a painting program using the GIMP or its widgets

Hello folks. I have this idea to create a specialized painting program, something that would allow you to paint (with a tablet), while getting as little as possible in the way of the actual painting. Currently I am investigating different possibilities and approaches, and I would really appreciate some input here. If you would be so kind to bear with me, I'll provide some background. Please forgive the lengthiness. =)

I am a student at a game developers school in Sweden, and one of the things we do for fun is to "compete" in speed painting with weekly themes - lots of people draw a lot more than that, but I'm no gfx artist, just in it for the fun. Anyway, some people use Photoshop, some use more specialized programs like OpenCanvas in different versions and so on.

General feeling is that there is some fundamental flaw with most of these programs when it comes to doing paintings. Photoshop, for instance can do anything you need, but the interface is really backwards for the job. OC on the other hand, may lack functionality or just have some stuff that should be changed. When discussing stuff like that back and forth, we came up with a few ideas on how a drawing program should behave, and I started thinking that it might be possible to actually write one - and open source would be even better, anyone could at least theoretically get the app they wanted.

Before anything else, I started looking around for GUI toolkits and the like that could be used for this - the musts that such a toolkit should have were:

* Tablet support - the program would be really tablet centered, so we want to leverage what a tablet can do. This includes tilt, using the eraser and so on.
* Windows support - most people I know use it and won't switch no matter what, however I would like Linux support since that is what I use at home. If other platforms like Mac are easy to add, so much better.
* Enough basic image manipulation and viewing for it to be not too hard to implement different brushes that are more than just adding pixels to a bitmap. This should be for artists, not a MS Paint clone. ;-)
* Open source - is not an actual must, but a strong preference, and probably the only viable way anyways.

Looking around some, what I found that seemed to fit all these things (although I haven't actually tried tablet support, not on any platform) would be GTK+. I read up a bit on the docs, and it seemed that such a thing could be done in it, but would require quite some effort (might be mistaken). I went further and had a look at GIMP, which I use now and then, but I rarely do image manipulation, so I'm not that familiar with it.

Anyhow, playing around with GIMP the application, most or all things that is needed (and much, much more) already is there, but the interface is not at all suited for this job. Don't get me wrong, for image processing it probably is very fitting, but for drawing, you ideally want to have the tablet under one hand and the other hand on the keyboard, with everything common possible to do without moving either. This is actually one of the goals I have, once the basic colors are on the canvas, you should not need any other window, not even the color selector, and all commands accessible under the left (or right) half of the keyboard together with the tablet. See later for examples. Anyhow, the GIMP as it is is not suitable for this task, you don't want to right-click-context everything, you just want to draw. ;-)

I also downloaded the source, read through most of the devel-docs and looked around a little - but I find the project is really big and hard to grasp. Add to that that I'm not all that good at C, although I can usually modify other peoples code. ;-) I prefer to code in scripting languages, but I'm not afraid to get my hands dirty if that is the best approach and I can get some help.

Anyhow, now we are closing in on my actual questions; it is pretty hard to formulate them, because first and foremost I actually need advice on the best approach for something like this, if it is viable at all. I can think of several ways to go:

* Writing an application from scratch, using GTK+ and GIMP widgets/functions/etc. Question here is if that is possible, at least easily enough. Can the GIMP libraries be used like that? * Modifying the GIMPs interface somehow: - By actually forking, tearing apart and rearranging - not a tempting idea for many reasons
- By creating a parallell main and building it up that way, using only the parts needed
- By modifying the UI somehow, via plugins or the like - is that possible? The absolute ideal on many levels would actually be a plugin that allowed you to switch interface while retaining the whole GIMP. This I like the most, because it doesn't hurt to have all the extra functions for image manip, they should just get out of the way while doing the painting. Especially if it could be accomplished via some kind of scripting, so there would be no need for compiling on several platforms. I've googled and looked around for lots of these resources, but not found anything about controling the UI, other than some hints. Is this a possible way?

Well, I've tons more questions really, but they are very dependant on what approach I should take. Ideally, I'd be able to do this mainly as a plugin which alters the interface, and via script. ;-) Some widgets might need modifying too, like the color selector - if that is important, would that affect the approach? I'd love to hear what you think is the best way to go about this, and any pointers on how and where to get started of course... or, if the answer is simply "don't", then don't hesitate to say so either. =)

To clarify a little bit more what I had in mind, I've also sketched out a first draft of a feature list/description, maybe that will help clarifying what I mean. The basis is in OC 1.1, the program I use, and which I think has the right idea, just not all the way. Yet other stuff is things people have said to me as a wish. ;-)

"Unnamed Drawing Program" * should focus totally on simplicity, almost everything common and non-trivial should be possible via shortcuts mapped to tablet + what is under the left hand on the keyboard shortcuts. Example shortcuts could be stuff like:
- SHIFT - pick color under cursor
- CTRL+Drag - change brush size
- CTR+ALT+Drag - rotate image
- E/R - wander around in last useed brushes/brushsizes - Q/W - zoom in /out
- SPACE + Drag - drag the image in the viewport - Double-click - fill area under cursor with current color and so on (examples only, some maybe silly).
* It should be possible to wander around in the choosen color in steps of say 10 or something like that via easily accessible keys too. Another wish is a bigger color selector for more fine grained choosing.
* Several images should be able ot be open, and you should be able to load external images. Layers would be very nice. =) * Stuff like multiply is needed for good drawing. * Typical windows apart from image windows are: - color selector, preferably with big color "pixels" - preview window, the navigation one in gimp is good - some kind of brush editor, size, opacity, radius etc is probably important, as is type of brush and stuff like that. will have to be worked out exactly what.
- if other gimp windows are available that is no minus, of course. But not by default.
* Extremely cool features that OC has would be network drawing collaborately and the recording of event files. But that is more wish than must.
* Must work under Windows, Linux + other is high on wishlist. * Must have tablet support.

There is more that is in my head, and if this takes off, or someone simply is interested, I'll be happy to elaborate. Don't hesitate to ask for clarifications where needed. But for now, I hope this makes *any* sense at all, at least enough to tell me whether it is feasible and of so, if using GIMP one way or the other is the best approach.

Thanks for your time. =)

Sven Neumann
2004-09-07 22:33:47 UTC (over 19 years ago)

Creating a painting program using the GIMP or its widgets

Hi,

Kristoffer Lundén writes:

Anyhow, playing around with GIMP the application, most or all things that is needed (and much, much more) already is there, but the interface is not at all suited for this job. Don't get me wrong, for image processing it probably is very fitting, but for drawing, you ideally want to have the tablet under one hand and the other hand on the keyboard, with everything common possible to do without moving either. This is actually one of the goals I have, once the basic colors are on the canvas, you should not need any other window, not even the color selector, and all commands accessible under the left (or right) half of the keyboard together with the tablet. See later for examples. Anyhow, the GIMP as it is is not suitable for this task, you don't want to right-click-context everything, you just want to draw. ;-)

I don't think you need a new program or do a lot of hacking. All you need is to configure some more keyboard shortcuts than what GIMP comes with preconfigured. Then press F11 for fullscreen mode and start drawing. I suggest you use the 2.1 development version since it allows to bind a lot more functions to keyboard shortcuts (or other input devices). I think all of the functions you listed are already available. If there is stuff missing that you need, tell us about it.

Sven