tests: fix HTML-gen sh script (dash compatibility)
[gfxprim.git] / doc / examples.txt
blob0f6566b4c9dbd93a15ac1a0276a1d4d63af39ff9
1 Image loaders examples
2 ----------------------
4 Loads an image and saves it into 'out.png' png image.
6 Example in C
7 ~~~~~~~~~~~~
9 [source,c]
10 ------------------------------------------------------------------
11 include::../demos/c_simple/loaders_example.c[]
12 ------------------------------------------------------------------
14 Example in C utilizing progress callback
15 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 [source,c]
18 ------------------------------------------------------------------
19 include::../demos/c_simple/loaders.c[]
20 ------------------------------------------------------------------
22 Example in C using image meta-data interface
23 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 [source,c]
26 ------------------------------------------------------------------
27 include::../demos/c_simple/meta_data.c[]
28 ------------------------------------------------------------------
30 [source,c]
31 ------------------------------------------------------------------
32 include::../demos/c_simple/meta_data_dump.c[]
33 ------------------------------------------------------------------
35 Example in Python
36 ~~~~~~~~~~~~~~~~~
38 [source,python]
39 ------------------------------------------------------------------
40 include::../demos/py_simple/loaders_example.py[]
41 ------------------------------------------------------------------
43 GFX Examples
44 ------------
46 Drawing Lines
47 ~~~~~~~~~~~~~
49 Example in C
50 ^^^^^^^^^^^^
52 [source,c]
53 ------------------------------------------------------------------
54 include::../demos/c_simple/gfx_koch.c[]
55 ------------------------------------------------------------------
57 Filters
58 -------
60 Symmetry filters (Rotation, Mirroring)
61 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63 Example in C
64 ^^^^^^^^^^^^
66 [source,c]
67 ------------------------------------------------------------------
68 include::../demos/c_simple/filters_symmetry.c[]
69 ------------------------------------------------------------------
71 Example in Python
72 ^^^^^^^^^^^^^^^^^
74 [source,python]
75 ------------------------------------------------------------------
76 include::../demos/py_simple/rotate90.py[]
77 ------------------------------------------------------------------
79 Simple backend example
80 ----------------------
82 Basic backend code example. Initalizes backends, draws a cross and dumps
83 events.
85 Example in C
86 ~~~~~~~~~~~~
88 [source,c]
89 ------------------------------------------------------------------
90 include::../demos/c_simple/backend_example.c[]
91 ------------------------------------------------------------------
93 [source,c]
94 ------------------------------------------------------------------
95 include::../demos/c_simple/showimage.c[]
96 ------------------------------------------------------------------
98 Grabbers
99 --------
101 Simple C source that saves JPEG images from V4L2 device (web camera).
103 [source,c]
104 ------------------------------------------------------------------
105 include::../demos/c_simple/v4l2_grab.c[]
106 ------------------------------------------------------------------
108 Simple C source that shows filters interactively on image stream from a
109 camera.
111 [source,c]
112 ------------------------------------------------------------------
113 include::../demos/c_simple/v4l2_show.c[]
114 ------------------------------------------------------------------
116 GFXprim + PyGTK
117 ---------------
119 [source,python]
120 ------------------------------------------------------------------
121 include::../demos/py_simple/pygtk_example.py[]
122 ------------------------------------------------------------------