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

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/libnrtype/raster-position.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 SEEN_LIBNRTYPE_RASTER_POSITION_H
 
2
#define SEEN_LIBNRTYPE_RASTER_POSITION_H
 
3
 
 
4
#include <vector>
 
5
 
 
6
#include <libnr/nr-forward.h>
 
7
#include <libnrtype/nrtype-forward.h>
 
8
#include <livarot/livarot-forward.h>
 
9
 
 
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 {
 
17
public:
 
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
 
21
    int               nbRun;
 
22
    float_ligne_run*  runs;
 
23
 
 
24
public:
 
25
    raster_position();
 
26
    virtual ~raster_position();
 
27
 
 
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);
 
32
};
 
33
 
 
34
 
 
35
#endif /* !SEEN_LIBNRTYPE_RASTER_POSITION_H */
 
36
 
 
37
/*
 
38
  Local Variables:
 
39
  mode:c++
 
40
  c-file-style:"stroustrup"
 
41
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
42
  indent-tabs-mode:nil
 
43
  fill-column:99
 
44
  End:
 
45
*/
 
46
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :