4#ifndef QQUICKMULTIEFFECT_P_P_H
5#define QQUICKMULTIEFFECT_P_P_H
18#include <private/qtquickglobal_p.h>
22#include <private/qquickmultieffect_p.h>
23#include <private/qquickitem_p.h>
24#include <private/qgfxsourceproxy_p.h>
25#include <QtCore/qvector.h>
29class QQuickShaderEffect;
30class QQuickShaderEffectSource;
34 Q_DECLARE_PUBLIC(QQuickMultiEffect)
124 void handleItemChange(QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData &value);
133 void getBlurWeights(
float blurLod, QVector4D &blurWeight1, QVector2D &blurWeight2);
145 bool m_initialized =
false;
146 QQuickItem *m_sourceItem =
nullptr;
147 QGfxSourceProxyME *m_shaderSource =
nullptr;
148 QQuickShaderEffect *m_shaderEffect =
nullptr;
149 QQuickShaderEffectSource *m_dummyShaderSource =
nullptr;
150 QVector<QQuickShaderEffect *> m_blurEffects;
151 bool m_autoPaddingEnabled =
true;
152 QRectF m_paddingRect;
153 qreal m_brightness = 0.0;
154 qreal m_contrast = 0.0;
155 qreal m_saturation = 0.0;
156 qreal m_colorization = 0.0;
157 QColor m_colorizationColor = { 255, 0, 0, 255 };
158 bool m_blurEnabled =
false;
161 qreal m_blurMultiplier = 0.0;
162 bool m_shadowEnabled =
false;
163 qreal m_shadowOpacity = 1.0;
164 qreal m_shadowBlur = 1.0;
165 qreal m_shadowHorizontalOffset = 0.0;
166 qreal m_shadowVerticalOffset = 0.0;
167 QColor m_shadowColor = { 0, 0, 0, 255 };
168 qreal m_shadowScale = 1.0;
169 bool m_maskEnabled =
false;
170 QQuickItem *m_maskSourceItem =
nullptr;
171 qreal m_maskThresholdMin = 0.0;
172 qreal m_maskSpreadAtMin = 0.0;
173 qreal m_maskThresholdMax = 1.0;
174 qreal m_maskSpreadAtMax = 0.0;
175 bool m_maskInverted =
false;
178 QString m_vertShader;
179 QString m_fragShader;
180 QSizeF m_firstBlurItemSize;
182 QVector4D m_blurWeight1;
183 QVector2D m_blurWeight2;
184 QVector4D m_shadowBlurWeight1;
185 QVector2D m_shadowBlurWeight2;
void setShadowOpacity(qreal shadowOpacity)
void setShadowColor(const QColor &color)
void setMaskSpreadAtMax(qreal spread)
bool maskInverted() const
void setColorizationColor(const QColor &color)
void setMaskThresholdMin(qreal threshold)
void updateEffectShaders()
void setColorization(qreal colorization)
void setShadowVerticalOffset(qreal offset)
void handleItemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value)
void setSource(QQuickItem *item)
qreal colorization() const
void setShadowBlur(qreal shadowBlur)
void setMaskSource(QQuickItem *item)
float blurWeight(float v)
QQuickItem * source() const
QString vertexShader() const
void updateShadowOffset()
~QQuickMultiEffectPrivate()
void setBlurMax(int blurMax)
void updateCenterOffset()
void setShadowScale(qreal shadowScale)
void updateProxyActiveCheck()
qreal maskSpreadAtMin() const
void setMaskThresholdMax(qreal threshold)
qreal shadowOpacity() const
QColor colorizationColor() const
qreal maskThresholdMax() const
void setShadowEnabled(bool enabled)
qreal shadowScale() const
void setMaskSpreadAtMin(qreal spread)
void updateMaskThresholdSpread()
void setBlurEnabled(bool enabled)
bool hasProxySource() const
QString fragmentShader() const
QQuickItem * maskSource() const
void setSaturation(qreal saturation)
qreal blurMultiplier() const
void proxyOutputChanged()
void updateBlurLevel(bool forceUpdate=false)
void setMaskInverted(bool inverted)
qreal shadowHorizontalOffset() const
void setBlurMultiplier(qreal blurMultiplier)
void setShadowHorizontalOffset(qreal offset)
float calculateLod(float blurAmount)
bool autoPaddingEnabled() const
void getBlurWeights(float blurLod, QVector4D &blurWeight1, QVector2D &blurWeight2)
QColor shadowColor() const
void setPaddingRect(const QRectF &rect)
qreal maskThresholdMin() const
void setContrast(qreal contrast)
void updateBlurItemSizes(bool forceUpdate=false)
qreal maskSpreadAtMax() const
void setBrightness(qreal brightness)
QRectF paddingRect() const
void updateColorizationColor()
void updateBlurItemsAmount(int blurLevel)
bool shadowEnabled() const
void handleGeometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
void updateSourcePadding()
qreal shadowVerticalOffset() const
void updateShadowBlurWeights()
void setAutoPaddingEnabled(bool enabled)
void setMaskEnabled(bool enabled)
QT_REQUIRE_CONFIG(quick_shadereffect)