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#ifndef __com_sun_star_graphic_XPrimitive2D_idl__
28#define __com_sun_star_graphic_XPrimitive2D_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_beans_PropertyValue_idl__
34#include <com/sun/star/beans/PropertyValue.idl>
35#endif
36#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
37#include <com/sun/star/geometry/RealRectangle2D.idl>
38#endif
39
40module com {  module sun {  module star {  module graphic {
41
42/** XPrimitive2D interface
43
44    This is the basic interface for 2D graphic primitives. They need to be able
45	- to provide a decomposition consisting of simpler graphic primitives
46	- to provide a 2D bound rectangle as a 2D range
47 */
48interface XPrimitive2D : ::com::sun::star::uno::XInterface
49{
50    /** Retrieve decomposed list of simpler primitives
51
52        @param aViewParameters
53        2D View-specific parameter set. The defined but not mandatory
54		parameters include:
55
56		::com::sun::star::geometry::AffineMatrix2D Transformation
57
58		A transformation matrix which maps between world coordinates (which
59		is equal to object's local coordinates) to view coordinates. If not
60		defined, an empty transformation is implied.
61
62		::com::sun::star::geometry::RealRectangle2D Viewport
63
64		Defines the visible part of the view in world coordinates. May be used
65		to optimize decompositions, e.g. for 3d scenes only the visible part
66		needs to be created. If not given, an empty Viewport is implied which
67		means all is visible.
68
69		double Time
70
71		Defines the point in time for which the geometry is defined. This may
72		lead to varied results for animated objects. This value is defined in the
73		range [0.0 .. n[, negative values are not allowed. If not given, a value of
74		0.0 is implied.
75     */
76    sequence< XPrimitive2D > getDecomposition( [in] sequence< ::com::sun::star::beans::PropertyValue > aViewParameters );
77
78    /** Retrieve bound rect of primitive
79
80        This method calculates the actual bound rect of the area in
81        <em>world coordinates<em>. Note that for view-dependent primitives,
82		the necessary pixel adjustments are taken into account. For that reason
83		the ViewParameters need to be given.
84
85		@param aViewParameters
86        2D View-specific parameter set, same as in getDecomposition.
87     */
88    ::com::sun::star::geometry::RealRectangle2D getRange( [in] sequence< ::com::sun::star::beans::PropertyValue > aViewParameters );
89};
90
91}; }; }; };
92
93#endif
94