1
#ifndef SEEN_LIBNRTYPE_RASTER_POSITION_H
2
#define SEEN_LIBNRTYPE_RASTER_POSITION_H
6
#include <libnr/nr-forward.h>
7
#include <libnrtype/nrtype-forward.h>
8
#include <livarot/livarot-forward.h>
10
// one subpixel position
11
// it's basically a set of trapezoids (=float_ligne_run) representing the black areas of the glyph
12
// all trapezoids are in the same array, hence the run_on_line array to give the number of
13
// trapezoids on each line
14
// trapezoids store the x-positions as float, and are shifted to the x blit position
15
// so it's "exact" in the x direction and subpixel in the y direction
16
class raster_position {
18
int top, bottom; // baseline is y=0
19
// top is the first pixel, bottom is the last
20
int* run_on_line; // array of size (bottom-top+1): run_on_line[i] gives the number of runs on line top+i
22
float_ligne_run* runs;
26
virtual ~raster_position();
28
// stuff runs into the structure
29
void AppendRuns(std::vector<float_ligne_run> const &r, int y);
30
// blits the trapezoids.
31
void Blit(float ph, int pv, NRPixBlock &over);
35
#endif /* !SEEN_LIBNRTYPE_RASTER_POSITION_H */
40
c-file-style:"stroustrup"
41
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :