diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2023-10-05 13:37:38 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2023-12-21 11:04:12 +1000 |
commit | 8fe920ccb03a9264f936cfbc9c6d61687f6bb4d6 (patch) | |
tree | 1e492a5f82a7f1c8b84581b61e72cc1930c59a38 /src/plugins/platforms/wasm/qwasmdom.h | |
parent | 66c2dfbebab4ec632b723779a9a41896d35e84d0 (diff) |
wasm: move image to web conversion to dom::
This allows other areas to utilize this
Change-Id: I4bc7e8374289a19afe8b639b2b3b0dc0f8f65a3a
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmdom.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmdom.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmdom.h b/src/plugins/platforms/wasm/qwasmdom.h index 3f2e4242ef..853e54540e 100644 --- a/src/plugins/platforms/wasm/qwasmdom.h +++ b/src/plugins/platforms/wasm/qwasmdom.h @@ -16,6 +16,7 @@ QT_BEGIN_NAMESPACE class QPoint; +class QRect; namespace dom { inline emscripten::val document() @@ -26,6 +27,9 @@ inline emscripten::val document() void syncCSSClassWith(emscripten::val element, std::string cssClassName, bool flag); QPointF mapPoint(emscripten::val source, emscripten::val target, const QPointF &point); + +void drawImageToWebImageDataArray(const QImage &source, emscripten::val destinationImageData, + const QRect &sourceRect); } // namespace dom QT_END_NAMESPACE |