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