Drawing m-texts on a window.
Drawing M-texts on a window.
The m17n GUI API provides functions to draw M-texts.
The fonts used for drawing are selected automatically based on the fontset and the properties of a face. A face also specifies the appearance of M-texts, i.e. font size, color, underline, etc.
The drawing format of M-texts can be controlled in a variety of ways, which provides powerful 2-dimensional layout facility.
FIELD DOCUMENTATION:
unsigned MDrawControl::as_image
unsigned MDrawControl::align_head
unsigned MDrawControl::two_dimensional
unsigned MDrawControl::orientation_reversed
unsigned MDrawControl::enable_bidi
unsigned MDrawControl::ignore_formatting_char
unsigned MDrawControl::fixed_width
unsigned MDrawControl::anti_alias
unsigned MDrawControl::disable_overlapping_adjustment
unsigned int MDrawControl::min_line_ascent
unsigned int MDrawControl::min_line_descent
unsigned int MDrawControl::max_line_ascent
unsigned int MDrawControl::max_line_descent
unsigned int MDrawControl::max_line_width
unsigned int MDrawControl::tab_width
void(* MDrawControl::format)(int line, int y, int *indent, int *width)
The indentation specifies how many pixels the first glyph of each line is shifted to the right (if the member <orientation_reversed> is zero) or to the left (otherwise). If the value is negative, each line is shifted to the reverse direction.
The width limit specifies how many pixels each line can occupy on the display. The value 0 means that there is no limit.
LINE and Y are reset to 0 when a line is broken by a newline character, and incremented each time when a long line is broken because of the width limit.
This has an effect only when <two_dimensional> is nonzero.
int(* MDrawControl::line_break)(MText *mt, int pos, int from, int to, int line, int y)
The function must return a character position to break the line.
The function should not modify MT.
The mdraw_default_line_break() function is useful for such a script that uses SPACE as a word separator.
int MDrawControl::with_cursor
int MDrawControl::cursor_pos
int MDrawControl::cursor_width
int MDrawControl::cursor_bidi
int MDrawControl::partial_update
int MDrawControl::disable_caching
MDrawRegion MDrawControl::clip_region
FIELD DOCUMENTATION:
int MDrawMetric::x
int MDrawMetric::y
unsigned int MDrawMetric::width
unsigned int MDrawMetric::height
FIELD DOCUMENTATION:
int MDrawGlyphInfo::from
int MDrawGlyphInfo::to
int MDrawGlyphInfo::line_from
int MDrawGlyphInfo::line_to
int MDrawGlyphInfo::x
int MDrawGlyphInfo::y
MDrawMetric MDrawGlyphInfo::metrics
MFont* MDrawGlyphInfo::font
int MDrawGlyphInfo::prev_from
int MDrawGlyphInfo::next_to
int MDrawGlyphInfo::left_from
int MDrawGlyphInfo::left_to
int MDrawGlyphInfo::right_from
int MDrawGlyphInfo::right_to
int MDrawGlyphInfo::logical_width
FIELD DOCUMENTATION:
int MDrawGlyph::from
int MDrawGlyph::to
int MDrawGlyph::glyph_code
int MDrawGlyph::x_advance
int MDrawGlyph::y_advance
int MDrawGlyph::x_off
int MDrawGlyph::y_off
int MDrawGlyph::lbearing
int MDrawGlyph::rbearing
int MDrawGlyph::ascent
int MDrawGlyph::descent
MFont* MDrawGlyph::font
MSymbol MDrawGlyph::font_type
void* MDrawGlyph::fontp
Window system dependent type for a window. The type MDrawWindow is for a window; a rectangular area that works in several ways like a miniature screen.
What it actually points depends on a window system. A program that uses the m17n-X library must coerce the type Drawable to this type.
Window system dependent type for a region. The type MDrawRegion is for a region; an arbitrary set of pixels on the screen (typically a rectangular area).
What it actually points depends on a window system. A program that uses the m17n-X library must coerce the type Region to this type.
Option of line breaking for drawing text. The variable mdraw_line_break_option specifies line breaking options by logical-or of the members of MTextLineBreakOption. It controls the line breaking algorithm of the function mdraw_default_line_break().
Generated automatically by Doxygen for The m17n Library from the source code.
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.