1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_CANVAS_ISURFACEPROXY_HXX 29 #define INCLUDED_CANVAS_ISURFACEPROXY_HXX 30 31 #include <canvas/rendering/irendermodule.hxx> 32 33 #include <boost/shared_ptr.hpp> 34 35 namespace basegfx 36 { 37 class B2DRange; 38 class B2DPoint; 39 class B2DPolyPolygon; 40 class B2DHomMatrix; 41 } 42 43 namespace canvas 44 { 45 struct ISurfaceProxy 46 { 47 virtual ~ISurfaceProxy() {} 48 49 /** Notify the proxy that the color buffer has changed 50 */ 51 virtual void setColorBufferDirty() = 0; 52 53 /** Render the surface content to screen. 54 55 @param fAlpha 56 Overall alpha for content 57 58 @param rPos 59 Output position 60 61 @param rTransform 62 Output transformation (does not affect output position) 63 */ 64 virtual bool draw( double fAlpha, 65 const ::basegfx::B2DPoint& rPos, 66 const ::basegfx::B2DHomMatrix& rTransform ) = 0; 67 68 /** Render the surface content to screen. 69 70 @param fAlpha 71 Overall alpha for content 72 73 @param rPos 74 Output position 75 76 @param rArea 77 Subset of the surface to render. Coordinate system are 78 surface area pixel, given area will be clipped to the 79 surface bounds. 80 81 @param rTransform 82 Output transformation (does not affect output position) 83 */ 84 virtual bool draw( double fAlpha, 85 const ::basegfx::B2DPoint& rPos, 86 const ::basegfx::B2DRange& rArea, 87 const ::basegfx::B2DHomMatrix& rTransform ) = 0; 88 89 /** Render the surface content to screen. 90 91 @param fAlpha 92 Overall alpha for content 93 94 @param rPos 95 Output position 96 97 @param rClipPoly 98 Clip polygon for the surface. The clip polygon is also 99 subject to the output transformation. 100 101 @param rTransform 102 Output transformation (does not affect output position) 103 */ 104 virtual bool draw( double fAlpha, 105 const ::basegfx::B2DPoint& rPos, 106 const ::basegfx::B2DPolyPolygon& rClipPoly, 107 const ::basegfx::B2DHomMatrix& rTransform ) = 0; 108 }; 109 110 typedef ::boost::shared_ptr< ISurfaceProxy > ISurfaceProxySharedPtr; 111 } 112 113 #endif /* INCLUDED_CANVAS_ISURFACEPROXY_HXX */ 114