Skip to content

Commit

Permalink
Transform: support SVG event for opacity
Browse files Browse the repository at this point in the history
Opacity is part of transform/animator and should also support SVG events.
  • Loading branch information
rodlie committed Aug 9, 2024
1 parent bdb5117 commit b69afc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/Animators/graphanimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@ void GraphAnimator::graph_saveSVG(SvgExporter& exp,
} else {
const auto tagName = transform ? "animateTransform" : "animate";
auto anim = exp.createElement(tagName);
if (transform) {
if (!beginEvent.isEmpty()) { anim.setAttribute("begin", beginEvent); }
if (!endEvent.isEmpty()) { anim.setAttribute("end", endEvent); }
}

if (!beginEvent.isEmpty()) { anim.setAttribute("begin", beginEvent); }
if (!endEvent.isEmpty()) { anim.setAttribute("end", endEvent); }

anim.setAttribute("attributeName", attrName);
if(!type.isEmpty()) anim.setAttribute("type", type);
const qreal div = span - 1;
Expand Down
4 changes: 3 additions & 1 deletion src/core/Animators/transformanimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ QDomElement BoxTransformAnimator::saveSVG(SvgExporter& exp,
beginEvent, endEvent);
{
const auto opaAnim = getOpacityAnimator();
opaAnim->saveQrealSVG(exp, unpivot, visRange, "opacity", 0.01);
opaAnim->saveQrealSVG(exp, unpivot, visRange,
"opacity", 0.01, false, "", "%1",
beginEvent, endEvent);
}

auto shear = exp.createElement("g");
Expand Down

0 comments on commit b69afc3

Please sign in to comment.