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