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_rendering_FloatingPointBitmapLayout_idl__ 28#define __com_sun_star_rendering_FloatingPointBitmapLayout_idl__ 29 30#ifndef __com_sun_star_rendering_FloatingPointBitmapFormat_idl__ 31#include <com/sun/star/rendering/FloatingPointBitmapFormat.idl> 32#endif 33#ifndef __com_sun_star_rendering_XColorSpace_idl__ 34#include <com/sun/star/rendering/XColorSpace.idl> 35#endif 36 37module com { module sun { module star { module rendering { 38 39/** This structure describes the memory layout of a bitmap having 40 floating point color channels.<p> 41 42 This structure collects all necessary information to describe the 43 memory layout of a bitmap having floating point color channels<p> 44 45 @since OOo 2.0 46 */ 47struct FloatingPointBitmapLayout 48{ 49 /** Number of scanlines for this bitmap. 50 51 This value must not be negative 52 */ 53 long ScanLines; 54 55 /** Number of data bytes per scanline. 56 57 This value must not be negative 58 */ 59 long ScanLineBytes; 60 61 /** Byte offset between the start of two consecutive scanlines. 62 63 This value is permitted to be negative, denoting a bitmap 64 whose content is flipped at the x axis. 65 */ 66 long ScanLineStride; 67 68 /** Byte offset between the start of two consecutive planes. 69 70 This value is permitted to be negative. If this value is zero, 71 the bitmap is assumed to be in chunky format, otherwise it is 72 assumed to be planar. The difference between chunky and 73 planar layout lies in the way how color channels are 74 interleaved. For a chunky format, all channel data for a 75 single pixel lies consecutively in memory. For a planar 76 layout, the first channel of all pixel is stored consecutive, 77 followed by the second channel, and so forth.<p> 78 */ 79 long PlaneStride; 80 81 // TODO(F3): Need some specializations of XColorSpace for float 82 // and half float formats. This maybe translates to the bitmap 83 // layout as well, leading to separate structs for double, float 84 // and half float formats, because of the ColorSpace member. Or 85 // leave it as it is, forcing the client to query for derived 86 // interfaces... 87 88 /// Color space the bitmap colors shall be interpreted within. 89 XColorSpace ColorSpace; 90 91 /** Number of color components per pixel. 92 93 This value must not be negative 94 */ 95 long NumComponents; 96 97 /** Endianness of the pixel values. 98 99 This value must be one of the <type>Endianness</type> constants 100 */ 101 byte Endianness; 102 103 /** Format type of this bitmap.<p> 104 105 This value must be one of the 106 <type>FloatingPointBitmapFormat</type> constants.<p> 107 */ 108 byte Format; 109}; 110 111}; }; }; }; 112 113#endif 114