From d7c4cda3527f0f00b29226d011fa386e4f243825 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 | 2 +- src/renderer/tvgText.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/tvgPaint.cpp b/src/renderer/tvgPaint.cpp index 82a40130..02690088 100644 --- a/src/renderer/tvgPaint.cpp +++ b/src/renderer/tvgPaint.cpp @@ -402,7 +402,7 @@ Matrix Paint::transform() noexcept Result Paint::bounds(float* x, float* y, float* w, float* h, bool transformed) const noexcept { - if (pImpl->bounds(x, y, w, h, transformed, 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 02c9ddf0..6194f0eb 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; }