From a2c1ceedc6c6b3756f8d9b3b9c29798b5d925447 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 1 Feb 2023 13:11:05 -0500 Subject: sorting and shape updates --- src/prenderer.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/prenderer.cpp') diff --git a/src/prenderer.cpp b/src/prenderer.cpp index 53025b2..76ac4ab 100644 --- a/src/prenderer.cpp +++ b/src/prenderer.cpp @@ -279,6 +279,19 @@ Transform_Inverse(layer_transforms T) return T; } +static layer_transforms +Transform_Add(layer_transforms T, layer_transforms ExtraT, real32 Width, real32 Height) +{ + v2 NewPos = TransformPoint(ExtraT, Width, Height, V2(T.x, T.y)); + T.x = NewPos.x; + T.y = NewPos.y; + T.ax = T.ax; + T.ay = T.ay; + T.rotation = T.rotation + ExtraT.rotation; + T.scale = T.scale * ExtraT.scale; + return T; +} + static ImVec2 Layer_LocalToScreenSpace(project_state *State, memory *Memory, block_layer *Layer, ui *UI, uint32 PrincipalCompIndex, v2 Point) { -- cgit v1.2.3