MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / requestImage

Method requestImage

app/src/Platform/CSD.cpp:176–196  ·  view source on GitHub ↗

* @brief Returns the shadow atlas for the radius encoded in @p id; transparent 1x1 on failure. */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

buildShadowAtlasFunction · 0.85
fillMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected