From 5fd7ea6ac2a12c4d095d0dccc9a2c2b694b788d4 Mon Sep 17 00:00:00 2001 From: "Lin, Yong Xiang" Date: Sun, 15 Sep 2024 04:58:27 +0800 Subject: [PATCH] fixed drawBounds does not use oneTimeTransform (#66) --- source/inochi2d/core/nodes/drawable.d | 5 ++++- source/inochi2d/core/nodes/package.d | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/inochi2d/core/nodes/drawable.d b/source/inochi2d/core/nodes/drawable.d index c96b736..f9fce2c 100644 --- a/source/inochi2d/core/nodes/drawable.d +++ b/source/inochi2d/core/nodes/drawable.d @@ -359,7 +359,10 @@ public: vec3(bounds.x, bounds.y, 0), ]); inDbgLineWidth(3); - inDbgDrawLines(vec4(.5, .5, .5, 1)); + if (oneTimeTransform !is null) + inDbgDrawLines(vec4(.5, .5, .5, 1), (*oneTimeTransform)); + else + inDbgDrawLines(vec4(.5, .5, .5, 1)); inDbgLineWidth(1); } diff --git a/source/inochi2d/core/nodes/package.d b/source/inochi2d/core/nodes/package.d index 71f502c..0cf4b80 100644 --- a/source/inochi2d/core/nodes/package.d +++ b/source/inochi2d/core/nodes/package.d @@ -949,7 +949,10 @@ public: vec3(bounds.x, bounds.y, 0), ]); inDbgLineWidth(3); - inDbgDrawLines(vec4(.5, .5, .5, 1)); + if (oneTimeTransform !is null) + inDbgDrawLines(vec4(.5, .5, .5, 1), (*oneTimeTransform)); + else + inDbgDrawLines(vec4(.5, .5, .5, 1)); inDbgLineWidth(1); }