Logo Search packages:      
Sourcecode: inkscape version File versions

void Inkscape::Text::Layout::appendControlCode ( TextControlCode  code,
void *  source_cookie,
double  width = 0.0,
double  ascent = 0.0,
double  descent = 0.0 

Control codes are metadata in the text stream to signify items that occupy real space (unlike style changes) but don't belong in the text string. See TextControlCode for the types available.

A control code cannot be the first item in the input stream. Use appendText() with an empty string to set up the paragraph properties.

code A member of the TextFlowControlCode enumeration.
width The width in pixels that this item occupies.
ascent The number of pixels above the text baseline that this control code occupies.
descent The number of pixels below the text baseline that this control code occupies.
source_cookie This pointer is treated as opaque by Layout but will be passed through the flowing process intact so that callers can use it to refer to the original object that generated a particular area. See Layout::iterator. Implementation detail: currently all callers put an SPObject in here. Note that for some control codes (eg tab) the values of the width, ascender and descender are implied by the surrounding text (and in the case of tabs, the values set in tab_stops) so the values you pass here are ignored.

Definition at line 75 of file Layout-TNG-Input.cpp.

References _input_stream, Inkscape::Text::Layout::InputStreamControlCode::ascent, Inkscape::Text::Layout::InputStreamControlCode::code, Inkscape::Text::Layout::InputStreamControlCode::descent, and Inkscape::Text::Layout::InputStreamControlCode::width.

    InputStreamControlCode *new_code = new InputStreamControlCode;

    new_code->source_cookie = source_cookie;
    new_code->code = code;
    new_code->width = width;
    new_code->ascent = ascent;
    new_code->descent = descent;

Generated by  Doxygen 1.6.0   Back to index