~and471/inkscape/ocal-dialog-improvements

« back to all changes in this revision

Viewing changes to src/libnrtype/Layout-TNG-OutIter.cpp

  • Committer: Andrew
  • Date: 2011-12-27 21:04:47 UTC
  • mfrom: (10092.1.704 inkscape)
  • Revision ID: at.higginson@gmail.com-20111227210447-7nngd0yuw0reb8kq
merged with trunk so I can build again...

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include "font-instance.h"
14
14
#include "svg/svg-length.h"
15
15
#include <2geom/transforms.h>
 
16
#include <2geom/line.h>
16
17
#include "style.h"
17
18
 
18
19
namespace Inkscape {
250
251
    }
251
252
}
252
253
 
 
254
Geom::Path Layout::baseline() const
 
255
{
 
256
    iterator pos = this->begin();
 
257
    Geom::Point left_pt = this->characterAnchorPoint(pos);
 
258
    pos.thisEndOfLine();
 
259
    Geom::Point right_pt = this->characterAnchorPoint(pos);
 
260
 
 
261
    if (this->_blockProgression() == LEFT_TO_RIGHT || this->_blockProgression() == RIGHT_TO_LEFT) {
 
262
        left_pt = Geom::Point(left_pt[Geom::Y], left_pt[Geom::X]);
 
263
        right_pt = Geom::Point(right_pt[Geom::Y], right_pt[Geom::X]);
 
264
    }
 
265
 
 
266
    Geom::Path baseline;
 
267
    baseline.start(left_pt);
 
268
    baseline.appendNew<Geom::LineSegment>(right_pt);
 
269
 
 
270
    return baseline;
 
271
}
 
272
 
 
273
 
253
274
Geom::Point Layout::chunkAnchorPoint(iterator const &it) const
254
275
{
255
276
    unsigned chunk_index;