From b88ccd2cfc35d92d64713c80b508799ecd28f027 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 8 Aug 2024 14:13:58 +0900 Subject: [PATCH] renderer: rectified the bounds() behavior Text fill is broken by 43c87b4eb5cef0fbaa3a4ab8084790b5b5c19735 --- src/renderer/tvgPaint.cpp | 4 ++-- src/renderer/tvgText.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/tvgPaint.cpp b/src/renderer/tvgPaint.cpp index 85bb6b87..8b54341b 100644 --- a/src/renderer/tvgPaint.cpp +++ b/src/renderer/tvgPaint.cpp @@ -406,9 +406,9 @@ TVG_DEPRECATED Result Paint::bounds(float* x, float* y, float* w, float* h) cons } -Result Paint::bounds(float* x, float* y, float* w, float* h, bool transform) const noexcept +Result Paint::bounds(float* x, float* y, float* w, float* h, bool transformed) const noexcept { - if (pImpl->bounds(x, y, w, h, transform, true, true)) return Result::Success; + if (pImpl->bounds(x, y, w, h, transformed, true, transformed)) return Result::Success; return Result::InsufficientCondition; } diff --git a/src/renderer/tvgText.h b/src/renderer/tvgText.h index a1307820..c87c4f5d 100644 --- a/src/renderer/tvgText.h +++ b/src/renderer/tvgText.h @@ -148,7 +148,7 @@ struct Text::Impl bool bounds(float* x, float* y, float* w, float* h, TVG_UNUSED bool stroking) { if (!load() || !paint) return false; - paint->bounds(x, y, w, h, true); + PP(paint)->bounds(x, y, w, h, true, true, false); return true; }