Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / rendering / IntegerBitmapLayout.idl
blobd1af5ae9cac44fecb8165cb766347840c9db4e67
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_IntegerBitmapLayout_idl__
20 #define __com_sun_star_rendering_IntegerBitmapLayout_idl__
22 #include <com/sun/star/rendering/XIntegerBitmapColorSpace.idl>
23 #include <com/sun/star/rendering/XBitmapPalette.idl>
25 module com { module sun { module star { module rendering {
27 /** This structure describes the memory layout of a bitmap having
28 integer color channels.<p>
30 This structure collects all necessary information to describe the
31 memory layout of a bitmap having integer color channels<p>
33 @since OOo 2.0
35 struct IntegerBitmapLayout
37 /** Number of scanlines for this bitmap.
39 This value must not be negative
41 long ScanLines;
43 /** Number of data bytes per scanline.
45 This value must not be negative
47 long ScanLineBytes;
49 /** Byte offset between the start of two consecutive scanlines.
51 This value is permitted to be negative, denoting a bitmap
52 whose content is flipped at the x axis.
54 long ScanLineStride;
56 /** Byte offset between the start of two consecutive planes.
58 This value is permitted to be negative. If this value is zero,
59 the bitmap is assumed to be in chunky format, otherwise it is
60 assumed to be planar. The difference between chunky and
61 planar layout lies in the way how color channels are
62 interleaved. For a chunky format, all channel data for a
63 single pixel lies consecutively in memory. For a planar
64 layout, the first channel of all pixel is stored consecutive,
65 followed by the second channel, and so forth.<p>
67 long PlaneStride;
69 /** Color space the bitmap colors shall be interpreted within.<p>
71 Note that the actual pixel layout is specified at the color
72 space. If this layout describes a palette bitmap format, this
73 color space describes the index format (plus maybe an extra
74 alpha channel). The palette itself references another color
75 space, which describes the layout of the palette entries.
77 @see XBitmapPalette
79 XIntegerBitmapColorSpace ColorSpace;
81 /** This member determines whether the bitmap data are actually
82 indices into a color map.<p>
84 When set to the nil reference, the bitmap data is assumed to
85 contain direct color values (to be interpreted according to
86 the associated color space). If this member references a valid
87 palette, one of the pixel components as returned by the color
88 space referenced from the #ColorSpace is
89 required to be of type
90 ColorComponentTag::INDEX. That component is
91 then used to index the palette.<p>
93 XBitmapPalette Palette;
95 /** This member determines the bit order (only relevant if a pixel
96 uses less than 8 bits, of course).<p>
98 When `TRUE`, this member denotes that the leftmost pixel from
99 an 8 bit amount of pixel data consists of the bits starting
100 with the most significant bit. When `FALSE`, it's starting
101 with the least significant bit.<p>
103 Example: for a 1bpp bitmap, each pixel is represented by
104 exactly one bit. If this member is `TRUE`, the first pixel is
105 the MSB of the first byte, and the eighth pixel is the LSB of
106 the first byte. If this member is `FALSE`, it's just the
107 opposite.
109 boolean IsMsbFirst;
113 }; }; }; };
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */