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

List:       kde-kimageshop
Subject:    paintop brush model
From:       Lukast dev <lukast.dev () gmail ! com>
Date:       2009-07-27 11:02:22
Message-ID: a12ea5980907270402q31b61162vfaf63af3e54899d1 () mail ! gmail ! com
[Download RAW message or body]

Hi,

today I explored the posibilities and I would like to ask you questions.

I modified the Line tool , so that it draws preview of the tool
according the canvas widget.
So there is code in paint like this:

void KisToolLine::paintLine(QPainter& gc, const QRect&)
{
    if (m_canvas->canvasController()->isCanvasOpenGL()){
        OpenGL code here...
    }else ... {
       QPainter stuff
    }
}

I'm asking you, should I use if's or make some interface with method
paintOpenGL stuff and then
call this paintOpenGL preview in OpenGL based canvas on every tool
that will inherite from that interface?

Or rather keep the style consistent with gradient tool preview and use
#ifdefs (HAVE_OPENGL) etc. etc.?

What can be a problem:
some tools also need code in mouseMoveEvent etc. so I doin't know how
to implement it nicely.
There can be some math needed for painting previews specific for OpenGL canvas.

Then I have plan to add support for every paintop. Tool freehand will
ask for model from paintop and it will paint that model if the OpenGL
canvas is used.
Every paintop will have it's obj file and user will set up in settings
whether he wants to use brush outline or brush model or tool icon.

What do you think?
Lukas
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

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