1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_rendering_FloatingPointBitmapLayout_idl__
24cdf0e10cSrcweir#define __com_sun_star_rendering_FloatingPointBitmapLayout_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_rendering_FloatingPointBitmapFormat_idl__
27cdf0e10cSrcweir#include <com/sun/star/rendering/FloatingPointBitmapFormat.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XColorSpace_idl__
30cdf0e10cSrcweir#include <com/sun/star/rendering/XColorSpace.idl>
31cdf0e10cSrcweir#endif
32cdf0e10cSrcweir
33cdf0e10cSrcweirmodule com { module sun { module star { module rendering {
34cdf0e10cSrcweir
35cdf0e10cSrcweir/** This structure describes the memory layout of a bitmap having
36cdf0e10cSrcweir    floating point color channels.<p>
37cdf0e10cSrcweir
38cdf0e10cSrcweir    This structure collects all necessary information to describe the
39cdf0e10cSrcweir    memory layout of a bitmap having floating point color channels<p>
40cdf0e10cSrcweir
41*d695a2a0SJürgen Schmidt    @since OpenOffice 2.0
42cdf0e10cSrcweir */
43cdf0e10cSrcweirstruct FloatingPointBitmapLayout
44cdf0e10cSrcweir{
45cdf0e10cSrcweir    /** Number of scanlines for this bitmap.
46cdf0e10cSrcweir
47cdf0e10cSrcweir    	This value must not be negative
48cdf0e10cSrcweir     */
49cdf0e10cSrcweir    long				ScanLines;
50cdf0e10cSrcweir
51cdf0e10cSrcweir    /** Number of data bytes per scanline.
52cdf0e10cSrcweir
53cdf0e10cSrcweir    	This value must not be negative
54cdf0e10cSrcweir     */
55cdf0e10cSrcweir    long 				ScanLineBytes;
56cdf0e10cSrcweir
57cdf0e10cSrcweir    /** Byte offset between the start of two consecutive scanlines.
58cdf0e10cSrcweir
59cdf0e10cSrcweir    	This value is permitted to be negative, denoting a bitmap
60cdf0e10cSrcweir    	whose content is flipped at the x axis.
61cdf0e10cSrcweir     */
62cdf0e10cSrcweir    long				ScanLineStride;
63cdf0e10cSrcweir
64cdf0e10cSrcweir    /** Byte offset between the start of two consecutive planes.
65cdf0e10cSrcweir
66cdf0e10cSrcweir    	This value is permitted to be negative. If this value is zero,
67cdf0e10cSrcweir    	the bitmap is assumed to be in chunky format, otherwise it is
68cdf0e10cSrcweir    	assumed to be planar.  The difference between chunky and
69cdf0e10cSrcweir    	planar layout lies in the way how color channels are
70cdf0e10cSrcweir    	interleaved. For a chunky format, all channel data for a
71cdf0e10cSrcweir    	single pixel lies consecutively in memory. For a planar
72cdf0e10cSrcweir    	layout, the first channel of all pixel is stored consecutive,
73cdf0e10cSrcweir    	followed by the second channel, and so forth.<p>
74cdf0e10cSrcweir     */
75cdf0e10cSrcweir    long				PlaneStride;
76cdf0e10cSrcweir
77cdf0e10cSrcweir    // TODO(F3): Need some specializations of XColorSpace for float
78cdf0e10cSrcweir    // and half float formats. This maybe translates to the bitmap
79cdf0e10cSrcweir    // layout as well, leading to separate structs for double, float
80cdf0e10cSrcweir    // and half float formats, because of the ColorSpace member. Or
81cdf0e10cSrcweir    // leave it as it is, forcing the client to query for derived
82cdf0e10cSrcweir    // interfaces...
83cdf0e10cSrcweir
84cdf0e10cSrcweir    /// Color space the bitmap colors shall be interpreted within.
85cdf0e10cSrcweir    XColorSpace			ColorSpace;
86cdf0e10cSrcweir
87cdf0e10cSrcweir    /** Number of color components per pixel.
88cdf0e10cSrcweir
89cdf0e10cSrcweir    	This value must not be negative
90cdf0e10cSrcweir     */
91cdf0e10cSrcweir    long			    NumComponents;
92cdf0e10cSrcweir
93cdf0e10cSrcweir    /** Endianness of the pixel values.
94cdf0e10cSrcweir
95cdf0e10cSrcweir    	This value must be one of the <type>Endianness</type> constants
96cdf0e10cSrcweir     */
97cdf0e10cSrcweir    byte			    Endianness;
98cdf0e10cSrcweir
99cdf0e10cSrcweir    /** Format type of this bitmap.<p>
100cdf0e10cSrcweir
101cdf0e10cSrcweir    	This value must be one of the
102cdf0e10cSrcweir    	<type>FloatingPointBitmapFormat</type> constants.<p>
103cdf0e10cSrcweir    */
104cdf0e10cSrcweir    byte				Format;
105cdf0e10cSrcweir};
106cdf0e10cSrcweir
107cdf0e10cSrcweir}; }; }; };
108cdf0e10cSrcweir
109cdf0e10cSrcweir#endif
110