Add Support for Perspective Ellipse in Krita for SoK

Srirupa Datta srirupa.sps at gmail.com
Wed Jan 12 11:28:41 GMT 2022


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.

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.

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.

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?

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?


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20220112/f5bd68ed/attachment.htm>


More information about the kimageshop mailing list