Code

d8a85a4a11938cfdb227b29a0194638c591e1827
[inkscape.git] / src / libnrtype / raster-glyph.h
1 #ifndef SEEN_LIBNRTYPE_RASTER_GLYPH_H
2 #define SEEN_LIBNRTYPE_RASTER_GLYPH_H
4 #include <libnr/nr-forward.h>
5 #include <libnrtype/nrtype-forward.h>
6 #include <livarot/livarot-forward.h>
8 // a little utility class that holds data to render a styled glyph
9 // ie. it's like a polygon. its function is to wrap the subpixel positionning
10 class raster_glyph {
11 public:
12         // raster_font that created me
13     raster_font*      daddy;
14         // the glyph i am (the style is in daddy)
15     int               glyph_id;
16                 // internal structure: the styled path, and the associated uncrossed polygon
17                 // they could be removed after the raster_position have been computed
18     Path*             outline;  // transformed by the matrix in style (may be factorized, but is small)
19     Shape*            polygon;
20                 // subpixel positions
21                 // nb_sub_pixel is set to 4 when the glyph is created (it's hardcoded)
22     int               nb_sub_pixel;
23     raster_position*  sub_pixel;
25     raster_glyph(void);
26     virtual ~raster_glyph(void);
28                 // utility
29     void      SetSubPixelPositionning(int nb_pos);
30     void      LoadSubPixelPosition(int no);
32                 // the interesting function: blits the glyph onto over
33                 // over should be a mask, ie a NRPixBlock with one 8bit plane
34     void      Blit(NR::Point const &at, NRPixBlock &over); // alpha only
35 };
38 #endif /* !SEEN_LIBNRTYPE_RASTER_GLYPH_H */
40 /*
41   Local Variables:
42   mode:c++
43   c-file-style:"stroustrup"
44   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45   indent-tabs-mode:nil
46   fill-column:99
47   End:
48 */
49 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :