Commit feccb93a authored by Boudewijn Rempt's avatar Boudewijn Rempt

Merge branch 'master' into rempt/T379-resource-management

parents 33bd845e 72b383ca
......@@ -104,9 +104,8 @@ On Windows:
cmake --build . --config RelWithDebInfo --target ext_patch
cmake --build . --config RelWithDebInfo --target ext_png2ico
cmake --build . --config RelWithDebInfo --target ext_gettext
On OSX:
On OSX and Windows:
cmake --build . --config RelWithDebInfo --target ext_gettext
......@@ -121,23 +120,20 @@ On all operating systems:
cmake --build . --config RelWithDebInfo --target ext_eigen3
cmake --build . --config RelWithDebInfo --target ext_exiv2
cmake --build . --config RelWithDebInfo --target ext_fftw3
On all operating systems
cmake --build . --config RelWithDebInfo --target ext_ilmbase
cmake --build . --config RelWithDebInfo --target ext_jpeg
cmake --build . --config RelWithDebInfo --target ext_lcms2
cmake --build . --config RelWithDebInfo --target ext_ocio
cmake --build . --config RelWithDebInfo --target ext_openexr
Note for OSX:
On OSX, you need to first build openexr; that will fail; then you need to set the rpath for the two utilities correctly, then try to build openexr again.
OSX Note: You need to first build openexr; that will fail; then you need to set the rpath for the two utilities correctly, then try to build openexr again.
install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./b44ExpLogTable
install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./dwaLookups
On All operating systems:
On All operating systems
cmake --build . --config RelWithDebInfo --target ext_png
cmake --build . --config RelWithDebInfo --target ext_tiff
......@@ -146,7 +142,7 @@ On All operating systems:
cmake --build . --config RelWithDebInfo --target ext_libraw
cmake --build . --config RelWithDebInfo --target ext_giflib
On Linux, if you want to build your own SIP and PyQt instead of the system one:
On Linux (if you want to build your own SIP and PyQt instead of the system one)
cmake --build . --config RelWithDebInfo --target ext_sip
cmake --build . --config RelWithDebInfo --target ext_pyqt
......@@ -160,39 +156,39 @@ On Linux
cmake --build . --config RelWithDebInfo --target ext_kcrash
Everywhere else:
cmake --build . --config RelWithDebInfo --target ext_kwindowsystem
On Windows, if you want to include DrMingw for dumping backtrace on crash:
On Windows (if you want to include DrMingw for dumping backtrace on crash)
cmake --build . --config RelWithDebInfo --target ext_drmingw
On Windows, if you want to include Python scripting:
On Windows (if you want to include Python scripting)
cmake --build . --config RelWithDebInfo --target ext_python
cmake --build . --config RelWithDebInfo --target ext_sip
cmake --build . --config RelWithDebInfo --target ext_pyqt
On Windows and Linux, if you want to build gmic-qt:
On Windows and Linux (if you want to include gmic-qt)
cmake --build . --config RelWithDebInfo --target ext_gmic
Note: poppler should be buildable on Linux as well with a home-built freetype
Linux Note: poppler should be buildable on Linux as well with a home-built freetype
and fontconfig, but I don't know how to make fontconfig find freetype, and on
Linux, fontconfig is needed for poppler. Poppler is needed for PDF import.
Note 2: if you want to build a release, you need to get the binary gettext
Note 3: in order to build fontconfig on macOS, you need to have pkg-config installed.
OSX Note: In order to build fontconfig on macOS, you need to have pkg-config installed.
You probably need homebrew for that... See http://macappstore.org/pkg-config/ .
archives from: files.kde.org/krita/build/dependencies:
On Windows, download the approporiate zip file and put in in your i folder
archives from files.kde.org/krita/build/dependencies:
http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.14-shared-32.zip
http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.14-shared-64.zip
- Take care, these zips contain a libstdc++-6.dll that you don't want in your path when building.
On Windows and OSX
cmake --build . --config RelWithDebInfo --target ext_kwindowsystem
http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.14-shared-32.zip
http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.14-shared-64.zip
Take care, these zips contain a libstdc++-6.dll that you don't want in your path when building.
== Build Krita ==
......
......@@ -127,19 +127,6 @@ if(GIT_SHA1)
endif()
endif()
if(NOT DEFINED RELEASE_BUILD)
# estimate mode by CMAKE_BUILD_TYPE content if not set on cmdline
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER)
set(RELEASE_BUILD_TYPES "release" "relwithdebinfo" "minsizerel")
list(FIND RELEASE_BUILD_TYPES "${CMAKE_BUILD_TYPE_TOLOWER}" INDEX)
if (INDEX EQUAL -1)
set(RELEASE_BUILD FALSE)
else()
set(RELEASE_BUILD TRUE)
endif()
endif()
message(STATUS "Release build: ${RELEASE_BUILD}")
# create test make targets
enable_testing()
# collect list of broken tests, empty here to start fresh with each cmake run
......
......@@ -707,7 +707,7 @@ echo.
set EXT_TARGETS=patch png2ico gettext qt zlib boost eigen3 exiv2 fftw3 ilmbase
set EXT_TARGETS=%EXT_TARGETS% jpeg lcms2 ocio openexr png tiff gsl vc libraw
set EXT_TARGETS=%EXT_TARGETS% giflib freetype poppler kwindowsystem drmingw gmic
set EXT_TARGETS=%EXT_TARGETS% python sip pyqt ffmpeg
set EXT_TARGETS=%EXT_TARGETS% python sip pyqt
for %%a in (%EXT_TARGETS%) do (
echo Building ext_%%a...
......
<?xml version="1.0" encoding="UTF-8"?>
<ActionCollection version="2" name="Tools">
<Actions category="Artistic Text Tool">
<text>Artistic Text Tool</text>
<Action name="artistictext_subscript">
<iconText>Subscript</iconText>
<shortcut></shortcut>
<toolTip>Subscript</toolTip>
<icon>format-text-subscript</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Subscript</text>
</Action>
<Action name="artistictext_detach_from_path">
<iconText>Detach Path</iconText>
<shortcut></shortcut>
<toolTip>Detach Path</toolTip>
<icon>artistictext-detach-path</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>false</isCheckable>
<text>Detach Path</text>
</Action>
<Action name="artistictext_font_italic">
<iconText>Italic text</iconText>
<shortcut></shortcut>
<toolTip>Italic text</toolTip>
<icon>format-text-italic</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Italic text</text>
</Action>
<Action name="artistictext_anchor_middle">
<iconText>Anchor at Middle</iconText>
<shortcut></shortcut>
<toolTip>Anchor at Middle</toolTip>
<icon>format-justify-center</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Anchor at Middle</text>
</Action>
<Action name="artistictext_anchor_end">
<iconText>Anchor at End</iconText>
<shortcut></shortcut>
<toolTip>Anchor at End</toolTip>
<icon>format-justify-right</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Anchor at End</text>
</Action>
<Action name="artistictext_convert_to_path">
<iconText>Convert to Path</iconText>
<shortcut></shortcut>
<toolTip>Convert to Path</toolTip>
<icon>pathshape</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>false</isCheckable>
<text>Convert to Path</text>
</Action>
<Action name="artistictext_anchor_start">
<iconText>Anchor at Start</iconText>
<shortcut></shortcut>
<toolTip>Anchor at Start</toolTip>
<icon>format-justify-left</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Anchor at Start</text>
</Action>
<Action name="artistictext_font_bold">
<iconText>Bold text</iconText>
<shortcut></shortcut>
<toolTip>Bold text</toolTip>
<icon>format-text-bold</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Bold text</text>
</Action>
<Action name="edit_deselect_all">
<iconText>Deselect</iconText>
<shortcut>Ctrl+Shift+A</shortcut>
<toolTip>Deselect</toolTip>
<icon></icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>false</isCheckable>
<text>Dese&amp;lect</text>
</Action>
<Action name="artistictext_superscript">
<iconText>Superscript</iconText>
<shortcut></shortcut>
<toolTip>Superscript</toolTip>
<icon>format-text-superscript</icon>
<whatsThis></whatsThis>
<statusTip></statusTip>
<isCheckable>true</isCheckable>
<text>Superscript</text>
</Action>
</Actions>
</ActionCollection>
install( FILES
ArtisticTextTool.action
InteractionTool.action
PathTool.action
TextTool.action
ConnectionTool.action
MoveTool.action
DESTINATION ${DATA_INSTALL_DIR}/krita/actions)
This diff is collapsed.
......@@ -1355,16 +1355,6 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="TextTool">
<icon></icon>
<text>Text Editing Tool</text>
<whatsThis></whatsThis>
<toolTip>Text editing</toolTip>
<iconText>Text editing</iconText>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="KisToolSelectOutline">
<icon></icon>
<text>Outline Selection Tool</text>
......@@ -1375,16 +1365,6 @@
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="ArtisticTextTool">
<icon></icon>
<text>Artistic Text Tool</text>
<whatsThis></whatsThis>
<toolTip>Artistic text editing</toolTip>
<iconText>Artistic text editing</iconText>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="KisToolSelectPath">
<icon></icon>
<text>Bezier Curve Selection Tool</text>
......@@ -2858,7 +2838,7 @@
<whatsThis></whatsThis>
<toolTip>Create a group layer containing selected layers</toolTip>
<iconText>Quick Group</iconText>
<activationFlags>100000</activationFlags>
<activationFlags>1000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut>Ctrl+G</shortcut>
<isCheckable>false</isCheckable>
......
......@@ -296,7 +296,7 @@ extern "C" int main(int argc, char **argv)
if (singleApplication && app.isRunning()) {
// only pass arguments to main instance if they are not for batch processing
// any batch processing would be done in this separate instance
const bool batchRun = (args.print() || args.exportAs() || args.exportAsPdf());
const bool batchRun = args.exportAs();
if (!batchRun) {
QByteArray ba = args.serialize();
......
......@@ -5,6 +5,14 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<developer_name>Krita Foundation</developer_name>
<developer_name xml:lang="ca">Fundació Krita</developer_name>
<developer_name xml:lang="ca-valencia">Fundació Krita</developer_name>
<developer_name xml:lang="nl">Krita Foundation</developer_name>
<developer_name xml:lang="pt">Fundação do Krita</developer_name>
<developer_name xml:lang="pt-BR">Krita Foundation</developer_name>
<developer_name xml:lang="sv">Krita-stiftelsen</developer_name>
<developer_name xml:lang="uk">Фундація Krita</developer_name>
<developer_name xml:lang="x-test">xxKrita Foundationxx</developer_name>
<update_contact>foundation@krita.org</update_contact>
<name>Krita</name>
<name xml:lang="ar">كريتا</name>
......
......@@ -28,15 +28,13 @@ class Q_DECL_HIDDEN KoCanvasController::Private
{
public:
Private()
: canvasMode(Centered)
, margin(0)
: margin(0)
, preferredCenterFractionX(0.5)
, preferredCenterFractionY(0.5)
, actionCollection(0)
{
}
CanvasMode canvasMode;
int margin;
QSize documentSize;
QPoint documentOffset;
......@@ -59,26 +57,6 @@ KoCanvasController::~KoCanvasController()
delete proxyObject;
}
void KoCanvasController::setCanvasMode(CanvasMode mode)
{
d->canvasMode = mode;
switch (mode) {
case AlignTop:
d->preferredCenterFractionX = 0;
d->preferredCenterFractionY = 0.5;
break;
case Infinite:
case Centered:
d->preferredCenterFractionX = 0.5;
d->preferredCenterFractionY = 0.5;
break;
case Spreadsheet:
d->preferredCenterFractionX = 0;
d->preferredCenterFractionY = 0;
break;
};
}
void KoCanvasController::setMargin(int margin)
{
d->margin = margin;
......@@ -89,12 +67,6 @@ int KoCanvasController::margin() const
return d->margin;
}
KoCanvasController::CanvasMode KoCanvasController::canvasMode() const
{
return d->canvasMode;
}
KoCanvasBase* KoCanvasController::canvas() const
{
return 0;
......
......@@ -70,13 +70,6 @@ class KoCanvasControllerProxyObject;
class KRITAFLAKE_EXPORT KoCanvasController
{
public:
/// An enum to alter the positioning and size of the canvas inside the canvas controller
enum CanvasMode {
AlignTop, ///< canvas is top aligned if smaller than the viewport
Centered, ///< canvas is centered if smaller than the viewport
Infinite, ///< canvas is never smaller than the viewport
Spreadsheet ///< same as Infinite, but supports right-to-left layouts
};
// proxy QObject: use this to connect to slots and signals.
QPointer<KoCanvasControllerProxyObject> proxyObject;
......@@ -100,15 +93,6 @@ public:
*/
virtual void setMargin(int margin);
/**
* Sets the how the canvas behaves if the zoomed document becomes smaller than the viewport.
* @param mode the new canvas mode, CanvasMode::Centered is the default value
*/
virtual void setCanvasMode(KoCanvasController::CanvasMode mode);
/// Returns the current canvas mode
virtual KoCanvasController::CanvasMode canvasMode() const;
/**
* compatibility with QAbstractScrollArea
*/
......@@ -119,15 +103,6 @@ public:
*/
virtual QSize viewportSize() const = 0;
/**
* Set the shadow option -- by default the canvas controller draws
* a black shadow around the canvas widget, which you may or may
* not want.
*
* @param drawShadow if true, the shadow is drawn, if false, not
*/
virtual void setDrawShadow(bool drawShadow) = 0;
/**
* Set the new canvas to be shown as a child
* Calling this will emit canvasRemoved() if there was a canvas before, and will emit
......@@ -470,7 +445,6 @@ public:
void scrollContentsBy(int /*dx*/, int /*dy*/) override {}
QSize viewportSize() const override { return QSize(); }
void setDrawShadow(bool /*drawShadow*/) override {}
void setCanvas(KoCanvasBase *canvas) override {Q_UNUSED(canvas)}
KoCanvasBase *canvas() const override {return 0;}
int visibleHeight() const override {return 0;}
......
......@@ -63,11 +63,7 @@ void KoCanvasControllerWidget::Private::setDocumentOffset()
// If it isn't an OpenGL canvas
if (qobject_cast<QOpenGLWidget*>(canvasWidget) == 0) {
QPoint diff = q->documentOffset() - pt;
if (q->canvasMode() == Spreadsheet && canvasWidget->layoutDirection() == Qt::RightToLeft) {
canvasWidget->scroll(-diff.x(), diff.y());
} else {
canvasWidget->scroll(diff.x(), diff.y());
}
canvasWidget->scroll(diff.x(), diff.y());
}
}
......@@ -231,11 +227,6 @@ QSize KoCanvasControllerWidget::viewportSize() const
return viewport()->size();
}
void KoCanvasControllerWidget::setDrawShadow(bool drawShadow)
{
d->viewportWidget->setDrawShadow(drawShadow);
}
void KoCanvasControllerWidget::resizeEvent(QResizeEvent *resizeEvent)
{
proxyObject->emitSizeChanged(resizeEvent->size());
......
......@@ -62,8 +62,6 @@ public:
*/
virtual void activate();
void setDrawShadow(bool drawShadow) override;
void setCanvas(KoCanvasBase *canvas) override;
KoCanvasBase *canvas() const override;
......
......@@ -52,7 +52,6 @@
Viewport::Viewport(KoCanvasControllerWidget *parent)
: QWidget(parent)
, m_draggedShape(0)
, m_drawShadow(false)
, m_canvas(0)
, m_documentOffset(QPoint(0, 0))
, m_margin(0)
......@@ -91,11 +90,6 @@ void Viewport::documentOffsetMoved(const QPoint &pt)
resetLayout();
}
void Viewport::setDrawShadow(bool drawShadow)
{
m_drawShadow = drawShadow;
}
void Viewport::handleDragEnterEvent(QDragEnterEvent *event)
{
// if not a canvas set then ignore this, makes it possible to assume
......@@ -296,16 +290,6 @@ void Viewport::handleDragLeaveEvent(QDragLeaveEvent *event)
void Viewport::handlePaintEvent(QPainter &painter, QPaintEvent *event)
{
Q_UNUSED(event);
// Draw the shadow around the canvas.
if (m_parent->canvas() && m_parent->canvas()->canvasWidget() && m_drawShadow) {
QWidget *canvas = m_parent->canvas()->canvasWidget();
painter.setPen(QPen(Qt::black, 0));
QRect rect(canvas->x(), canvas->y(), canvas->width(), canvas->height());
rect.adjust(-1, -1, 0, 0);
painter.drawRect(rect);
painter.drawLine(rect.right() + 2, rect.top() + 2, rect.right() + 2, rect.bottom() + 2);
painter.drawLine(rect.left() + 2, rect.bottom() + 2, rect.right() + 2, rect.bottom() + 2);
}
if (m_draggedShape) {
const KoViewConverter *vc = m_parent->canvas()->viewConverter();
......@@ -332,86 +316,13 @@ void Viewport::resetLayout()
const int viewH = viewRect.height();
const int viewW = viewRect.width();
const int docH = m_documentSize.height();
const int docW = m_documentSize.width();
int moveX = 0;
int moveY = 0;
int resizeW = viewW;
int resizeH = viewH;
// debugFlake <<"viewH:" << viewH << endl
// << "docH: " << docH << endl
// << "viewW: " << viewW << endl
// << "docW: " << docW << endl;
if (viewH == docH && viewW == docW) {
// Do nothing
resizeW = docW;
resizeH = docH;
} else if (viewH > docH && viewW > docW) {
// Show entire canvas centered
moveX = (viewW - docW) / 2;
moveY = (viewH - docH) / 2;
resizeW = docW;
resizeH = docH;
} else if (viewW > docW) {
// Center canvas horizontally
moveX = (viewW - docW) / 2;
resizeW = docW;
int marginTop = m_margin - m_documentOffset.y();
int marginBottom = viewH - (m_documentSize.height() - m_documentOffset.y());
if (marginTop > 0) moveY = marginTop;
if (marginTop > 0) resizeH = viewH - marginTop;
if (marginBottom > 0) resizeH = viewH - marginBottom;
} else if (viewH > docH) {
// Center canvas vertically
moveY = (viewH - docH) / 2;
resizeH = docH;
int marginLeft = m_margin - m_documentOffset.x();
int marginRight = viewW - (m_documentSize.width() - m_documentOffset.x());
if (marginLeft > 0) moveX = marginLeft;
if (marginLeft > 0) resizeW = viewW - marginLeft;
if (marginRight > 0) resizeW = viewW - marginRight;
} else {
// Take care of the margin around the canvas
int marginTop = m_margin - m_documentOffset.y();
int marginLeft = m_margin - m_documentOffset.x();
int marginRight = viewW - (m_documentSize.width() - m_documentOffset.x());
int marginBottom = viewH - (m_documentSize.height() - m_documentOffset.y());
if (marginTop > 0) moveY = marginTop;
if (marginLeft > 0) moveX = marginLeft;
if (marginTop > 0) resizeH = viewH - marginTop;
if (marginLeft > 0) resizeW = viewW - marginLeft;
if (marginRight > 0) resizeW = viewW - marginRight;
if (marginBottom > 0) resizeH = viewH - marginBottom;
}
if (m_parent->canvasMode() == KoCanvasController::AlignTop) {
// have up to m_margin pixels at top.
moveY = qMin(m_margin, moveY);
}
if (m_canvas) {
QRect geom;
if (m_parent->canvasMode() == KoCanvasController::Infinite)
geom = QRect(0, 0, viewW, viewH);
else
geom = QRect(moveX, moveY, resizeW, resizeH);
QRect geom = QRect(0, 0, viewW, viewH);
if (m_canvas->geometry() != geom) {
m_canvas->setGeometry(geom);
m_canvas->update();
}
}
if (m_drawShadow) {
update();
}
emit sizeChanged();
#if 0
debugFlake <<"View port geom:" << geometry();
......
......@@ -43,11 +43,6 @@ public:
}
void setDocumentSize(const QSize &size);
/**
* When true, a shadow is drawn around the canvas widet.
*/
void setDrawShadow(bool drawShadow);
public Q_SLOTS:
void documentOffsetMoved(const QPoint &);
......@@ -81,7 +76,6 @@ private:
KoCanvasControllerWidget *m_parent;
KoShape *m_draggedShape;
bool m_drawShadow;
QWidget *m_canvas;
QSize m_documentSize; // Size in pixels of the document
QPoint m_documentOffset; // Place where the canvas widget should
......
......@@ -61,8 +61,8 @@ KoSubpathJoinCommand::KoSubpathJoinCommand(const KoPathPointData &pointData1, co
KoPathPoint * point1 = pathShape->pointByIndex(m_pointData1.pointIndex);
KoPathPoint * point2 = pathShape->pointByIndex(m_pointData2.pointIndex);
m_savedControlPoint1 = KritaUtils::fetchControlPoint(point1, m_reverse && ReverseFirst);
m_savedControlPoint2 = KritaUtils::fetchControlPoint(point2, !(m_reverse && ReverseSecond));
m_savedControlPoint1 = KritaUtils::fetchControlPoint(point1, m_reverse & ReverseFirst);
m_savedControlPoint2 = KritaUtils::fetchControlPoint(point2, !(m_reverse & ReverseSecond));
m_oldProperties1 = point1->properties();
m_oldProperties2 = point2->properties();
......
......@@ -99,6 +99,10 @@ public:
return m_antialiasingFadeCoeff;
}
bool getAliasingEnabled(){
return m_enableAntialiasing;
}
private:
qreal m_radius;
quint8 m_fadeStartValue;
......
......@@ -160,6 +160,8 @@ template<> void KisGaussCircleMaskGenerator::
FastRowProcessor::process<Vc::CurrentImplementation::current()>(float* buffer, int width, float y, float cosa, float sina,
float centerX, float centerY)
{
const bool antialiasOn = d->fadeMaker.getAliasingEnabled();
float y_ = y - centerY;
float sinay_ = sina * y_;
float cosay_ = cosa * y_;
......@@ -204,32 +206,33 @@ FastRowProcessor::process<Vc::CurrentImplementation::current()>(float* buffer, i
Vc::float_m outsideMask = dist > vFadeRadius;
dist(outsideMask) = vOne;
Vc::float_m fadeStartMask = dist > vFadeAFadeStart;
dist((outsideMask ^ fadeStartMask) & fadeStartMask) = (vFadeStartValue + (dist - vFadeAFadeStart) * vFadeAFadeCoeff) / vValMax;
Vc::float_m excludeMask = outsideMask | fadeStartMask;
Vc::float_m fadeStartMask(false);
// if antialias is off, do not process
if(antialiasOn){
fadeStartMask = dist > vFadeAFadeStart;
dist((outsideMask ^ fadeStartMask) & fadeStartMask) = (vFadeStartValue + (dist - vFadeAFadeStart) * vFadeAFadeCoeff) / vValMax;
}