1ddde725dSArmin Le Grand/**************************************************************
2ddde725dSArmin Le Grand *
3ddde725dSArmin Le Grand * Licensed to the Apache Software Foundation (ASF) under one
4ddde725dSArmin Le Grand * or more contributor license agreements.  See the NOTICE file
5ddde725dSArmin Le Grand * distributed with this work for additional information
6ddde725dSArmin Le Grand * regarding copyright ownership.  The ASF licenses this file
7ddde725dSArmin Le Grand * to you under the Apache License, Version 2.0 (the
8ddde725dSArmin Le Grand * "License"); you may not use this file except in compliance
9ddde725dSArmin Le Grand * with the License.  You may obtain a copy of the License at
10ddde725dSArmin Le Grand *
11*2b45cf47SArmin Le Grand *   http://www.apache.org/licenses/LICENSE-2.0
12ddde725dSArmin Le Grand *
13ddde725dSArmin Le Grand * Unless required by applicable law or agreed to in writing,
14ddde725dSArmin Le Grand * software distributed under the License is distributed on an
15ddde725dSArmin Le Grand * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ddde725dSArmin Le Grand * KIND, either express or implied.  See the License for the
17ddde725dSArmin Le Grand * specific language governing permissions and limitations
18ddde725dSArmin Le Grand * under the License.
19ddde725dSArmin Le Grand *
20ddde725dSArmin Le Grand *************************************************************/
21ddde725dSArmin Le Grand#ifndef __com_sun_star_graphic_XPrimitive2DRenderer_idl__
22ddde725dSArmin Le Grand#define __com_sun_star_graphic_XPrimitive2DRenderer_idl__
23ddde725dSArmin Le Grand
24ddde725dSArmin Le Grand#include <com/sun/star/uno/XInterface.idl>
25ddde725dSArmin Le Grand#include <com/sun/star/rendering/XBitmap.idl>
26ddde725dSArmin Le Grand#include <com/sun/star/beans/PropertyValue.idl>
27ddde725dSArmin Le Grand#include <com/sun/star/geometry/RealRectangle2D.idl>
28ddde725dSArmin Le Grand
29ddde725dSArmin Le Grandmodule com {  module sun {  module star {  module graphic {
30ddde725dSArmin Le Grand
31ddde725dSArmin Le Grandinterface XPrimitive2D;
32ddde725dSArmin Le Grand
33ddde725dSArmin Le Grand/** XPrimitive2DRenderer interface
34ddde725dSArmin Le Grand
35ddde725dSArmin Le Grand    This interface allows to convert from a sequence of XPrimitive2Ds
36ddde725dSArmin Le Grand    to a XBitmap
37ddde725dSArmin Le Grand */
38ddde725dSArmin Le Grandinterface XPrimitive2DRenderer : ::com::sun::star::uno::XInterface
39ddde725dSArmin Le Grand{
40ddde725dSArmin Le Grand    /** return rasterized version of given XPrimitive2D
41ddde725dSArmin Le Grand
42ddde725dSArmin Le Grand		@param Primitive2DSequence
43ddde725dSArmin Le Grand            The graphic content description
44ddde725dSArmin Le Grand
45ddde725dSArmin Le Grand		@param aViewInformationSequence
46ddde725dSArmin Le Grand            The ViewInformation2D
47ddde725dSArmin Le Grand
48ddde725dSArmin Le Grand		@param DPI_X
49ddde725dSArmin Le Grand			The horizontal resolution of the callers device in pixel per inch. This
50ddde725dSArmin Le Grand            value is needed to calculate the correct dimensions of the graphic to be
51ddde725dSArmin Le Grand            rasterized. If a value of <value>0</value> is given, a horizontal default
52ddde725dSArmin Le Grand            resolution of 72 DPI is used.
53ddde725dSArmin Le Grand
54ddde725dSArmin Le Grand		@param DPI_Y
55ddde725dSArmin Le Grand			The vertical resolution of the callers device in pixel per inch. This
56ddde725dSArmin Le Grand            value is needed to calculate the correct dimensions of the graphic to be
57ddde725dSArmin Le Grand            rasterized. If a value of <value>0</value> is given, a vertical default
58ddde725dSArmin Le Grand            resolution of 72 DPI is used.
59ddde725dSArmin Le Grand
60ddde725dSArmin Le Grand        @param Range
61ddde725dSArmin Le Grand			The range in 1/100th mm of the graphic to be rasterized
62ddde725dSArmin Le Grand
63ddde725dSArmin Le Grand        @param MaximumQuadraticPixels
64ddde725dSArmin Le Grand            The maximum allowed number of pixels to be used to allow limiting the
65ddde725dSArmin Le Grand            possible size of used pixels. The AspectRatio is preserved, the result
66ddde725dSArmin Le Grand            gets limited to given number. If a value of 0 is given, a default of
67ddde725dSArmin Le Grand            500000 is used.
68ddde725dSArmin Le Grand     */
69ddde725dSArmin Le Grand	com::sun::star::rendering::XBitmap rasterize(
70ddde725dSArmin Le Grand        [in] sequence< XPrimitive2D > Primitive2DSequence,
71ddde725dSArmin Le Grand        [in] sequence< ::com::sun::star::beans::PropertyValue > aViewInformationSequence,
72ddde725dSArmin Le Grand        [in] unsigned long DPI_X,
73ddde725dSArmin Le Grand        [in] unsigned long DPI_Y,
74ddde725dSArmin Le Grand        [in] ::com::sun::star::geometry::RealRectangle2D Range,
75ddde725dSArmin Le Grand        [in] unsigned long MaximumQuadraticPixels);
76ddde725dSArmin Le Grand};
77ddde725dSArmin Le Grand
78ddde725dSArmin Le Grand}; }; }; };
79ddde725dSArmin Le Grand
80ddde725dSArmin Le Grand#endif
81