1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_IntegerBitmapLayout_idl__
28 #define __com_sun_star_rendering_IntegerBitmapLayout_idl__
30 #ifndef __com_sun_star_rendering_XIntegerBitmapColorSpace_idl__
31 #include
<com
/sun
/star
/rendering
/XIntegerBitmapColorSpace.idl
>
33 #ifndef __com_sun_star_rendering_XBitmapPalette_idl__
34 #include
<com
/sun
/star
/rendering
/XBitmapPalette.idl
>
37 module com
{ module sun
{ module star
{ module rendering
{
39 /** This structure describes the memory layout of a bitmap having
40 integer color channels.<p>
42 This structure collects all necessary information to describe the
43 memory layout of a bitmap having integer color channels<p>
47 struct IntegerBitmapLayout
49 /** Number of scanlines for this bitmap.
51 This value must not be negative
55 /** Number of data bytes per scanline.
57 This value must not be negative
61 /** Byte offset between the start of two consecutive scanlines.
63 This value is permitted to be negative, denoting a bitmap
64 whose content is flipped at the x axis.
68 /** Byte offset between the start of two consecutive planes.
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>
81 /** Color space the bitmap colors shall be interpreted within.<p>
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.
91 XIntegerBitmapColorSpace ColorSpace
;
93 /** This member determines whether the bitmap data are actually
94 indices into a color map.<p>
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>
105 XBitmapPalette Palette
;
107 /** This member determines the bit order (only relevant if a pixel
108 uses less than 8 bits, of course).<p>
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>
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