1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: sgfbram.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <tools/solar.h>
36 #define SgfBitImag0 1 /* Bitmap */
37 #define SgfBitImag1 4 /* Bitmap */
38 #define SgfBitImag2 5 /* Bitmap */
39 #define SgfBitImgMo 6 /* Monochrome Bitmap */
40 #define SgfSimpVect 2 /* Einfaches Vectorformat */
41 #define SgfPostScrp 3 /* Postscript file */
42 #define SgfStarDraw 7 /* StarDraw SGV-Datei */
43 #define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */
45 // Konstanten f�r SgfHeader.SwGrCol
46 #define SgfBlckWhit 1 /* Schwarz/Weiá Bild Ä¿ SimpVector, */
47 #define SgfGrayscal 2 /* Bild mit Graustufen ³ StarDraw und */
48 #define Sgf16Colors 3 /* Farbbild (16 Farben) ÄÙ Bit Image */
49 #define SgfVectFarb 4 /* Farben f�r Linien verwenden Ä¿ */
50 #define SgfVectGray 5 /* Graustufen f�r Linien verwenden ³ Nur f�r */
51 #define SgfVectWdth 6 /* Strichst„rken f�r Linien verwenden ÄÙ SimpVector */
54 #define SgfHeaderSize 42
65 UINT16 Planes
; // Layer
69 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (38 mod 4 =2) !
72 friend SvStream
& operator>>(SvStream
& rIStream
, SgfHeader
& rHead
);
76 #define SgfEntrySize 22
82 UINT16 lFreiLo
,lFreiHi
;
84 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (18 mod 4 =2) !
87 friend SvStream
& operator>>(SvStream
& rIStream
, SgfEntry
& rEntr
);
90 #define SgfVectorSize 10
97 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (6 mod 4 =2) !
99 friend SvStream
& operator>>(SvStream
& rIStream
, SgfVector
& rEntr
);
102 extern long SgfVectXofs
;
103 extern long SgfVectYofs
;
104 extern long SgfVectXmul
;
105 extern long SgfVectYmul
;
106 extern long SgfVectXdiv
;
107 extern long SgfVectYdiv
;
108 extern BOOL SgfVectScal
;
110 ////////////////////////////////////////////////////////////////////////////////////////////////////
111 // Windows BMP /////////////////////////////////////////////////////////////////////////////////////
112 ////////////////////////////////////////////////////////////////////////////////////////////////////
114 #define BmpFileHeaderSize 14
118 UINT16 Typ
; // = "BM"
119 UINT16 SizeLo
,SizeHi
; // Filesize in Bytes
120 UINT16 Reserve1
; // Reserviert
121 UINT16 Reserve2
; // Reserviert
122 UINT16 OfsLo
,OfsHi
; // Offset?
124 void SetSize(UINT32 Size
);
125 void SetOfs(UINT32 Size
);
127 friend SvStream
& operator<<(SvStream
& rOStream
, BmpFileHeader
& rHead
);
130 #define BmpInfoHeaderSize 40
134 UINT32 Size
; // GrӇe des BmpInfoHeaders
135 INT32 Width
; // Breite in Pixel
136 INT32 Hight
; // H”he in Pixel
137 UINT16 Planes
; // Anzahl der Planes (immer 1)
138 UINT16 PixBits
; // Anzahl der Bit je Pixel (1,4,8,oder 24)
139 UINT32 Compress
; // Datenkompression
140 UINT32 ImgSize
; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
141 INT32 xDpmm
; // Dot per Meter (0 ist erlaubt)
142 INT32 yDpmm
; // Dot per Meter (0 ist erlaubt)
143 UINT32 ColUsed
; // Anzahl der verwendeten Farben (0=alle)
144 UINT32 ColMust
; // Anzahl der wichtigen Farben (0=alle)
146 friend SvStream
& operator<<(SvStream
& rOStream
, BmpInfoHeader
& rHead
);
149 #define RGBQuadSize 4
157 RGBQuad(BYTE R
, BYTE G
, BYTE B
) { Red
=R
; Grn
=G
; Blu
=B
; Fil
=0; }
160 #endif //_SGFBRAM_HXX