* @brief Returns the shadow atlas for the radius encoded in @p id; transparent 1x1 on failure. */
| 174 | * @brief Returns the shadow atlas for the radius encoded in @p id; transparent 1x1 on failure. |
| 175 | */ |
| 176 | QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override |
| 177 | { |
| 178 | Q_UNUSED(requestedSize); |
| 179 | |
| 180 | bool ok = false; |
| 181 | const int radius = id.toInt(&ok); |
| 182 | if (!ok || radius <= 0) { |
| 183 | QImage fallback(1, 1, QImage::Format_ARGB32_Premultiplied); |
| 184 | fallback.fill(Qt::transparent); |
| 185 | if (size) |
| 186 | *size = fallback.size(); |
| 187 | |
| 188 | return fallback; |
| 189 | } |
| 190 | |
| 191 | const QImage atlas = buildShadowAtlas(radius); |
| 192 | if (size) |
| 193 | *size = atlas.size(); |
| 194 | |
| 195 | return atlas; |
| 196 | } |
| 197 | }; |
| 198 | |
| 199 | } // namespace detail |
nothing calls this directly
no test coverage detected