summaryrefslogtreecommitdiff
path: root/src/prenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/prenderer.cpp')
-rw-r--r--src/prenderer.cpp13
1 files changed, 13 insertions, 0 deletions
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)
{