~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/display/nr-arena-glyphs.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __NR_ARENA_GLYPHS_H__
 
2
#define __NR_ARENA_GLYPHS_H__
 
3
 
 
4
/*
 
5
 * RGBA display list system for inkscape
 
6
 *
 
7
 * Author:
 
8
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
9
 *
 
10
 * Copyright (C) 2002 Lauris Kaplinski
 
11
 *
 
12
 * Released under GNU GPL
 
13
 *
 
14
 */
 
15
 
 
16
#define NR_TYPE_ARENA_GLYPHS (nr_arena_glyphs_get_type ())
 
17
#define NR_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS, NRArenaGlyphs))
 
18
#define NR_IS_ARENA_GLYPHS(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS))
 
19
 
 
20
#include <libnrtype/nrtype-forward.h>
 
21
 
 
22
#include <display/display-forward.h>
 
23
#include <forward.h>
 
24
#include <sp-paint-server.h>
 
25
#include <display/nr-arena-item.h>
 
26
 
 
27
#define test_glyph_liv
 
28
 
 
29
class Shape;
 
30
 
 
31
NRType nr_arena_glyphs_get_type (void);
 
32
 
 
33
struct NRArenaGlyphs : public NRArenaItem {
 
34
        /* Glyphs data */
 
35
        SPStyle *style;
 
36
        Geom::Matrix g_transform;
 
37
        font_instance *font;
 
38
        gint glyph;
 
39
 
 
40
        raster_font *rfont;
 
41
        raster_font *sfont;
 
42
        float x, y;
 
43
 
 
44
//      Geom::Matrix cached_tr;
 
45
//      Shape  *cached_shp;
 
46
//      bool   cached_shp_dirty;
 
47
//      bool   cached_style_dirty;
 
48
        
 
49
//      Shape  *stroke_shp;
 
50
 
 
51
        static NRArenaGlyphs *create(NRArena *arena) {
 
52
                NRArenaGlyphs *obj=reinterpret_cast<NRArenaGlyphs *>(nr_object_new(NR_TYPE_ARENA_GLYPHS));
 
53
                obj->init(arena);
 
54
                return obj;
 
55
        }
 
56
};
 
57
 
 
58
struct NRArenaGlyphsClass {
 
59
        NRArenaItemClass parent_class;
 
60
};
 
61
 
 
62
void nr_arena_glyphs_set_path ( NRArenaGlyphs *glyphs,
 
63
                                SPCurve *curve, unsigned int lieutenant,
 
64
                                font_instance *font, int glyph,
 
65
                                Geom::Matrix const *transform   );
 
66
void nr_arena_glyphs_set_style (NRArenaGlyphs *glyphs, SPStyle *style);
 
67
 
 
68
/* Integrated group of component glyphss */
 
69
 
 
70
typedef struct NRArenaGlyphsGroup NRArenaGlyphsGroup;
 
71
typedef struct NRArenaGlyphsGroupClass NRArenaGlyphsGroupClass;
 
72
 
 
73
#include "nr-arena-group.h"
 
74
 
 
75
#define NR_TYPE_ARENA_GLYPHS_GROUP (nr_arena_glyphs_group_get_type ())
 
76
#define NR_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_GLYPHS_GROUP, NRArenaGlyphsGroup))
 
77
#define NR_IS_ARENA_GLYPHS_GROUP(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_GLYPHS_GROUP))
 
78
 
 
79
NRType nr_arena_glyphs_group_get_type (void);
 
80
 
 
81
struct NRArenaGlyphsGroup : public NRArenaGroup {
 
82
  //SPStyle *style;
 
83
        NRRect paintbox;
 
84
        /* State data */
 
85
        SPPainter *fill_painter;
 
86
        SPPainter *stroke_painter;
 
87
 
 
88
        static NRArenaGlyphsGroup *create(NRArena *arena) {
 
89
                NRArenaGlyphsGroup *obj=reinterpret_cast<NRArenaGlyphsGroup *>(nr_object_new(NR_TYPE_ARENA_GLYPHS_GROUP));
 
90
                obj->init(arena);
 
91
                return obj;
 
92
        }
 
93
};
 
94
 
 
95
struct NRArenaGlyphsGroupClass {
 
96
        NRArenaGroupClass parent_class;
 
97
};
 
98
 
 
99
/* Utility functions */
 
100
 
 
101
void nr_arena_glyphs_group_clear (NRArenaGlyphsGroup *group);
 
102
 
 
103
void nr_arena_glyphs_group_add_component (NRArenaGlyphsGroup *group, font_instance *font, int glyph, Geom::Matrix const &transform);
 
104
 
 
105
void nr_arena_glyphs_group_set_style (NRArenaGlyphsGroup *group, SPStyle *style);
 
106
 
 
107
void nr_arena_glyphs_group_set_paintbox (NRArenaGlyphsGroup *group, const NRRect *pbox);
 
108
 
 
109
#endif