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

List:       kde-kimageshop
Subject:    Re: Add Support for Perspective Ellipse in Krita for SoK
From:       Srirupa Datta <srirupa.sps () gmail ! com>
Date:       2022-01-19 17:50:26
Message-ID: CAN9L-CG9HSkEHmPxJ7skRuv753EL-vwHPyQw2KydwVuhA6vWPQ () mail ! gmail ! com
[Download RAW message or body]

Hi,

I knew you were sick, hope you are better now. I've noticed that you
applied as a mentor for the project, thanks!

As for the button, I was thinking about some kind of enable button in the
Tools Option Docker.
I was talking to Dmitry about whether to extend to Ellipse Tool or Ellipse
Assistant Tool, he suggested that I extend the Ellipse Assistant Tool.
Actually the ellipse in the Ellipse Assistant Tool is transformable
contrary to the ellipse in the Ellipse Tool which is not transformable.
Also, I went through some of the code in EllipseAssistant.cc and it looked
like some of the functions, particularly related to transformation, have
already been implemented there.

On Wed, Jan 19, 2022 at 3:43 PM Halla Rempt <halla@valdyas.org> wrote:

> Hi,
>
> Sorry, I've been pretty sick, so I'm now trying to slowly catch up... I've
> applied as a mentor for your project, so that's settled.
>
> On woensdag 12 januari 2022 12:28:41 CET Srirupa Datta wrote:
> > Hey all,
> >
> > Since Dmitry is on vacation, I am writing here because I needed to
> clarify
> > a few things. I wanted to add support for Perspective Ellipse in Krita
> as a
> > part of Season of KDE.
> > The link for the feature request: Circle in a Square
> > <https://bugs.kde.org/show_bug.cgi?id=405643>
> >
> > Now, I wanted to clarify if this is roughly what I would be doing.
> >
> >
> > 1. Create a seperate button on Tools Option Docker for Ellipse Tool.
> >
>
> Ah, we need to be careful here: do you mean a new button in the toolbox,
> or a toggle in the option widget?
>
> > 2. When the perspective ellipse button is clicked, a circle in a square
> > figure appears on the canvas, the corners of the squares being
> adjustable.
> > The circle in a square can be moved to the desired location and corners
> can
> > be adjusted. 3. Now when the corners are adjusted, I need to use the
> > KisPerspectiveTransformStrategy::continuePrimaryAction() function to get
> > the transformation matrix from the four points and use that to transform
> > the circle to the corresponding ellipse.
>
> Yes.
>
> > 4. As Halla suggested, this transformation should not transform the
> pixels,
> > so I probably need to look into what other methods are there for
> > transforming.
>
> Yes, the stroke should be drawn using the current brush following the
> (qpainter)path created by the user when manipulating the perspective box.
>
> > 5. As for the mathematical part, I can use the transformation matrix on
> the
> > old circle/ellipse to convert it to the new ellipse, but the
> KisAlgebra2d::
> > transformEllipse() function uses the semimajor and semiminor axes
> lengths,
> > so would it possible to reuse that function by finding the major and
> minor
> > axes?
>
> I don't know -- maths is not my forte.
>
> >
> > 6. Also, just to be clear, I am extending the Ellipse Tool, not creating
> > another Assistant Tool(there is one Ellipse option in the Assistant Tool
> as
> > well), right?
>
> Yes, that is correct.
>
> >
> >
> > I have created a draft proposal which was reviewed by Halla earlier. The
> > details have been mentioned there. Link: Draft Proposal
> > <
> https://docs.google.com/document/d/1Bgi0og-YMkyU8rmVr9RuXyzi6f4YLretYk-HFSkG-d4/edit?usp=sharing
> >
> >
> >
> > With regards,
> >
> > Srirupa Datta
> >
> > IRC: sriru:matrix.org
> >
>
>
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Hi,  <div><br></div><div>I knew you were sick, hope you are better \
now. I&#39;ve noticed that you applied as a mentor for the project, thanks!<br><br>As \
for the button, I was thinking about some kind of enable button in the Tools Option \
Docker.<br>I was talking to Dmitry about whether to extend to Ellipse Tool or Ellipse \
Assistant Tool, he suggested that I extend the Ellipse Assistant Tool. Actually the \
ellipse in the Ellipse Assistant Tool is transformable contrary to the ellipse in the \
Ellipse Tool which is not transformable. Also, I went through some of the code in  \
<span style="color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap">EllipseAssista</span><span \
style="color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap">nt.cc and it looked \
like some of the functions, particularly related to transformation, have already been \
implemented there. </span></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Wed, Jan 19, 2022 at 3:43 PM Halla Rempt &lt;<a \
href="mailto:halla@valdyas.org">halla@valdyas.org</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Hi,<br> <br>
Sorry, I&#39;ve been pretty sick, so I&#39;m now trying to slowly catch up... \
I&#39;ve applied as a mentor for your project, so that&#39;s settled.<br> <br>
On woensdag 12 januari 2022 12:28:41 CET Srirupa Datta wrote:<br>
&gt; Hey all,<br>
&gt; <br>
&gt; Since Dmitry is on vacation, I am writing here because I needed to clarify<br>
&gt; a few things. I wanted to add support for Perspective Ellipse in Krita as a<br>
&gt; part of Season of KDE.<br>
&gt; The link for the feature request: Circle in a Square<br>
&gt; &lt;<a href="https://bugs.kde.org/show_bug.cgi?id=405643" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=405643</a>&gt;<br> &gt; <br>
&gt; Now, I wanted to clarify if this is roughly what I would be doing.<br>
&gt; <br>
&gt; <br>
&gt; 1. Create a seperate button on Tools Option Docker for Ellipse Tool.<br>
&gt; <br>
<br>
Ah, we need to be careful here: do you mean a new button in the toolbox, or a toggle \
in the option widget?<br> <br>
&gt; 2. When the perspective ellipse button is clicked, a circle in a square<br>
&gt; figure appears on the canvas, the corners of the squares being adjustable.<br>
&gt; The circle in a square can be moved to the desired location and corners can<br>
&gt; be adjusted. 3. Now when the corners are adjusted, I need to use the<br>
&gt; KisPerspectiveTransformStrategy::continuePrimaryAction() function to get<br>
&gt; the transformation matrix from the four points and use that to transform<br>
&gt; the circle to the corresponding ellipse.<br>
<br>
Yes.<br>
<br>
&gt; 4. As Halla suggested, this transformation should not transform the pixels,<br>
&gt; so I probably need to look into what other methods are there for<br>
&gt; transforming.<br>
<br>
Yes, the stroke should be drawn using the current brush following the (qpainter)path \
created by the user when manipulating the perspective box. <br> <br>
&gt; 5. As for the mathematical part, I can use the transformation matrix on the<br>
&gt; old circle/ellipse to convert it to the new ellipse, but the KisAlgebra2d::<br>
&gt; transformEllipse() function uses the semimajor and semiminor axes lengths,<br>
&gt; so would it possible to reuse that function by finding the major and minor<br>
&gt; axes?<br>
<br>
I don&#39;t know -- maths is not my forte.<br>
<br>
&gt; <br>
&gt; 6. Also, just to be clear, I am extending the Ellipse Tool, not creating<br>
&gt; another Assistant Tool(there is one Ellipse option in the Assistant Tool as<br>
&gt; well), right?<br>
<br>
Yes, that is correct.<br>
<br>
&gt; <br>
&gt; <br>
&gt; I have created a draft proposal which was reviewed by Halla earlier. The<br>
&gt; details have been mentioned there. Link: Draft Proposal<br>
&gt; &lt;<a href="https://docs.google.com/document/d/1Bgi0og-YMkyU8rmVr9RuXyzi6f4YLretYk-HFSkG-d4/edit?usp=sharing" \
rel="noreferrer" target="_blank">https://docs.google.com/document/d/1Bgi0og-YMkyU8rmVr9RuXyzi6f4YLretYk-HFSkG-d4/edit?usp=sharing</a>&gt;<br>
 &gt; <br>
&gt; <br>
&gt; With regards,<br>
&gt; <br>
&gt; Srirupa Datta<br>
&gt; <br>
&gt; IRC: sriru:<a href="http://matrix.org" rel="noreferrer" \
target="_blank">matrix.org</a><br> &gt; <br>
<br>
<br>
<br>
<br>
</blockquote></div>



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

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