/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/** Representation of a draw document's background shape.
This class implements the Shape interface for the background shape. Since the background shape is neither animatable nor attributable, those more specialized derivations of the Shape interface are not implemented here.
@attention this class is to be treated 'final', i.e. one should not derive from it.
*/ class BackgroundShape : public Shape
{ public: /** Create the background shape.
This method creates a shape that handles the peculiarities of the draw API regarding background content.
*/
BackgroundShape( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const css::uno::Reference< css::drawing::XDrawPage >& xMasterPage, const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
private: /// The metafile actually representing the Shape
GDIMetaFileSharedPtr mpMtf;
// The attributes of this Shape
::basegfx::B2DRectangle maBounds; // always needed for rendering
/// the list of active view shapes (one for each registered view layer) typedef ::std::vector< ViewBackgroundShapeSharedPtr > ViewBackgroundShapeVector;
ViewBackgroundShapeVector maViewShapes;
};
// TODO : needed for the moment since ANDROID doesn't know size_t return from std::erase_if #ifdefined ANDROID
ViewBackgroundShapeVector::iterator aIter;
if( aCurrBounds.getRange().equalZero() )
{ // zero-sized shapes are effectively invisible, // thus, we save us the rendering... returntrue;
}
// redraw all view shapes, by calling their render() method if( o3tl::make_unsigned(::std::count_if( maViewShapes.begin(),
maViewShapes.end(),
[this]( const ViewBackgroundShapeSharedPtr& pBgShape )
{ return pBgShape->render( this->mpMtf ); } ))
!= maViewShapes.size() )
{ // at least one of the ViewBackgroundShape::render() calls did return // false - update failed on at least one ViewLayer returnfalse;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.