Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoGradientBackground.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 108 | { | |||
---|---|---|---|---|---|
111 | 111 | | |||
112 | if (d->gradient->coordinateMode() == QGradient::ObjectBoundingMode) { | 112 | if (d->gradient->coordinateMode() == QGradient::ObjectBoundingMode) { | ||
113 | 113 | | |||
114 | /** | 114 | /** | ||
115 | * NOTE: important hack! | 115 | * NOTE: important hack! | ||
116 | * | 116 | * | ||
117 | * Qt has different notation of QBrush::setTransform() in comparison | 117 | * Qt has different notation of QBrush::setTransform() in comparison | ||
118 | * to what SVG defines. SVG defines gradientToUser matrix to be postmultiplied | 118 | * to what SVG defines. SVG defines gradientToUser matrix to be postmultiplied | ||
119 | * by QBrush::transform(), but Qt does exectly reverse! | 119 | * by QBrush::transform(), but Qt does exactly reverse! | ||
120 | * | 120 | * | ||
121 | * That most probably has beed caused by the fact that Qt uses transposed | 121 | * That most probably has beed caused by the fact that Qt uses transposed | ||
122 | * matrices and someone just mistyped the stuff long ago :( | 122 | * matrices and someone just mistyped the stuff long ago :( | ||
123 | * | 123 | * | ||
124 | * So here we basically emulate this feature by converting the gradient into | 124 | * So here we basically emulate this feature by converting the gradient into | ||
125 | * QGradient::LogicalMode and doing transformations manually. | 125 | * QGradient::LogicalMode and doing transformations manually. | ||
126 | */ | 126 | */ | ||
127 | 127 | | |||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |