[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: Line tool preview
From: Sven Langkamp <sven.langkamp () gmail ! com>
Date: 2009-07-10 14:11:40
Message-ID: 478b087a0907100711v1f26bc45w831a4b06814de272 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Fri, Jul 10, 2009 at 4:00 PM, LukasT.dev@gmail.com
<lukast.dev@gmail.com>wrote:
> Hi,
> I noticed little stuff that can be done differently.
>
> Take a look at the method KisToolLine::paintLine(QPainter& gc, const
> QRect&)
> for painting line-preview when you use line tool:
> http://pastebin.com/m2cba0f11
>
> I think that instead of static_cast<int> we could use qRound as it is more
> precise. 0,7 is 0 with static_cast. With qRound 1.
>
> I'm not sure, that's why I'm asking.
>
> If you agree to use qRound, I can commit.
> Lukas
>
You could simply use QPointF instead. I think that is still from the Qt 3
times.
[Attachment #5 (text/html)]
<br><br><div class="gmail_quote">On Fri, Jul 10, 2009 at 4:00 PM, <a \
href="mailto:LukasT.dev@gmail.com">LukasT.dev@gmail.com</a> <span dir="ltr"><<a \
href="mailto:lukast.dev@gmail.com">lukast.dev@gmail.com</a>></span> wrote:<br> \
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br> I noticed little stuff that \
can be done differently.<br> <br>
Take a look at the method KisToolLine::paintLine(QPainter& gc, const \
QRect&)<br> for painting line-preview when you use line tool:<br>
<a href="http://pastebin.com/m2cba0f11" \
target="_blank">http://pastebin.com/m2cba0f11</a><br> <br>
I think that instead of static_cast<int> we could use qRound as it is more<br>
precise. 0,7 is 0 with static_cast. With qRound 1.<br>
<br>
I'm not sure, that's why I'm asking.<br>
<br>
If you agree to use qRound, I can commit.<br>
Lukas<br></blockquote></div><br>You could simply use QPointF instead. I think that is \
still from the Qt 3 times.<br>
_______________________________________________
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