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

List:       kde-kimageshop
Subject:    Re: Infinite canvas issues
From:       Cyrille Berger <cberger () cberger ! net>
Date:       2009-06-30 17:50:17
Message-ID: 200906301950.20719.cberger () cberger ! net
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Tuesday 30 June 2009, LukasT.dev@gmail.com wrote:
> Hi,
>
> I implemented infinite canvas and now I need to fix related issues.
Cool :)

> The one I don't know much about is about "painting preview". Is it correct
> name for it? When you paint, you see what you paint and just small update
> rectangle is updated. You can watch my problem on video[1]. I tested the
> updating using kwin and its "Show paint" effect but the whole canvas is
> updated in Krita. Could you direct me to the code? It is in paintEvent of
> the QPainterCanvas? ev->rect? I tried that but without luck (I moved that
> rect but I did not see what i painted until i scrolled with wheel to
> generate event and have updated widget)
Well. Update of a widget is made by a call to "QWidget::update()", and are the 
actual painting is executed later when the control go back to the execution of 
the main loop. This make the updating more efficient, since (among other things) 
Qt can merge multiple update in a single update, but this makes it much more 
difficult to trace since there is no direct connection during the actual widget 
painting and whatever triggered it. So the only way is to track call to 
"QWidget::update()", either by grepping in the code, or setting a breakpoint 
in gdb.

-- 
Cyrille Berger

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; \
font-weight:400; font-style:normal;">On Tuesday 30 June 2009, LukasT.dev@gmail.com \
wrote:<br> &gt; Hi,<br>
&gt;<br>
&gt; I implemented infinite canvas and now I need to fix related issues.<br>
Cool :)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>&gt; The one I don't know much about is about "painting \
preview". Is it correct<br> &gt; name for it? When you paint, you see what you paint \
and just small update<br> &gt; rectangle is updated. You can watch my problem on \
video[1]. I tested the<br> &gt; updating using kwin and its "Show paint" effect but \
the whole canvas is<br> &gt; updated in Krita. Could you direct me to the code? It is \
in paintEvent of<br> &gt; the QPainterCanvas? ev-&gt;rect? I tried that but without \
luck (I moved that<br> &gt; rect but I did not see what i painted until i scrolled \
with wheel to<br> &gt; generate event and have updated widget)<br>
Well. Update of a widget is made by a call to "QWidget::update()", and are the actual \
painting is executed later when the control go back to the execution of the main \
loop. This make the updating more efficient, since (among other things) Qt can merge \
multiple update in a single update, but this makes it much more difficult to trace \
since there is no direct connection during the actual widget painting and whatever \
triggered it. So the only way is to track call to "QWidget::update()", either by \
grepping in the code, or setting a breakpoint in gdb.<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- \
<br> Cyrille Berger</p></body></html>



_______________________________________________
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