Skip to content

Commit 2f4d58a

Browse files
authored
Fix compilation errors on the HarmonyOS platform. (#3015)
1 parent 67ab780 commit 2f4d58a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/platform/ohos/JPAGImageView.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,10 @@ bool JPAGImageView::present(std::shared_ptr<tgfx::Image> image) {
812812
canvas->clear();
813813
tgfx::Matrix imageMatrix = tgfx::Matrix::MakeScale(1.0 / _renderScale);
814814
imageMatrix.postConcat(_matrix);
815-
canvas->drawImage(image, imageMatrix);
815+
canvas->save();
816+
canvas->concat(imageMatrix);
817+
canvas->drawImage(image);
818+
canvas->restore();
816819
context->flushAndSubmit();
817820
targetWindow->present(context);
818821
context->purgeResourcesNotUsedSince(std::chrono::steady_clock::now());

0 commit comments

Comments
 (0)