Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_CANVAS_ISURFACE_HXX
30 : : #define INCLUDED_CANVAS_ISURFACE_HXX
31 : :
32 : : #include <sal/types.h>
33 : :
34 : : #include <boost/shared_ptr.hpp>
35 : :
36 : :
37 : : namespace basegfx
38 : : {
39 : : class B2IRange;
40 : : class B2IPoint;
41 : : class B2IVector;
42 : : }
43 : :
44 : : namespace canvas
45 : : {
46 : : struct IColorBuffer;
47 : :
48 : : struct ISurface
49 : : {
50 [ # # ]: 0 : virtual ~ISurface() {}
51 : :
52 : : /** Select texture behind this interface to be the current one
53 : : for primitive output.
54 : : */
55 : : virtual bool selectTexture() = 0;
56 : :
57 : : /** Tells whether the surface is valid or not
58 : : */
59 : : virtual bool isValid() = 0;
60 : :
61 : : /** Update surface content from given IColorBuffer
62 : :
63 : : This method updates the given subarea of the surface from
64 : : the given color buffer bits.
65 : :
66 : : @param rDestPos
67 : : Position in the surface, where the subset update should
68 : : have its left, top edge
69 : :
70 : : @param rSourceRect
71 : : Size and position of the rectangular subset update in the
72 : : source color buffer
73 : :
74 : : @param rSource
75 : : Source bits to use for the update
76 : :
77 : : @return true, if the update was successful
78 : : */
79 : : virtual bool update( const ::basegfx::B2IPoint& rDestPos,
80 : : const ::basegfx::B2IRange& rSourceRect,
81 : : IColorBuffer& rSource ) = 0;
82 : :
83 : : virtual ::basegfx::B2IVector getSize() = 0;
84 : : };
85 : :
86 : : typedef ::boost::shared_ptr< ISurface > ISurfaceSharedPtr;
87 : : }
88 : :
89 : : #endif /* INCLUDED_CANVAS_ISURFACE_HXX */
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|