summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-09-25 15:10:05 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2024-10-10 18:15:44 +0200
commit959bbd2dddd6ab4bdb1f0e5548126db83fc19964 (patch)
treedae9913deaff30348040e9ca0e384b67421442d8 /drawinglayer
parent8903ddff872d579b06bd3acc413d3d14f4284228 (diff)
slideshow: Render each animated paragraph in its own layer
We need to render each animated paragraph of a SdrTextObj in its own layer. This is not easy to do, so modify the PrimitiveContainer after rendering and turn off all the paragraphs that shouldn't be rendered. In addition also turn off rendering of the object itself (the fill and stroke). This can be done by setting the newly added setVisible method on the desired TextHierarchyParagraphPrimitive2D to false (and others to true), and turning the primitives to render the object to setVisible = false. If the primitive is not "visible" it will be skipped in the when rendering with VclPixelProcessor2D. Also changes the SlideshowLayerRenderer to take into account the rendering of paragraphs. We remember all the paragraphs for an text object that are animated, then we take this into account when we do render passes. We also need to take care of the paragraph hash, which needs to be set consistently for all animated paragraphs (so the layers can be identified correctly for animated paragraphs). Change-Id: Ice3b9e1f586c3fca81cf5da809fa88c4b9c87c37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173939 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 8d199f696a40..6877a1a72f2c 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -195,6 +195,10 @@ bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(
void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate)
{
+ // Skip, if not visible
+ if (!rCandidate.getVisible())
+ return;
+
switch (rCandidate.getPrimitive2DID())
{
case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D: