1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_VCL_SOURCE_FILTER_SGFBRAM_HXX
21 #define INCLUDED_VCL_SOURCE_FILTER_SGFBRAM_HXX
23 #define SgfBitImag0 1 /* Bitmap */
24 #define SgfBitImag1 4 /* Bitmap */
25 #define SgfBitImag2 5 /* Bitmap */
26 #define SgfBitImgMo 6 /* Monochrome bitmap */
27 #define SgfSimpVect 2 /* Simple vectorformat */
28 #define SgfPostScrp 3 /* Postscript file */
29 #define SgfStarDraw 7 /* StarDraw SGV-file */
31 // constants for SgfHeader.SwGrCol
32 #define SgfVectFarb 4 /* use colours in lines */
33 #define SgfVectGray 5 /* use greyscale for lines only for */
34 #define SgfVectWdth 6 /* use line widths for lines SimpVector */
36 #define SgfHeaderSize 42
47 sal_uInt16 Planes
; // Layer
51 sal_uInt16 OfsLo
,OfsHi
; // DWord allignment is necessary (38 mod 4 =2) !
53 sal_uInt32
GetOffset();
54 friend SvStream
& ReadSgfHeader(SvStream
& rIStream
, SgfHeader
& rHead
);
59 #define SgfEntrySize 22
65 sal_uInt16 lFreiLo
,lFreiHi
;
67 sal_uInt16 OfsLo
,OfsHi
; // DWord allignment is necessary (18 mod 4 =2) !
69 sal_uInt32
GetOffset();
70 friend SvStream
& ReadSgfEntry(SvStream
& rIStream
, SgfEntry
& rEntr
);
74 #define SgfVectorSize 10
81 sal_uInt16 OfsLo
,OfsHi
; // DWord allignment is necessary (6 mod 4 =2) !
83 friend SvStream
& ReadSgfVector(SvStream
& rIStream
, SgfVector
& rEntr
);
86 extern long SgfVectXofs
;
87 extern long SgfVectYofs
;
88 extern long SgfVectXmul
;
89 extern long SgfVectYmul
;
90 extern long SgfVectXdiv
;
91 extern long SgfVectYdiv
;
92 extern bool SgfVectScal
;
94 #define BmpFileHeaderSize 14
98 sal_uInt16 Typ
; // = "BM"
99 sal_uInt16 SizeLo
,SizeHi
; // filesize in bytes
100 sal_uInt16 Reserve1
; // reserved
101 sal_uInt16 Reserve2
; // reserved
102 sal_uInt16 OfsLo
,OfsHi
; // Offset?
104 void SetSize(sal_uInt32 Size
);
105 void SetOfs(sal_uInt32 Size
);
107 friend SvStream
& WriteBmpFileHeader(SvStream
& rOStream
, BmpFileHeader
& rHead
);
110 #define BmpInfoHeaderSize 40
114 sal_uInt32 Size
; // size of BmpInfoHeaders
115 sal_Int32 Width
; // width in Pixel
116 sal_Int32 Hight
; // height in Pixel
117 sal_uInt16 Planes
; // number of planes (always 1)
118 sal_uInt16 PixBits
; // number of bits per pixel (1,4,8 or 24)
119 sal_uInt32 Compress
; // datakompression
120 sal_uInt32 ImgSize
; // size of image in bytes. Without compression also 0 is allowed.
121 sal_Int32 xDpmm
; // Dot per Meter (0 is allowed)
122 sal_Int32 yDpmm
; // Dot per Meter (0 is allowed)
123 sal_uInt32 ColUsed
; // number of colours used (0=all
124 sal_uInt32 ColMust
; // number of important colours (0=all)
126 friend SvStream
& WriteBmpInfoHeader(SvStream
& rOStream
, BmpInfoHeader
& rHead
);
129 #define RGBQuadSize 4
137 RGBQuad(sal_uInt8 R
, sal_uInt8 G
, sal_uInt8 B
) { Red
=R
; Grn
=G
; Blu
=B
; Fil
=0; }
140 #endif // INCLUDED_VCL_SOURCE_FILTER_SGFBRAM_HXX
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */