Inkscape
Vector Graphics Editor
|
#include <Layout-TNG-Scanline-Maker.h>
Public Member Functions | |
InfiniteScanlineMaker (double initial_x, double initial_y, Layout::Direction block_progression) | |
~InfiniteScanlineMaker () override | |
std::vector< ScanRun > | makeScanline (Layout::FontMetrics const &line_height) override |
Returns a single infinite run at the current location. | |
void | completeLine () override |
Increments the current y by the current line height. | |
double | yCoordinate () override |
Returns the y coordinate of the top of the scanline that will be returned by the next call to makeScanline(). | |
void | setNewYCoordinate (double new_y) override |
Just changes y. | |
bool | canExtendCurrentScanline (Layout::FontMetrics const &line_height) override |
Always true, but has to save the new height. | |
void | setLineHeight (Layout::FontMetrics const &line_height) override |
Sets current line block height. | |
![]() | |
virtual | ~ScanlineMaker ()=default |
Private Attributes | |
double | _x |
double | _y |
Layout::FontMetrics | _current_line_height |
bool | _negative_block_progression |
private to Layout.
Generates infinite scanlines for when you don't want wrapping
This is a 'fake' scanline maker which will always return infinite results, effectively turning off wrapping. It's a very simple implementation.
It does have the curious property, however, that the input coordinates are 'real' x and y, but the outputs are rotated according to the block_progression.
Definition at line 93 of file Layout-TNG-Scanline-Maker.h.
Inkscape::Text::Layout::InfiniteScanlineMaker::InfiniteScanlineMaker | ( | double | initial_x, |
double | initial_y, | ||
Layout::Direction | block_progression | ||
) |
Definition at line 22 of file Layout-TNG-Scanline-Makers.cpp.
References _current_line_height, _negative_block_progression, _x, _y, Inkscape::Text::Layout::BOTTOM_TO_TOP, Inkscape::Text::Layout::LEFT_TO_RIGHT, Inkscape::Text::Layout::RIGHT_TO_LEFT, and Inkscape::Text::Layout::FontMetrics::setZero().
|
overridedefault |
|
overridevirtual |
Always true, but has to save the new height.
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 67 of file Layout-TNG-Scanline-Makers.cpp.
|
overridevirtual |
Increments the current y by the current line height.
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 53 of file Layout-TNG-Scanline-Makers.cpp.
References Inkscape::Text::Layout::FontMetrics::emSize().
|
overridevirtual |
Returns a single infinite run at the current location.
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 43 of file Layout-TNG-Scanline-Makers.cpp.
References _x.
|
overridevirtual |
Sets current line block height.
Call before completeLine() to correct for actually used line height (in case some chunks with larger font-size rolled back).
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 73 of file Layout-TNG-Scanline-Makers.cpp.
|
overridevirtual |
Just changes y.
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 62 of file Layout-TNG-Scanline-Makers.cpp.
|
inlineoverridevirtual |
Returns the y coordinate of the top of the scanline that will be returned by the next call to makeScanline().
Implements Inkscape::Text::Layout::ScanlineMaker.
Definition at line 105 of file Layout-TNG-Scanline-Maker.h.
References _y.
|
private |
Definition at line 120 of file Layout-TNG-Scanline-Maker.h.
Referenced by InfiniteScanlineMaker().
|
private |
Definition at line 121 of file Layout-TNG-Scanline-Maker.h.
Referenced by InfiniteScanlineMaker().
|
private |
Definition at line 119 of file Layout-TNG-Scanline-Maker.h.
Referenced by InfiniteScanlineMaker().
|
private |
Definition at line 119 of file Layout-TNG-Scanline-Maker.h.
Referenced by InfiniteScanlineMaker(), and yCoordinate().