Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/* This file is part of the KDE project
* SPDX-FileCopyrightText: 2009 Boudewijn Rempt <[email protected]>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "kis_tool_ellipse_base.h"
#include <KoPointerEvent.h>
#include <KoCanvasBase.h>
#include <KoCanvasController.h>
#include <KoViewConverter.h>
#include "KisViewManager.h"
#include "kis_canvas2.h"
KisToolEllipseBase::KisToolEllipseBase(KoCanvasBase * canvas, KisToolEllipseBase::ToolType type, const QCursor & cursor)
: KisToolRectangleBase(canvas, type, cursor)
{
}
void KisToolEllipseBase::paintRectangle(QPainter &gc, const QRectF &imageRect)
{
KIS_ASSERT_RECOVER_RETURN(canvas());
QRect viewRect = pixelToView(imageRect).toRect();
QPainterPath path;
path.addEllipse(viewRect);
getRotatedPath(path, viewRect.center(), getRotationAngle());
path.addPath(drawX(pixelToView(m_dragStart)));
path.addPath(drawX(pixelToView(m_dragCenter)));
paintToolOutline(&gc, path);
}
bool KisToolEllipseBase::showRoundCornersGUI() const
{
return false;
}