summaryrefslogtreecommitdiff
path: root/src/layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layer.cpp')
-rw-r--r--src/layer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/layer.cpp b/src/layer.cpp
index 6159467..b27935b 100644
--- a/src/layer.cpp
+++ b/src/layer.cpp
@@ -112,11 +112,14 @@ Layer_UpdateMasksEffects(project_state *State, block_layer *Layer, memory *Memor
Arbitrary_Zero((uint8 *)Data, sizeof(nvg_point) * 128);
layer_transforms T = Layer_GetTransforms(Layer);
v2 Min = {}, Max = {};
+ int ShapeWidth = 0, ShapeHeight = 0;
if (State->Interact_Active == interact_type_keyframe_move) {
NVG_FlattenPath(Memory, Shape, (nvg_point *)Data, State, T, 0, 0, Width, Height, 0, &Min, &Max);
+ ShapeWidth = Max.x - Min.x;
+ ShapeHeight = Max.y - Min.y;
}
uint32 NumberOfVerts = NVG_FlattenPath(Memory, Shape, (nvg_point *)Data,
- State, T, Shape->Width, Shape->Height, Width, Height, 1, &Min, &Max);
+ State, T, ShapeWidth, ShapeHeight, Width, Height, 1, &Min, &Max);
void *Data_Stroke = Memory_PushScratch(Memory, sizeof(real32) * 4 * 256);
uint32 StrokeCount = NVG_ExpandStroke(Memory, NumberOfVerts, Shape->Opt.StrokeWidth, Shape->Opt.LineCapType, Shape->Opt.LineJoinType, Shape->IsClosed, (nvg_point *)Data, (real32 *)Data_Stroke);
void *Data_Fill = Memory_PushScratch(Memory, sizeof(real32) * 4 * NumberOfVerts);