1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22#ifndef com_sun_star_graphic_XGraphicRasterizer_idl 23#define com_sun_star_graphic_XGraphicRasterizer_idl 24 25#include <com/sun/star/io/XInputStream.idl> 26#include <com/sun/star/graphic/XGraphic.idl> 27#include <com/sun/star/beans/PropertyValues.idl> 28#include <com/sun/star/beans/XPropertySet.idl> 29#include <com/sun/star/awt/Size.idl> 30 31module com { module sun { module star { module graphic 32{ 33 34/** This interfaces exposes the initialize and a rasterize method to 35 rasterize a given data stream to a pixel graphic 36 */ 37interface XGraphicRasterizer : ::com::sun::star::uno::XInterface 38{ 39 /** Initializing the rasterizer 40 41 <p>This method could also be used to determine, if 42 the provided data is able to be rasterized by the 43 implementation. The implementation should take care of 44 this feature as well as setting the default image size in 45 pixel within the given output parameter.</p> 46 47 @param DataStream 48 The input stream of data that should be rasterized 49 50 @param DPI_X 51 The horizontal resolution of the callers device in pixel per inch. This 52 value is needed to calculate the correct dimensions of the graphic to be 53 rasterized. If a value of <value>0</value> is given, a horizontal default 54 resolution of 72 DPI is used. 55 56 @param DPI_Y 57 The vertical resolution of the callers device in pixel per inch. This 58 value is needed to calculate the correct dimensions of the graphic to be 59 rasterized. If a value of <value>0</value> is given, a vertical default 60 resolution of 72 DPI is used. 61 62 @param DefaultSizePixel 63 The default rendering size in pixel of the underlying graphics 64 data may be available after the call via this output parameter. 65 66 In case no default size can be determined during initialization, 67 a default pixel size of 0,0 is returned. In this case, the caller 68 needs to assume a default pixel size, appropriate for the calling 69 context. 70 71 @returns 72 A boolean value indicating if rasterizing of the given data is 73 possible at all and if the initialization process happened 74 successfully. 75 76 @see com::sun::star::io::XInputStream 77 @see com::sun::star::awt::Size 78 */ 79 boolean initializeData( [in] com::sun::star::io::XInputStream DataStream, 80 [in] unsigned long DPI_X, 81 [in] unsigned long DPI_Y, 82 [out] com::sun::star::awt::Size DefaultSizePixel ); 83 84 /** Rasterizing the initialized data into a <type>XGraphic</type> container. 85 86 <p>The <type>XGraphic</type> container will contain a pixel 87 type graphic after a successful rasterization process</p> 88 89 <p>In case of any fault during the rasterization process, 90 the <type>XGraphic</type> container will be empty afterwards and 91 the method will return false</p> 92 93 @param Width 94 The width in pixel of the graphic to be rasterized. 95 This parameter is used without taking other transformation 96 values into account. 97 98 @param Height 99 The height in pixel of the graphic to be rasterized. 100 This parameter is used without taking other transformation 101 values into account. 102 103 @param RotateAngle 104 The rotation angle of the graphic to be rasterized. 105 This parameter is used without taking other transformation 106 values into account. The rotation is applied after scaling 107 and shearing the original image. 108 109 @param ShearXAngle 110 The horizontal shear angle of the graphic to be rasterized. 111 This parameter is used without taking other transformation 112 values into account. The shearing is applied after scaling 113 and before rotation of the image. 114 115 @param ShearYAngle 116 The vertical shear angle of the graphic to be rasterized. 117 This parameter is used without taking other transformation 118 values into account. The shearing is applied after scaling 119 and before rotation of the image. 120 121 @param RasterizeProperties 122 Additional properties for special needs (undefined by now) 123 124 @param Graphic 125 An interface to a graphic container into which the given data 126 should be rasterized. 127 128 @returns com::sun::star::graphic::XGraphic 129 An interface to a graphic container that holds the rasterized pixel data 130 131 @see com::sun::star::beans::PropertyValues 132 @see com::sun::star::graphic::XGraphic 133 */ 134 com::sun::star::graphic::XGraphic rasterize( [in] unsigned long Width, 135 [in] unsigned long Height, 136 [in] double RotateAngle, 137 [in] double ShearAngle_X, 138 [in] double ShearAngle_Y, 139 [in] com::sun::star::beans::PropertyValues RasterizeProperties ); 140}; 141 142} ; } ; } ; } ; 143 144#endif 145