Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Krita
Commits
eacd03c0
Commit
eacd03c0
authored
Jun 05, 2018
by
Dmitry Kazakov
Browse files
FEATURE: Force brush outline to be always painted at 100% size
Use special checkbox in General tab to configure that
parent
336c78d5
Changes
27
Hide whitespace changes
Inline
Side-by-side
libs/image/brushengine/kis_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -385,13 +385,13 @@ bool KisPaintOpSettings::needsAsynchronousUpdates() const
return
false
;
}
QPainterPath
KisPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
QPainterPath
path
;
if
(
mode
==
CursorIsOutline
||
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutlin
e
)
{
if
(
mode
.
isVisibl
e
)
{
path
=
ellipseOutline
(
10
,
10
,
1.0
,
0
);
if
(
mode
==
CursorTiltOutline
)
{
if
(
mode
.
showTiltDecoration
)
{
path
.
addPath
(
makeTiltIndicator
(
info
,
QPointF
(
0.0
,
0.0
),
0.0
,
2.0
));
}
...
...
libs/image/brushengine/kis_paintop_settings.h
View file @
eacd03c0
...
...
@@ -164,13 +164,13 @@ public:
virtual
bool
needsAsynchronousUpdates
()
const
;
/**
* This
enum
defines the current mode for painting an outline.
* This
structure
defines the current mode for painting an outline.
*/
enum
OutlineMode
{
CursorIsOutline
=
1
,
///< When this mode is set, an outline is painted around the cursor
CursorIsCircleOutline
,
CursorNoOutline
,
CursorTiltOutline
struct
OutlineMode
{
bool
isVisible
=
false
;
bool
forceCircle
=
false
;
bool
showTiltDecoration
=
false
;
bool
forceFullSize
=
false
;
};
/**
...
...
@@ -178,7 +178,7 @@ public:
* Outline mode has to be passed to the paintop which builds the outline as some paintops have to paint outline
* always like clone paintop indicating the duplicate position
*/
virtual
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
);
virtual
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
);
/**
* Helpers for drawing the brush outline
...
...
libs/ui/dialogs/kis_dlg_preferences.cc
View file @
eacd03c0
...
...
@@ -117,6 +117,7 @@ GeneralTab::GeneralTab(QWidget *_parent, const char *_name)
m_cmbOutlineShape
->
setCurrentIndex
(
cfg
.
newOutlineStyle
());
m_showOutlinePainting
->
setChecked
(
cfg
.
showOutlineWhilePainting
());
m_forceFullSizedBrushOutline
->
setChecked
(
cfg
.
forceAlwaysFullSizedOutline
());
KoColor
cursorColor
(
KoColorSpaceRegistry
::
instance
()
->
rgb8
());
cursorColor
.
fromQColor
(
cfg
.
getCursorMainColor
());
...
...
@@ -217,6 +218,7 @@ void GeneralTab::setDefault()
m_undoStackSize
->
setValue
(
cfg
.
undoStackLimit
(
true
));
m_backupFileCheckBox
->
setChecked
(
cfg
.
backupFile
(
true
));
m_showOutlinePainting
->
setChecked
(
cfg
.
showOutlineWhilePainting
(
true
));
m_forceFullSizedBrushOutline
->
setChecked
(
cfg
.
forceAlwaysFullSizedOutline
(
true
));
m_hideSplashScreen
->
setChecked
(
cfg
.
hideSplashScreen
(
true
));
m_chkNativeFileDialog
->
setChecked
(
false
);
...
...
@@ -1279,6 +1281,7 @@ bool KisDlgPreferences::editPreferences()
cfg
.
setNewOutlineStyle
(
dialog
->
m_general
->
outlineStyle
());
cfg
.
setShowRootLayer
(
dialog
->
m_general
->
showRootLayer
());
cfg
.
setShowOutlineWhilePainting
(
dialog
->
m_general
->
showOutlineWhilePainting
());
cfg
.
setForceAlwaysFullSizedOutline
(
dialog
->
m_general
->
m_forceFullSizedBrushOutline
->
isChecked
());
cfg
.
setHideSplashScreen
(
dialog
->
m_general
->
hideSplashScreen
());
cfg
.
setSessionOnStartup
(
dialog
->
m_general
->
sessionOnStartup
());
cfg
.
setSaveSessionOnQuit
(
dialog
->
m_general
->
saveSessionOnQuit
());
...
...
libs/ui/forms/wdggeneralsettings.ui
View file @
eacd03c0
...
...
@@ -113,14 +113,14 @@
</property>
</widget>
</item>
<item
row=
"
3
"
column=
"0"
>
<item
row=
"
4
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_11"
>
<property
name=
"text"
>
<string>
Cursor Color:
</string>
</property>
</widget>
</item>
<item
row=
"
3
"
column=
"1"
>
<item
row=
"
4
"
column=
"1"
>
<widget
class=
"KisColorButton"
name=
"cursorColorBtutton"
>
<property
name=
"maximumSize"
>
<size>
...
...
@@ -133,6 +133,13 @@
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"m_forceFullSizedBrushOutline"
>
<property
name=
"text"
>
<string>
Always show brush outline at 100% scale
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"2"
column=
"0"
>
...
...
libs/ui/kis_config.cc
View file @
eacd03c0
...
...
@@ -960,6 +960,16 @@ void KisConfig::setShowOutlineWhilePainting(bool showOutlineWhilePainting) const
m_cfg
.
writeEntry
(
"ShowOutlineWhilePainting"
,
showOutlineWhilePainting
);
}
bool
KisConfig
::
forceAlwaysFullSizedOutline
(
bool
defaultValue
)
const
{
return
(
defaultValue
?
false
:
m_cfg
.
readEntry
(
"forceAlwaysFullSizedOutline"
,
false
));
}
void
KisConfig
::
setForceAlwaysFullSizedOutline
(
bool
value
)
const
{
m_cfg
.
writeEntry
(
"forceAlwaysFullSizedOutline"
,
value
);
}
bool
KisConfig
::
hideSplashScreen
(
bool
defaultValue
)
const
{
KConfigGroup
cfg
(
KSharedConfig
::
openConfig
(),
"SplashScreen"
);
...
...
libs/ui/kis_config.h
View file @
eacd03c0
...
...
@@ -248,6 +248,9 @@ public:
bool
showOutlineWhilePainting
(
bool
defaultValue
=
false
)
const
;
void
setShowOutlineWhilePainting
(
bool
showOutlineWhilePainting
)
const
;
bool
forceAlwaysFullSizedOutline
(
bool
defaultValue
=
false
)
const
;
void
setForceAlwaysFullSizedOutline
(
bool
value
)
const
;
bool
hideSplashScreen
(
bool
defaultValue
=
false
)
const
;
void
setHideSplashScreen
(
bool
hideSplashScreen
)
const
;
...
...
libs/ui/tool/kis_tool_paint.cc
View file @
eacd03c0
...
...
@@ -721,7 +721,6 @@ void KisToolPaint::requestUpdateOutline(const QPointF &outlineDocPoint, const Ko
KisConfig
cfg
;
KisPaintOpSettings
::
OutlineMode
outlineMode
;
outlineMode
=
KisPaintOpSettings
::
CursorNoOutline
;
if
(
isOutlineEnabled
()
&&
(
mode
()
==
KisTool
::
GESTURE_MODE
||
...
...
@@ -731,15 +730,20 @@ void KisToolPaint::requestUpdateOutline(const QPointF &outlineDocPoint, const Ko
((
mode
()
==
HOVER_MODE
)
||
(
mode
()
==
PAINT_MODE
&&
cfg
.
showOutlineWhilePainting
())))))
{
// lisp forever!
if
(
cfg
.
newOutlineStyle
()
==
OUTLINE_CIRCLE
)
{
outlineMode
=
KisPaintOpSettings
::
CursorIsCircleOutline
;
outlineMode
.
isVisible
=
true
;
if
(
cfg
.
newOutlineStyle
()
==
OUTLINE_CIRCLE
)
{
outlineMode
.
forceCircle
=
true
;
}
else
if
(
cfg
.
newOutlineStyle
()
==
OUTLINE_TILT
)
{
outlineMode
=
KisPaintOpSettings
::
CursorTiltOutline
;
outlineMode
.
forceCircle
=
true
;
outlineMode
.
showTiltDecoration
=
true
;
}
else
{
outlineMode
=
KisPaintOpSettings
::
CursorIsOutline
;
// noop
}
}
outlineMode
.
forceFullSize
=
cfg
.
forceAlwaysFullSizedOutline
();
m_outlineDocPoint
=
outlineDocPoint
;
m_currentOutline
=
getOutlinePath
(
m_outlineDocPoint
,
event
,
outlineMode
);
...
...
plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp
View file @
eacd03c0
...
...
@@ -132,12 +132,19 @@ KisPaintOpSettingsSP KisDuplicateOpSettings::clone() const
return
setting
;
}
QPainterPath
KisDuplicateOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisDuplicateOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
QPainterPath
path
;
OutlineMode
forcedMode
=
mode
;
if
(
!
forcedMode
.
isVisible
)
{
forcedMode
.
isVisible
=
true
;
forcedMode
.
forceCircle
=
true
;
}
// clone tool should always show an outline
path
=
KisBrushBasedPaintOpSettings
::
brushOutlineImpl
(
info
,
m
ode
,
1.0
,
true
);
path
=
KisBrushBasedPaintOpSettings
::
brushOutlineImpl
(
info
,
forcedM
ode
,
1.0
);
QPainterPath
copy
(
path
);
QRectF
rect2
=
copy
.
boundingRect
();
...
...
plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.h
View file @
eacd03c0
...
...
@@ -50,7 +50,7 @@ public:
KisPaintOpSettingsSP
clone
()
const
override
;
using
KisBrushBasedPaintOpSettings
::
brushOutline
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
KisNodeWSP
sourceNode
()
const
;
...
...
plugins/paintops/deform/kis_deform_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -71,19 +71,19 @@ bool KisDeformPaintOpSettings::isAirbrushing() const
}
}
QPainterPath
KisDeformPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisDeformPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
QPainterPath
path
;
if
(
mode
==
CursorIsOutline
||
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutlin
e
)
{
if
(
mode
.
isVisibl
e
)
{
qreal
width
=
getInt
(
BRUSH_DIAMETER
);
qreal
height
=
getInt
(
BRUSH_DIAMETER
)
*
getDouble
(
BRUSH_ASPECT
);
path
=
ellipseOutline
(
width
,
height
,
getDouble
(
BRUSH_SCALE
),
getDouble
(
BRUSH_ROTATION
));
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
path
);
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
path
,
mode
);
if
(
mode
==
CursorTiltOutline
)
{
if
(
mode
.
showTiltDecoration
)
{
QPainterPath
tiltLine
=
makeTiltIndicator
(
info
,
QPointF
(
0.0
,
0.0
),
width
*
0.5
,
3.0
);
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
1.0
,
0.0
,
true
,
0
,
0
));
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
mode
,
1.0
,
0.0
,
true
,
0
,
0
));
}
}
return
path
;
...
...
plugins/paintops/deform/kis_deform_paintop_settings.h
View file @
eacd03c0
...
...
@@ -34,7 +34,7 @@ public:
void
setPaintOpSize
(
qreal
value
)
override
;
qreal
paintOpSize
()
const
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
bool
paintIncremental
()
override
;
bool
isAirbrushing
()
const
override
;
...
...
plugins/paintops/experiment/kis_experiment_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -47,10 +47,10 @@ bool KisExperimentPaintOpSettings::paintIncremental()
return
false
;
}
QPainterPath
KisExperimentPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
KisPaintOpSettings
::
OutlineMode
mode
)
QPainterPath
KisExperimentPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
QPainterPath
path
;
if
(
mode
==
CursorIsOutline
||
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutlin
e
)
{
if
(
mode
.
isVisibl
e
)
{
QRectF
ellipse
(
0
,
0
,
3
,
3
);
ellipse
.
translate
(
-
ellipse
.
center
());
...
...
@@ -59,7 +59,7 @@ QPainterPath KisExperimentPaintOpSettings::brushOutline(const KisPaintInformatio
ellipse
.
translate
(
-
ellipse
.
center
());
path
.
addEllipse
(
ellipse
);
if
(
mode
==
CursorTiltOutline
)
{
if
(
mode
.
showTiltDecoration
)
{
path
.
addPath
(
makeTiltIndicator
(
info
,
QPointF
(
0.0
,
0.0
),
0.0
,
3.0
));
}
...
...
plugins/paintops/experiment/kis_experiment_paintop_settings.h
View file @
eacd03c0
...
...
@@ -30,7 +30,7 @@ public:
bool
lodSizeThresholdSupported
()
const
override
;
bool
paintIncremental
()
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
QList
<
KisUniformPaintOpPropertySP
>
uniformProperties
(
KisPaintOpSettingsSP
settings
)
override
;
...
...
plugins/paintops/gridbrush/kis_grid_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -62,21 +62,21 @@ bool KisGridPaintOpSettings::paintIncremental()
return
(
enumPaintActionType
)
getInt
(
"PaintOpAction"
,
WASH
)
==
BUILDUP
;
}
QPainterPath
KisGridPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisGridPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
QPainterPath
path
;
if
(
mode
==
CursorIsOutline
||
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutlin
e
)
{
if
(
mode
.
isVisibl
e
)
{
qreal
sizex
=
getInt
(
GRID_WIDTH
)
*
getDouble
(
GRID_SCALE
);
qreal
sizey
=
getInt
(
GRID_HEIGHT
)
*
getDouble
(
GRID_SCALE
);
QRectF
rc
(
0
,
0
,
sizex
,
sizey
);
rc
.
translate
(
-
rc
.
center
());
path
.
addRect
(
rc
);
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
path
);
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
path
,
mode
);
if
(
mode
==
CursorTiltOutline
)
{
if
(
mode
.
showTiltDecoration
)
{
QPainterPath
tiltLine
=
makeTiltIndicator
(
info
,
QPointF
(
0.0
,
0.0
),
sizex
*
0.5
,
3.0
);
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
1.0
,
0.0
,
true
,
0
,
0
));
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
mode
,
1.0
,
0.0
,
true
,
0
,
0
));
}
}
return
path
;
...
...
plugins/paintops/gridbrush/kis_grid_paintop_settings.h
View file @
eacd03c0
...
...
@@ -38,7 +38,7 @@ public:
void
setPaintOpSize
(
qreal
value
)
override
;
qreal
paintOpSize
()
const
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
bool
paintIncremental
()
override
;
QList
<
KisUniformPaintOpPropertySP
>
uniformProperties
(
KisPaintOpSettingsSP
settings
)
override
;
...
...
plugins/paintops/hairy/kis_hairy_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -30,7 +30,7 @@ KisHairyPaintOpSettings::KisHairyPaintOpSettings()
{
}
QPainterPath
KisHairyPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisHairyPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
return
brushOutlineImpl
(
info
,
mode
,
getDouble
(
HAIRY_BRISTLE_SCALE
));
}
plugins/paintops/hairy/kis_hairy_paintop_settings.h
View file @
eacd03c0
...
...
@@ -34,7 +34,7 @@ public:
KisHairyPaintOpSettings
();
using
KisBrushBasedPaintOpSettings
::
brushOutline
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
};
...
...
plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp
View file @
eacd03c0
...
...
@@ -100,42 +100,40 @@ KisBrushSP KisBrushBasedPaintOpSettings::brush() const
}
QPainterPath
KisBrushBasedPaintOpSettings
::
brushOutlineImpl
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
,
qreal
additionalScale
,
bool
forceOutline
)
const
OutlineMode
&
mode
,
qreal
additionalScale
)
{
QPainterPath
path
;
if
(
forceOutline
||
mode
==
CursorIsOutline
||
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutlin
e
)
{
if
(
mode
.
isVisibl
e
)
{
KisBrushSP
brush
=
this
->
brush
();
if
(
!
brush
)
return
path
;
qreal
finalScale
=
brush
->
scale
()
*
additionalScale
;
QPainterPath
realOutline
=
brush
->
outline
();
if
(
mode
==
CursorIsCircleOutline
||
mode
==
CursorTiltOutline
||
(
forceOutline
&&
mode
==
CursorNoOutline
))
{
if
(
mode
.
forceCircle
)
{
QPainterPath
ellipse
;
ellipse
.
addEllipse
(
realOutline
.
boundingRect
());
realOutline
=
ellipse
;
}
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
realOutline
,
finalScale
,
brush
->
angle
());
path
=
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
realOutline
,
mode
,
finalScale
,
brush
->
angle
());
if
(
mode
==
CursorTiltOutline
)
{
if
(
mode
.
showTiltDecoration
)
{
const
QPainterPath
tiltLine
=
makeTiltIndicator
(
info
,
realOutline
.
boundingRect
().
center
(),
realOutline
.
boundingRect
().
width
()
*
0.5
,
3.0
);
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
finalScale
,
0.0
,
true
,
realOutline
.
boundingRect
().
center
().
x
(),
realOutline
.
boundingRect
().
center
().
y
()));
path
.
addPath
(
outlineFetcher
()
->
fetchOutline
(
info
,
this
,
tiltLine
,
mode
,
finalScale
,
0.0
,
true
,
realOutline
.
boundingRect
().
center
().
x
(),
realOutline
.
boundingRect
().
center
().
y
()));
}
}
return
path
;
}
QPainterPath
KisBrushBasedPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
QPainterPath
KisBrushBasedPaintOpSettings
::
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
{
return
brushOutlineImpl
(
info
,
mode
,
1.0
);
}
...
...
plugins/paintops/libpaintop/kis_brush_based_paintop_settings.h
View file @
eacd03c0
...
...
@@ -37,7 +37,7 @@ public:
bool
paintIncremental
()
override
;
using
KisPaintOpSettings
::
brushOutline
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
)
override
;
QPainterPath
brushOutline
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
)
override
;
///Reimplemented
bool
isValid
()
const
override
;
...
...
@@ -68,7 +68,7 @@ public:
protected:
void
onPropertyChanged
()
override
;
QPainterPath
brushOutlineImpl
(
const
KisPaintInformation
&
info
,
OutlineMode
mode
,
qreal
additionalScale
,
bool
forceOutline
=
false
);
QPainterPath
brushOutlineImpl
(
const
KisPaintInformation
&
info
,
const
OutlineMode
&
mode
,
qreal
additionalScale
);
mutable
KisBrushSP
m_savedBrush
;
QList
<
KisUniformPaintOpPropertyWSP
>
m_uniformProperties
;
...
...
plugins/paintops/libpaintop/kis_current_outline_fetcher.cpp
View file @
eacd03c0
...
...
@@ -74,6 +74,7 @@ void KisCurrentOutlineFetcher::setDirty()
QPainterPath
KisCurrentOutlineFetcher
::
fetchOutline
(
const
KisPaintInformation
&
info
,
const
KisPaintOpSettingsSP
settings
,
const
QPainterPath
&
originalOutline
,
const
KisPaintOpSettings
::
OutlineMode
&
mode
,
qreal
additionalScale
,
qreal
additionalRotation
,
bool
tilt
,
qreal
tiltcenterx
,
qreal
tiltcentery
)
const
...
...
@@ -99,7 +100,6 @@ QPainterPath KisCurrentOutlineFetcher::fetchOutline(const KisPaintInformation &i
qreal
scale
=
additionalScale
;
qreal
rotation
=
additionalRotation
;
MirrorProperties
mirrorProperties
;
bool
needsUpdate
=
false
;
// Randomized rotation at full speed looks noisy, so slow it down
...
...
@@ -108,19 +108,19 @@ QPainterPath KisCurrentOutlineFetcher::fetchOutline(const KisPaintInformation &i
d
->
lastUpdateTime
.
restart
();
}
if
(
d
->
sizeOption
&&
tilt
==
fals
e
)
{
if
(
d
->
sizeOption
&&
!
tilt
&&
!
mode
.
forceFullSiz
e
)
{
if
(
!
d
->
sizeOption
->
isRandom
()
||
needsUpdate
)
{
d
->
lastSizeApplied
=
d
->
sizeOption
->
apply
(
info
);
}
scale
*=
d
->
lastSizeApplied
;
}
if
(
d
->
rotationOption
&&
tilt
==
false
)
{
if
(
d
->
rotationOption
&&
!
tilt
)
{
if
(
!
d
->
rotationOption
->
isRandom
()
||
needsUpdate
)
{
d
->
lastRotationApplied
=
d
->
rotationOption
->
apply
(
info
);
}
rotation
+=
d
->
lastRotationApplied
;
}
else
if
(
d
->
rotationOption
&&
tilt
==
true
)
{
}
else
if
(
d
->
rotationOption
&&
tilt
)
{
rotation
+=
settings
->
getDouble
(
"runtimeCanvasRotation"
,
0.0
)
*
M_PI
/
180.0
;
}
...
...
@@ -150,8 +150,9 @@ QPainterPath KisCurrentOutlineFetcher::fetchOutline(const KisPaintInformation &i
rot
.
rotateRadians
(
-
rotation
);
QPointF
hotSpot
=
originalOutline
.
boundingRect
().
center
();
if
(
tilt
==
true
)
{
hotSpot
.
setX
(
tiltcenterx
);
hotSpot
.
setY
(
tiltcentery
);
if
(
tilt
)
{
hotSpot
.
setX
(
tiltcenterx
);
hotSpot
.
setY
(
tiltcentery
);
}
QTransform
T1
=
QTransform
::
fromTranslate
(
-
hotSpot
.
x
(),
-
hotSpot
.
y
());
QTransform
T2
=
QTransform
::
fromTranslate
(
info
.
pos
().
x
(),
info
.
pos
().
y
());
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment