Krita Source Code Documentation
Loading...
Searching...
No Matches
KoFlake.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006 Thomas Zander <zander@kde.org>
3 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net>
4 * SPDX-FileCopyrightText: 2010 Thorsten Zachmann <zachmann@kde.org>
5 *
6 * SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8#ifndef KOFLAKE_H
9#define KOFLAKE_H
10
11#include "kritaflake_export.h"
12
13class QGradient;
14class QRectF;
15class QPointF;
16class QSizeF;
17
18class KoShape;
19class QTransform;
20
21#include <Qt>
22
26namespace KoFlake
27{
32
40
46
53
66
76
84
98
99 KRITAFLAKE_EXPORT QPointF anchorToPoint(AnchorPosition anchor, const QRectF rect, bool *valid = 0);
100
102 HotPosition = 1410100299
103 };
104
106 KRITAFLAKE_EXPORT QGradient *cloneGradient(const QGradient *gradient);
107
108 KRITAFLAKE_EXPORT QGradient *mergeGradient(const QGradient *coordsSource, const QGradient *fillSource);
109
118 KRITAFLAKE_EXPORT QPointF toRelative(const QPointF &absolute, const QSizeF &size);
119
128 KRITAFLAKE_EXPORT QPointF toAbsolute(const QPointF &relative, const QSizeF &size);
129
130 KRITAFLAKE_EXPORT Qt::Orientation significantScaleOrientation(qreal scaleX, qreal scaleY);
131
132 KRITAFLAKE_EXPORT void scaleShape(KoShape *shape, qreal scaleX, qreal scaleY,
133 const QPointF &absoluteStillPoint,
134 const QTransform &postScalingCoveringTransform);
135
136 KRITAFLAKE_EXPORT void scaleShapeGlobal(KoShape *shape, qreal scaleX, qreal scaleY,
137 const QPointF &absoluteStillPoint);
138
139
140 KRITAFLAKE_EXPORT void resizeShape(KoShape *shape, qreal scaleX, qreal scaleY,
141 const QPointF &absoluteStillPoint,
142 bool useGlobalMode);
143
144 KRITAFLAKE_EXPORT void resizeShapeCommon(KoShape *shape, qreal scaleX, qreal scaleY,
145 const QPointF &absoluteStillPoint,
146 bool useGlobalMode,
147 bool usePostScaling, const QTransform &postScalingCoveringTransform);
148}
149
150#endif
KRITAFLAKE_EXPORT QGradient * cloneGradient(const QGradient *gradient)
clones the given gradient
Definition KoFlake.cpp:17
ShapeSelection
Definition KoFlake.h:70
@ Unselected
return the first unselected on top.
Definition KoFlake.h:72
@ Selected
return the first selected with the highest z-ordering (i.e. on top).
Definition KoFlake.h:71
@ ShapeOnTop
return the shape highest z-ordering, regardless of selection.
Definition KoFlake.h:74
@ NextUnselected
return the first unselected directly under a selected shape, or the top most one if nothing is select...
Definition KoFlake.h:73
KRITAFLAKE_EXPORT QGradient * mergeGradient(const QGradient *coordsSource, const QGradient *fillSource)
Definition KoFlake.cpp:54
AnchorPosition
Definition KoFlake.h:85
@ Left
Definition KoFlake.h:89
@ Right
Definition KoFlake.h:91
@ Bottom
Definition KoFlake.h:93
@ BottomRight
Definition KoFlake.h:94
@ Top
Definition KoFlake.h:87
@ TopRight
Definition KoFlake.h:88
@ NoAnchor
Definition KoFlake.h:95
@ TopLeft
Definition KoFlake.h:86
@ BottomLeft
Definition KoFlake.h:92
@ Center
Definition KoFlake.h:90
@ NumAnchorPositions
Definition KoFlake.h:96
KRITAFLAKE_EXPORT void resizeShape(KoShape *shape, qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint, bool useGlobalMode)
Definition KoFlake.cpp:209
KRITAFLAKE_EXPORT QPointF toRelative(const QPointF &absolute, const QSizeF &size)
Definition KoFlake.cpp:115
KRITAFLAKE_EXPORT void scaleShape(KoShape *shape, qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint, const QTransform &postScalingCoveringTransform)
Definition KoFlake.cpp:176
CanvasResource
Definition KoFlake.h:101
@ HotPosition
Definition KoFlake.h:102
KRITAFLAKE_EXPORT void scaleShapeGlobal(KoShape *shape, qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint)
Definition KoFlake.cpp:192
SelectionType
the selection type for KoSelection::selectedObjects()
Definition KoFlake.h:48
@ TopLevelSelection
Create a list, much like the StrippedSelection, but have the KoShapeGroup instead of all of its child...
Definition KoFlake.h:51
@ StrippedSelection
Create a stripped list, without children if the container is also in the list.
Definition KoFlake.h:50
@ FullSelection
Create a list of all user-shapes in the selection. This excludes KoShapeGroup grouping objects that m...
Definition KoFlake.h:49
StyleType
Definition KoFlake.h:80
@ Background
the background / fill style is active
Definition KoFlake.h:81
@ Foreground
the foreground / stroke style is active
Definition KoFlake.h:82
KRITAFLAKE_EXPORT QPointF anchorToPoint(AnchorPosition anchor, const QRectF rect, bool *valid=0)
Definition KoFlake.cpp:329
MarkerPosition
Definition KoFlake.h:41
@ EndMarker
Definition KoFlake.h:44
@ StartMarker
Definition KoFlake.h:42
@ MidMarker
Definition KoFlake.h:43
@ None
Definition KoFlake.h:34
@ Pattern
Definition KoFlake.h:37
@ Solid
Definition KoFlake.h:35
@ MeshGradient
Definition KoFlake.h:38
@ Gradient
Definition KoFlake.h:36
KRITAFLAKE_EXPORT QPointF toAbsolute(const QPointF &relative, const QSizeF &size)
Definition KoFlake.cpp:121
KRITAFLAKE_EXPORT Qt::Orientation significantScaleOrientation(qreal scaleX, qreal scaleY)
Definition KoFlake.cpp:168
KRITAFLAKE_EXPORT void resizeShapeCommon(KoShape *shape, qreal scaleX, qreal scaleY, const QPointF &absoluteStillPoint, bool useGlobalMode, bool usePostScaling, const QTransform &postScalingCoveringTransform)
Definition KoFlake.cpp:313
FillVariant
Definition KoFlake.h:28
@ StrokeFill
Definition KoFlake.h:30
@ Fill
Definition KoFlake.h:29
SelectionHandle
Enum determining which handle is meant, used in KoInteractionTool.
Definition KoFlake.h:55
@ BottomRightHandle
The handle that is at the bottom right of a selection.
Definition KoFlake.h:59
@ BottomLeftHandle
The handle that is at the bottom left of a selection.
Definition KoFlake.h:61
@ RightMiddleHandle
The handle that is at the right - center of a selection.
Definition KoFlake.h:58
@ TopRightHandle
The handle that is at the top - right of a selection.
Definition KoFlake.h:57
@ TopLeftHandle
The handle that is at the top left of a selection.
Definition KoFlake.h:63
@ LeftMiddleHandle
The handle that is at the left center of a selection.
Definition KoFlake.h:62
@ NoHandle
Value to indicate no handle.
Definition KoFlake.h:64
@ TopMiddleHandle
The handle that is at the top - center of a selection.
Definition KoFlake.h:56
@ BottomMiddleHandle
The handle that is at the bottom center of a selection.
Definition KoFlake.h:60