[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KPaint
From:       Patrick Julien <freak () codepimps ! org>
Date:       2003-09-08 20:57:24
[Download RAW message or body]

On September 08, 2003 07:31 am, Michael Thaler wrote:
> Hello,
>
> I was thinking about writing a little KDE paint application. Since I
> am new to KDE programming I cannot write an application from scratch
> and I was thinking of improving kpaint. I already read through the
> source and I understand most of it (I hope).

You might be interested to look at Krita.  Most of what is found in KPaint 
actually used to in Krayon.  F.Y.I. Krita used to be called Krayon.

>
> First of all, how can I compile just kpaint? I don't know how to use
> automake and I don't want to write my own Makefile. Is there a
> possibility to use the Makefile from kdegraphics and just tell it to
> only compile kpaint? There are two Makefiles in the kpaint-directory:
> Makefile.am  Makefile.in. Can they be used to create a Makefile
> somehow?

Simplest way would be to just configure then cd kpaint.

>
> Second, reading through the code, I saw that there is a manager-class
> that handles the drawing tools. Why is this necessary? Wouldn't it be
> more clean to just use KRadioAction to create the toolbar for the
> drawing tools? The advantage would be, that one can use XMLUI and that
> the code is easier to read. Is there some reason, why KRadioAction is
> not used?

The manager class does not represent the GUI in this case, it is meant has a 
common place to hold the currently selected tool and manage instances of the 
tools.  See the state and flyweight design patterns for more info.

>
> I think a fill-tool would also be very nice. I guess with the current
> approach of KPaint it is not possible, because we cannot read out
> pixels from QPixmap. I think, a solution would be to paint to QPixmap
> and also to QImage and read the pixels then from QImage. GPaint has a
> fill-tool, so maybe I will have a look, how they do it.

I don't know what GPaint is, obviously it affiliated with gnome, but I don't 
if it's a class, a program or whatever.  In any case, unless it supports 
tiles, you won't have much luck porting the code over to Krita, this would 
work in Krayon/KPaint but would be somewhat impossible to optimize.

>
> It would be also nice to have some tools to oilify the picture
> etc. like GPaint.
>
> It would be nice if you can give me some hints how to setup a Makefile
> so that I can get started. I think I will set up my own CVS version,
> because I don't know if I get my inteded changes working and I don't
> know how much time I find for that. And I do not want to work on an
> official KDE application right now:-)

Guess that rules out Krita :)




 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic