1 /* libwmf ("player/defaults.h"): library for wmf conversion
2 Copyright (C) 2000 - various; see CREDITS, ChangeLog, and sources
3
4 The libwmf Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 The libwmf Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public
15 License along with the libwmf Library; see the file COPYING. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
18
19
20 #ifndef WMFPLAYER_DEFAULTS_H
21 #define WMFPLAYER_DEFAULTS_H
22
SetDefaults(wmfAPI * API,wmfPen * pen,wmfBrush * brush,wmfFont * font)23 static void SetDefaults (wmfAPI* API,wmfPen* pen,wmfBrush* brush,wmfFont* font)
24 { wmfFontData* FD = (wmfFontData*) API->font_data;
25
26 wmfBMP bmp;
27
28 WMF_PEN_SET_COLOR (pen,&wmf_black);
29 WMF_PEN_SET_WIDTH (pen,1);
30 WMF_PEN_SET_HEIGHT (pen,1);
31 WMF_PEN_SET_STYLE (pen,PS_SOLID);
32 WMF_PEN_SET_ENDCAP (pen,PS_ENDCAP_ROUND);
33 WMF_PEN_SET_JOIN (pen,PS_JOIN_ROUND);
34 WMF_PEN_SET_TYPE (pen,PS_COSMETIC);
35
36 bmp.width = 0;
37 bmp.height = 0;
38 bmp.data = 0;
39
40 WMF_BRUSH_SET_COLOR (brush,&wmf_black);
41 WMF_BRUSH_SET_STYLE (brush,BS_NULL);
42 WMF_BRUSH_SET_HATCH (brush,HS_HORIZONTAL);
43 WMF_BRUSH_SET_BITMAP (brush,&bmp);
44
45 WMF_FONT_SET_HEIGHT (font,12);
46 WMF_FONT_SET_WIDTH (font,12);
47 WMF_FONT_SET_ESCAPEMENT (font, 0);
48 WMF_FONT_SET_ORIENTATION (font, 0);
49 WMF_FONT_SET_WEIGHT (font, 0);
50 WMF_FONT_SET_ITALIC (font, 0);
51 WMF_TEXT_SET_UNDERLINE (font, 0);
52 WMF_TEXT_SET_STRIKEOUT (font, 0);
53 WMF_FONT_SET_CHARSET (font, 0);
54 WMF_FONT_SET_OUT (font, 0);
55 WMF_FONT_SET_CLIP (font, 0);
56 WMF_FONT_SET_QUALITY (font, 0);
57 WMF_FONT_SET_PITCH (font, 0);
58 WMF_FONT_SET_NAME (font,wmf_strdup (API,"Times"));
59
60 font->user_data = 0;
61
62 FD->map (API,font);
63 }
64
65 #endif /* ! WMFPLAYER_DEFAULTS_H */
66