/* -*- 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 .
*/
/** Query the associated view layer of this shape
*/ const ViewLayerSharedPtr& getViewLayer() const;
/** Query dimension of a safety border around the shape for AA
If the view performs antialiasing, this method calculates a safety border around the shape, in the shape coordinate system, which is guaranteed to include every pixel touched when rendering the shape.
*/
::basegfx::B2DSize getAntialiasingBorder() const;
// animation methods
/** Notify the ViewShape that an animation starts now
This method enters animation mode on the associate target view. The shape can be animated in parallel on different views.
*/ void enterAnimationMode();
/** Notify the ViewShape that it is no longer animated
This methods ends animation mode on the associate target view
*/ void leaveAnimationMode();
@param rUpdateBounds The area covered by the shape
@param rBounds The current shape bounds
@param rAttr The current shape attribute set. Can be NULL, for default attributes. Attention: stored as a reference, thus, parameter object must stay valid!
@param rSubsets Vector of subset rendering ranges. Attention: stored as a reference, thus, parameter object must stay valid!
This method updates the ViewShape on the associated view. If the shape is currently animated, the render target is the sprite, otherwise the view's canvas. This method does not render anything, if the update flags are 0.
@param rMtf The metafile representation of the shape
@param rArgs Parameter structure, containing all necessary arguments
@param nUpdateFlags Bitmask of things to update. Use FORCE to force a repaint.
@param bIsVisible When false, the shape is fully invisible (and possibly don't need to be painted)
/** Retrieve renderer for given canvas and metafile.
If necessary, the renderer is created or updated for the metafile and attribute layer.
@return a renderer that renders to the given destination canvas
*/
::cppcanvas::RendererSharedPtr getRenderer( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas, const GDIMetaFileSharedPtr& rMtf, const ShapeAttributeLayerSharedPtr& rAttr ) const;
/** Retrieve a valid iterator to renderer cache entry
This method ensures that an internal limit of MAX_RENDER_CACHE_ENTRIES is not exceeded.
@param rDestinationCanvas Destination canvas to retrieve cache entry for
@return a valid iterator to a renderer cache entry for the given canvas. The entry might be default-constructed (if newly added)
*/
RendererCacheVector::iterator getCacheEntry( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas ) const;
void invalidateRenderer() const;
/** The view layer this object is part of.
Needed for sprite creation
*/
ViewLayerSharedPtr mpViewLayer;
/// A set of cached mtf/canvas combinations mutable RendererCacheVector maRenderers;
/// The sprite object mutable AnimatedSpriteSharedPtr mpSprite;
/// If true, render() calls go to the sprite mutablebool mbAnimationMode;
/// If true, shape needs full repaint (and the sprite a setup, if any) mutablebool mbForceUpdate;
};
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.