[Digikam-devel] extragear/graphics/digikam/libs/widgets/imageplugins
Julien Narboux
jnarboux at narboux.fr
Tue Jul 14 15:49:59 BST 2009
I do not know for sure, but I think the only solution is to draw a
circle by hand at the current position of the cursor and not use the
functions to change the cursor...
Julien
Le 14 juil. 2009 à 16:28, Andi Clemens <andi.clemens at gmx.net> a
écrit :
> Hmm ok the cursor seems to work best in 32x32, and max seems to be
> 64x64 on
> some systems.
> I guess we can't do anything... ;-(
>
> Andi
>
> On Tuesday 14 July 2009 10:29:44 Andi Clemens wrote:
>> Really? But why is it working in Gimp and Krita?
>> Ok Gimp is GTK, but Krita uses KDE / Qt, too, they don't have such
>> limitations.
>>
>> Andi
>>
>> On Tuesday 14 July 2009 08:55:19 Julien Narboux wrote:
>>> Hi andi
>>>
>>> The limitation of the size of the cursor was made on purpose. When I
>>> tried a size bigger than 64 the drawing of the cursor was broken: I
>>> had some artefacts. It may depend on the platform, I think 64 is a
>>> limitation of x window.
>>>
>>> Julien
>>>
>>> Le 13 juil. 2009 à 23:46, Andi Clemens <andi.clemens at gmx.net> a
>>>
>>> écrit :
>>>> SVN commit 996141 by aclemens:
>>>>
>>>> I would suggest to display the draw cursor all the time, so it is
>>>> easier to set the correct size in the panel.
>>>> Right now we show the cursor only when pressing the mouse.
>>>>
>>>> One question: Why do we allow to set a size of 100 in the panel for
>>>> the
>>>> brush size, but disallow the maximum size in the mouseMoveEvent?
>>>> In there we only allow a max size of 64, which looks weird, because
>>>> the
>>>> mask "blob" we draw is bigger as the cursor.
>>>>
>>>> Is this some old, "wrong" code?
>>>>
>>>> Andi
>>>>
>>>> CCMAIL:digikam-devel at kde.org
>>>>
>>>> M +7 -4 imageguidewidget.cpp
>>>>
>>>>
>>>> --- trunk/extragear/graphics/digikam/libs/widgets/imageplugins/
>>>> imageguidewidget.cpp #996140:996141
>>>> @@ -720,7 +720,7 @@
>>>> d->spot.setX(e->x()-d->rect.x());
>>>> d->spot.setY(e->y()-d->rect.y());
>>>> }
>>>> - else if ((e->buttons() & Qt::LeftButton) && d-
>>>> >drawingMask)
>>>> + else if (d->enableDrawMask)
>>>> {
>>>> int size = d->penWidth;
>>>> if (size>64)
>>>> @@ -731,9 +731,12 @@
>>>> p.drawEllipse( 0, 0, size-1, size-1);
>>>> setCursor(QCursor(pix));
>>>>
>>>> - QPoint currentPos = QPoint(e->x()-d->rect.x(), e->y
>>>> ()-d-
>>>>
>>>>> rect.y());
>>>>
>>>> - drawLineTo(currentPos);
>>>> - updatePreview();
>>>> + if ((e->buttons() & Qt::LeftButton) && d->drawingMask)
>>>> + {
>>>> + QPoint currentPos = QPoint(e->x()-d->rect.x(), e-
>>>> >y
>>>> ()-d->rect.y());
>>>> + drawLineTo(currentPos);
>>>> + updatePreview();
>>>> + }
>>>> }
>>>> }
>>>> else
>>>> _______________________________________________
>>>> Digikam-devel mailing list
>>>> Digikam-devel at kde.org
>>>> https://mail.kde.org/mailman/listinfo/digikam-devel
>>>
>>> _______________________________________________
>>> Digikam-devel mailing list
>>> Digikam-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/digikam-devel
>>
>> _______________________________________________
>> Digikam-devel mailing list
>> Digikam-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/digikam-devel
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
More information about the Digikam-devel
mailing list