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_IntegerBitmapLayout_idl__
24#define __com_sun_star_rendering_IntegerBitmapLayout_idl__
25
26#ifndef __com_sun_star_rendering_XIntegerBitmapColorSpace_idl__
27#include <com/sun/star/rendering/XIntegerBitmapColorSpace.idl>
28#endif
29#ifndef __com_sun_star_rendering_XBitmapPalette_idl__
30#include <com/sun/star/rendering/XBitmapPalette.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    integer color channels.<p>
37
38    This structure collects all necessary information to describe the
39    memory layout of a bitmap having integer color channels<p>
40
41    @since OpenOffice 2.0
42 */
43struct IntegerBitmapLayout
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    /** Color space the bitmap colors shall be interpreted within.<p>
78
79        Note that the actual pixel layout is specified at the color
80        space. If this layout describes a palette bitmap format, this
81        color space describes the index format (plus maybe an extra
82        alpha channel). The palette itself references another color
83        space, which describes the layout of the palette entries.
84
85        @see XBitmapPalette
86     */
87    XIntegerBitmapColorSpace ColorSpace;
88
89    /** This member determines whether the bitmap data are actually
90        indices into a color map.<p>
91
92        When set to the nil reference, the bitmap data is assumed to
93        contain direct color values (to be interpreted according to
94        the associated color space). If this member references a valid
95        palette, one of the pixel components as returned by the color
96        space referenced from the <member>ColorSpace</member> is
97        required to be of type
98        <member>ColorComponentTag::INDEX</member>. That component is
99        then used to index the palette.<p>
100     */
101    XBitmapPalette		     Palette;
102
103    /** This member determines the bit order (only relevant if a pixel
104        uses less than 8 bits, of course).<p>
105
106        When <TRUE/>, this member denotes that the leftmost pixel from
107        an 8 bit amount of pixel data consists of the bits starting
108        with the most significant bit. When <FALSE/>, it's starting
109        with the least significant bit.<p>
110
111        Example: for a 1bpp bitmap, each pixel is represented by
112        exactly one bit. If this member is <TRUE/>, the first pixel is
113        the MSB of the first byte, and the eighth pixel is the LSB of
114        the first byte. If this member is <FALSE/>, it's just the
115        opposite.
116     */
117    boolean                  IsMsbFirst;
118
119};
120
121}; }; }; };
122
123#endif
124