summaryrefslogtreecommitdiff
path: root/lib/diaimportrenderer.h
blob: e21e6a439115dc31141aabb4547019f639f8f595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef DIA_IMPORT_RENDERER_H
#define DIA_IMPORT_RENDERER_H

#include "diatypes.h"
#include "diarenderer.h"

G_BEGIN_DECLS

#define DIA_TYPE_IMPORT_RENDERER           (dia_import_renderer_get_type ())
#define DIA_IMPORT_RENDERER(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_IMPORT_RENDERER, DiaImportRenderer))
#define DIA_IMPORT_RENDERER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DIA_TYPE_IMPORT_RENDERER, DiaImportRendererClass))
#define DIA_IS_IMPORT_RENDERER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIA_TYPE_IMPORT_RENDERER))
#define DIA_IMPORT_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIA_TYPE_IMPORT_RENDERER, DiaImportRendererClass))

GType dia_import_renderer_get_type (void) G_GNUC_CONST;

typedef struct _DiaImportRenderer DiaImportRenderer;
typedef struct _DiaImportRendererClass DiaImportRendererClass;

/*!
 * \brief Creation of Dia's standard objects via renderer interface
 *
 * To be used for import plug-ins which want to support a file format with a similar
 * rendering model as Dia internal. Complex rendering models like SVG and PDF are not
 * not in the intended scope.
 *
 * \extends _DiaRenderer
 */
struct _DiaImportRenderer
{
  DiaRenderer parent_instance;

  /*! \protected state variables should not be set directly but with the rendering interface */
  LineStyle   line_style;
  FillStyle   fill_style;
  real        dash_length;

  real        line_width;
  LineCaps    line_caps;
  LineJoin    line_join;

  /*! \private */
  /*! \private pattern set by set_pattern */
  DiaPattern *pattern;
  /*! \private all patterns seen between begin_render and end_render */
  GList      *objects;
};

struct _DiaImportRendererClass
{
  DiaRendererClass parent_class;
};

DiaObject *dia_import_renderer_get_objects (DiaRenderer *renderer);

G_END_DECLS

#endif /* DIA_IMPORT_RENDERER_H */