1 #ifndef __GST_TEXT_RENDER_H__
2 #define __GST_TEXT_RENDER_H__
5 #include <pango/pangocairo.h>
9 #define GST_TYPE_TEXT_RENDER (gst_text_render_get_type())
10 #define GST_TEXT_RENDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
11 GST_TYPE_TEXT_RENDER, GstTextRender))
12 #define GST_TEXT_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
13 GST_TYPE_TEXT_RENDER, GstTextRenderClass))
14 #define GST_TEXT_RENDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
15 GST_TYPE_TEXT_RENDER, GstTextRenderClass))
16 #define GST_IS_TEXT_RENDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
17 GST_TYPE_TEXT_RENDER))
18 #define GST_IS_TEXT_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
19 GST_TYPE_TEXT_RENDER))
21 typedef struct _GstTextRender GstTextRender;
22 typedef struct _GstTextRenderClass GstTextRenderClass;
25 * GstTextRenderVAlign:
26 * @GST_TEXT_RENDER_VALIGN_BASELINE: draw text on the baseline
27 * @GST_TEXT_RENDER_VALIGN_BOTTOM: draw text on the bottom
28 * @GST_TEXT_RENDER_VALIGN_TOP: draw test on top
30 * Vertical alignment of the text.
33 GST_TEXT_RENDER_VALIGN_BASELINE,
34 GST_TEXT_RENDER_VALIGN_BOTTOM,
35 GST_TEXT_RENDER_VALIGN_TOP
36 } GstTextRenderVAlign;
39 * GstTextRenderHAlign:
40 * @GST_TEXT_RENDER_HALIGN_LEFT: align text left
41 * @GST_TEXT_RENDER_HALIGN_CENTER: align text center
42 * @GST_TEXT_RENDER_HALIGN_RIGHT: align text right
44 * Horizontal alignment of the text.
47 GST_TEXT_RENDER_HALIGN_LEFT,
48 GST_TEXT_RENDER_HALIGN_CENTER,
49 GST_TEXT_RENDER_HALIGN_RIGHT
50 } GstTextRenderHAlign;
53 * GstTextRenderLineAlign:
54 * @GST_TEXT_RENDER_LINE_ALIGN_LEFT: lines are left-aligned
55 * @GST_TEXT_RENDER_LINE_ALIGN_CENTER: lines are center-aligned
56 * @GST_TEXT_RENDER_LINE_ALIGN_RIGHT: lines are right-aligned
58 * Alignment of text lines relative to each other
61 GST_TEXT_RENDER_LINE_ALIGN_LEFT = PANGO_ALIGN_LEFT,
62 GST_TEXT_RENDER_LINE_ALIGN_CENTER = PANGO_ALIGN_CENTER,
63 GST_TEXT_RENDER_LINE_ALIGN_RIGHT = PANGO_ALIGN_RIGHT
64 } GstTextRenderLineAlign;
69 * Opaque textrender data structure.
71 struct _GstTextRender {
74 GstPad *sinkpad, *srcpad;
78 gdouble shadow_offset;
79 gdouble outline_offset;
86 GstTextRenderVAlign valign;
87 GstTextRenderHAlign halign;
88 GstTextRenderLineAlign line_align;
94 struct _GstTextRenderClass {
95 GstElementClass parent_class;
97 PangoContext *pango_context;
100 GType gst_text_render_get_type(void) G_GNUC_CONST;
104 #endif /* __GST_TEXT_RENDER_H */