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 23#ifndef __com_sun_star_rendering_XIeeeDoubleBitmap_idl__ 24#define __com_sun_star_rendering_XIeeeDoubleBitmap_idl__ 25 26#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 27#include <com/sun/star/lang/IllegalArgumentException.idl> 28#endif 29#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 30#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 31#endif 32#ifndef __com_sun_star_rendering_FloatingPointBitmapLayout_idl__ 33#include <com/sun/star/rendering/FloatingPointBitmapLayout.idl> 34#endif 35#ifndef __com_sun_star_geometry_IntegerPoint2D_idl__ 36#include <com/sun/star/geometry/IntegerPoint2D.idl> 37#endif 38#ifndef __com_sun_star_geometry_IntegerRectangle2D_idl__ 39#include <com/sun/star/geometry/IntegerRectangle2D.idl> 40#endif 41#ifndef __com_sun_star_rendering_XIeeeDoubleReadOnlyBitmap_idl__ 42#include <com/sun/star/rendering/XIeeeDoubleReadOnlyBitmap.idl> 43#endif 44#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__ 45#include <com/sun/star/rendering/VolatileContentDestroyedException.idl> 46#endif 47 48 49module com { module sun { module star { module rendering { 50 51/** This is a specialized interface for bitmaps containing IEEE 52 doubles for their color components.<p> 53 */ 54interface XIeeeDoubleBitmap : XIeeeDoubleReadOnlyBitmap 55{ 56 //------------------------------------------------------------------------- 57 58 /** Set raw data of a bitmap.<p> 59 60 Set raw data of a bitmap, in the format as defined by 61 getMemoryLayout(). With the given rectangle, a subset of the 62 bitmap can be changed. When setting subsets of the bitmap, the 63 same scanline padding takes place as when the whole bitmap is 64 changed.<p> 65 66 When setting data on volatile bitmaps, always call isValid() 67 before, and retrieve a new memory layout via 68 getMemoryLayout(). At least under Windows, the memory layout 69 can change for the same bitmap, if the user e.g. switches the 70 screen resolution. Thus, this method will throw an 71 IllegalArgumentException, if the memory layout changed between 72 a call to getMemoryLayout() and setData().<p> 73 74 @param data 75 Data to set 76 77 @param bitmapLayout 78 Layout of the data to set. Must match this bitmap's current 79 layout. 80 81 @param rect 82 Destination rectangle, within the bounds of the bitmap, to set 83 the data in. 84 85 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type> 86 if parts of the given rectangle are outside the permissible 87 bitmap area. 88 89 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 90 if the given memory layout does not match this bitmap's 91 layout, or if the given data sequence has too few or too much 92 elements. 93 */ 94 void setData( [in] sequence<double> data, [in] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerRectangle2D rect ) 95 raises (com::sun::star::lang::IllegalArgumentException, 96 com::sun::star::lang::IndexOutOfBoundsException); 97 98 //------------------------------------------------------------------------- 99 100 /** Set a single pixel of the bitmap with the given color 101 value.<p> 102 103 When setting data on volatile bitmaps, always call isValid() 104 before, and retrieve a new memory layout via 105 getMemoryLayout(). At least under Windows, the memory layout 106 can change for the same bitmap, if the user e.g. switches the 107 screen resolution. Thus, this method will throw an 108 IllegalArgumentException, if the memory layout changed between 109 a call to getMemoryLayout() and setPixel().<p> 110 111 @param color 112 The color value(s) to set 113 114 @param bitmapLayout 115 Layout of the color elements to set. Must match this bitmap's 116 current layout. 117 118 @param pos 119 Pixel position with the bounds of the bitmap to set. 120 121 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type> 122 if the given point is outside the permissible bitmap area. 123 124 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 125 if the given memory layout does not match this bitmap's 126 layout, or if the given data sequence has too few or too much 127 elements. 128 */ 129 void setPixel( [in] sequence<double> color, [in] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerPoint2D pos ) 130 raises (com::sun::star::lang::IllegalArgumentException, 131 com::sun::star::lang::IndexOutOfBoundsException); 132 133}; 134 135}; }; }; }; 136 137#endif 138