1Libnetpbm PPM Drawing FunctiLoinbrMaarnyuaFlu(n3cL)tiibonnestpMbamnuPaPlM Drawing Function Manual(3)
2
3
4
5       Table Of Contents ⟨#toc⟩
6

NAME

8       libnetpbm_draw \- Libnetpbm PPM Drawing Function Manual
9

DESCRIPTION

11       This  reference  manual  covers  functions in the libnetpbm library for
12       drawing images, using the PPM image format and the libnetpbm  in-memory
13       image formats.
14
15       We  actually have very little information here; this is mainly a frame‐
16       work for adding documentation later if someone  becomes  interested  in
17       this facility.
18
19
20

The Functions

22       The functions are all declared in the ppmdraw.h header file.
23
24
25   ppmd_point_drawproc
26   ppmd_setlinetype
27   ppmd_setlineclip
28   ppmd_line
29   ppmd_spline3
30   ppmd_polyspline
31   ppmd_circle
32   ppmd_filledrectangle
33   ppmd_fill_drawproc
34   ppmd_fill
35   ppmd_text
36   ppmd_text_box

Fonts

38       The  ppmd_text  and ppmd_text_box functions use fonts.  You control the
39       fonts using functions described in this section.   There  is  one  font
40       that  comes with Netpbm, called 'standard'.  It is built into the func‐
41       tion library and is the default font.  You can create additional  fonts
42       and use them instead.
43
44       In  a  program that uses Netpbm drawing facilities, there is a 'current
45       font.' all drawing of text uses the current  font.   When  the  program
46       starts, the current font is 'standard'; you can change it after that by
47       calling the ppmd_set_font function.
48
49       Other than a built-in font, a font lives in file in a format special to
50       Netpbm  called  Ppmdfont.   The  file typically has a name that ends in
51       '.ppmdfont'.
52
53       Use the ppmddumpfont program to dump the contents of a Ppmdfont file in
54       human readable format.
55
56       Use  the  ppmdmkfont program to generate the 'standard' font as a Ppmd‐
57       font file.  You don't normally need to do this, becuase  'standard'  is
58       built into libnetpbm.
59
60       Use  the ppmdcfont program to turn a Ppmdfont file into a C source file
61       that you can compile into a program as  a  built-in  font.   Though  we
62       don't give full instructions here on how to do that, libnetpbm's built-
63       in 'standard' font is a good example.  In Netpbm source code, you  will
64       find the C source file standardppmdfont.c, which was generated from the
65       file standard.ppmdfont by ppmdcfont.  You simply use a pointer  to  the
66       structure  that  the C file defines as a font handle, just like one you
67       would get from ppmd_read_font.
68
69
70

Font File Format

72       The font file starts with the characters 'ppmdfont' (without the quota‐
73       tion marks) in ASCII.
74
75       The  rest  of  the  format  is  not  yet  documented,  but it generally
76       describes, for each code point, a sequence of  straight  line  plotting
77       commands  to  form the glyph for the indicated character.  I.e. it is a
78       vector, not raster, font.
79
80
81

Font Control Functions

83       These functions are declared in the header file ppmdfont.h.
84
85
86   ppmd_read_font
87       This function associates a Ppmdfont file, which you identify by  naming
88       the  Ppmdfont file, with a handle that you can use to identify the font
89       to other functions.  Technically, this function  reads  the  font  into
90       memory.
91
92
93   ppmd_free_font
94       This function releases the handle that you get from ppmd_read_font.  It
95       frees resources associated with it; you  can't  use  the  handle  after
96       this.
97
98
99   ppmd_get_font
100       This function returns the handle of the currently selected font.
101
102
103   ppmd_set_font
104       This  function sets the currently selected font.  You identify the font
105       to which to set it with a handle such as you get from ppmd_read_font or
106       ppmd_get_font.
107
108
109
110netpbm documentation            SeptembLeirbn2e0t0p5bm PPM Drawing Function Manual(3)
Impressum