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