Kaydet (Commit) 99e373cd authored tarafından Michael Stahl's avatar Michael Stahl

slideshow: clip shapes in secondary screen window

When using the presenter console, the secondary screen has
a small view of the current slide.

Currently nothing clips the shapes that are on the slide,
so they may be rendered outside the slide rectangle,
because there's a single VCL-canvas and OutPutDevice that covers
the entire screen.

Set up some brute force clipping in DrawShape::getViewRenderArgs().

Change-Id: I3b21f08c12718254b6cf166b7fb1540e9381b243
üst 3c18e816
...@@ -133,11 +133,26 @@ namespace slideshow ...@@ -133,11 +133,26 @@ namespace slideshow
ViewShape::RenderArgs DrawShape::getViewRenderArgs() const ViewShape::RenderArgs DrawShape::getViewRenderArgs() const
{ {
uno::Reference<beans::XPropertySet> const xPropSet(mxPage,
uno::UNO_QUERY_THROW);
sal_Int32 nWidth = 0;
sal_Int32 nHeight = 0;
xPropSet->getPropertyValue("Width") >>= nWidth;
xPropSet->getPropertyValue("Height") >>= nHeight;
basegfx::B2DRectangle slideRect(0, 0, nWidth, nHeight);
basegfx::B2DRectangle origBounds(maBounds);
origBounds.intersect(slideRect);
basegfx::B2DRectangle updateBounds(getUpdateArea());
updateBounds.intersect(slideRect);
basegfx::B2DRectangle bounds(getBounds());
bounds.intersect(slideRect);
basegfx::B2DRectangle unitBounds(getActualUnitShapeBounds());
unitBounds.intersect(slideRect);
return ViewShape::RenderArgs( return ViewShape::RenderArgs(
maBounds, origBounds,
getUpdateArea(), updateBounds,
getBounds(), bounds,
getActualUnitShapeBounds(), unitBounds,
mpAttributeLayer, mpAttributeLayer,
maSubsetting.getActiveSubsets(), maSubsetting.getActiveSubsets(),
mnPriority); mnPriority);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment