From 0d5ecf3c028e912e32cc2488bb400c1cf2cd77b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Fri, 2 Aug 2024 15:52:34 -0300 Subject: [PATCH] Add some comments --- src/app/ui/editor/moving_slice_state.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/ui/editor/moving_slice_state.h b/src/app/ui/editor/moving_slice_state.h index 5db5c0503..1e61c6dd0 100644 --- a/src/app/ui/editor/moving_slice_state.h +++ b/src/app/ui/editor/moving_slice_state.h @@ -165,10 +165,17 @@ namespace app { doc::SliceKey newKey; // Vector of each selected layer's part of the sprite under // the slice bounds that will be transformed when Slice Transform is - // enabled + // enabled. Contains one ItemContentRef by layer. std::vector content; + // Part of the sprite of each selected layer's merged into one image per + // slice. This is used to give feedback to the users when they are + // transforming the selected slices. ItemContentRef mergedContent; + // Adds image to the content vector. The image should correspond to some + // part of a single layer cel's image. + // Internally this method builds a merged version of the images to speed + // up the drawing when the user updates this Item's slice in real time. void pushContent(const ImageRef& image) { if (content.empty()) { const gfx::Rect& srcBounds = image->bounds();