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 ************************************************************************/
35 #include <tools/solar.h>
41 #define SgfBitImag0 1 /* Bitmap */
42 #define SgfBitImag1 4 /* Bitmap */
43 #define SgfBitImag2 5 /* Bitmap */
44 #define SgfBitImgMo 6 /* Monochrome Bitmap */
45 #define SgfSimpVect 2 /* Einfaches Vectorformat */
46 #define SgfPostScrp 3 /* Postscript file */
47 #define SgfStarDraw 7 /* StarDraw SGV-Datei */
48 #define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */
50 // Konstanten f�r SgfHeader.SwGrCol
51 #define SgfBlckWhit 1 /* Schwarz/Weiá Bild Ä¿ SimpVector, */
52 #define SgfGrayscal 2 /* Bild mit Graustufen ³ StarDraw und */
53 #define Sgf16Colors 3 /* Farbbild (16 Farben) ÄÙ Bit Image */
54 #define SgfVectFarb 4 /* Farben f�r Linien verwenden Ä¿ */
55 #define SgfVectGray 5 /* Graustufen f�r Linien verwenden ³ Nur f�r */
56 #define SgfVectWdth 6 /* Strichst„rken f�r Linien verwenden ÄÙ SimpVector */
59 #define SgfHeaderSize 42
70 UINT16 Planes
; // Layer
74 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (38 mod 4 =2) !
77 friend SvStream
& operator>>(SvStream
& rIStream
, SgfHeader
& rHead
);
81 #define SgfEntrySize 22
87 UINT16 lFreiLo
,lFreiHi
;
89 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (18 mod 4 =2) !
92 friend SvStream
& operator>>(SvStream
& rIStream
, SgfEntry
& rEntr
);
95 #define SgfVectorSize 10
102 UINT16 OfsLo
,OfsHi
; // DWord-Allignment ist notwendig (6 mod 4 =2) !
104 friend SvStream
& operator>>(SvStream
& rIStream
, SgfVector
& rEntr
);
107 extern long SgfVectXofs
;
108 extern long SgfVectYofs
;
109 extern long SgfVectXmul
;
110 extern long SgfVectYmul
;
111 extern long SgfVectXdiv
;
112 extern long SgfVectYdiv
;
113 extern BOOL SgfVectScal
;
115 ////////////////////////////////////////////////////////////////////////////////////////////////////
116 // Windows BMP /////////////////////////////////////////////////////////////////////////////////////
117 ////////////////////////////////////////////////////////////////////////////////////////////////////
119 #define BmpFileHeaderSize 14
123 UINT16 Typ
; // = "BM"
124 UINT16 SizeLo
,SizeHi
; // Filesize in Bytes
125 UINT16 Reserve1
; // Reserviert
126 UINT16 Reserve2
; // Reserviert
127 UINT16 OfsLo
,OfsHi
; // Offset?
129 void SetSize(UINT32 Size
);
130 void SetOfs(UINT32 Size
);
132 friend SvStream
& operator<<(SvStream
& rOStream
, BmpFileHeader
& rHead
);
135 #define BmpInfoHeaderSize 40
139 UINT32 Size
; // GrӇe des BmpInfoHeaders
140 INT32 Width
; // Breite in Pixel
141 INT32 Hight
; // H”he in Pixel
142 UINT16 Planes
; // Anzahl der Planes (immer 1)
143 UINT16 PixBits
; // Anzahl der Bit je Pixel (1,4,8,oder 24)
144 UINT32 Compress
; // Datenkompression
145 UINT32 ImgSize
; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
146 INT32 xDpmm
; // Dot per Meter (0 ist erlaubt)
147 INT32 yDpmm
; // Dot per Meter (0 ist erlaubt)
148 UINT32 ColUsed
; // Anzahl der verwendeten Farben (0=alle)
149 UINT32 ColMust
; // Anzahl der wichtigen Farben (0=alle)
151 friend SvStream
& operator<<(SvStream
& rOStream
, BmpInfoHeader
& rHead
);
154 #define RGBQuadSize 4
162 RGBQuad(BYTE R
, BYTE G
, BYTE B
) { Red
=R
; Grn
=G
; Blu
=B
; Fil
=0; }
168 #endif //_SGFBRAM_HXX