diff options
author | Fox Caminiti <fox@foxcam.net> | 2023-02-01 13:11:05 -0500 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2023-02-01 13:11:05 -0500 |
commit | a2c1ceedc6c6b3756f8d9b3b9c29798b5d925447 (patch) | |
tree | 8c7e2cb9a6534bf12b5544053ac608ec0dec8dbe /src/prenderer.cpp | |
parent | c40fb7c82be088db4166e92f131865f72b975f56 (diff) |
sorting and shape updates
Diffstat (limited to 'src/prenderer.cpp')
-rw-r--r-- | src/prenderer.cpp | 13 |
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) { |