elsie
3.3
▾ elsie
▸ boxtree
▸ ext
▾ render
▾ backends
▸ backend
▾ cairo
▸ backend
▸ draw
▸ rcontext
▸ shapes
▸ svg
▾ text
▸ utils
▸ rcontext
▸ svg
▸ image
▸ inkscape
▸ jupyter
▸ ora
▸ pdfmerge
▸ render
▸ shapes
▸ slides
▸ text
▸ utils
▸ version
Module text
elsie
.
render
.
backends
.
cairo
.
text
source
link
Functions
▷
def
attr_from_scale
(
scale_factor: float, start_index: int, end_index: int
)
source
link
▶
def
build_layout
(
ctx: cairo.Context, pctx: pangocffi.Context, parsed_text, ...
) -> pangocffi.Layout
def
build_layout(
ctx: cairo.Context,
pctx: pangocffi.Context,
parsed_text,
style: TextStyle,
styles,
resolution_scale: float,
spacing_scale: float =
1.0
,
text_scale: float =
1.0
,
) -> pangocffi.Layout
source
link
Reexports
Imported in
elsie.render.backends.cairo.rcontext
.
▷
def
byte_length
(
text
)
source
link
▶
def
compute_subtext_extents
(
layout: Layout, parsed_text, id_index: int
) -> Tuple[float, float]
Returns the x coordinate and width of a subtext of a single line.
source
link
Reexports
Imported in
elsie.render.backends.cairo.rcontext
.
▷
def
from_pango_rect
(
rect: Rectangle
) -> Rect
source
link
▶
def
from_pango_units
(
size: int
) -> float
source
link
Reexports
Imported in
elsie.render.backends.cairo.rcontext
.
▷
def
get_byte_range
(
parsed_text, id_index
) -> Tuple[int, int]
source
link
▶
def
get_extents
(
layout: pangocffi.Layout, ink=True
) -> Rect
source
link
Reexports
Imported in
elsie.render.backends.cairo.rcontext
.
▷
def
get_pango_alignment
(
style: TextStyle
)
source
link
▷
def
get_text_and_attributes
(
parsed_text, style: TextStyle, styles, text_scale: float
) -> Tuple[str, AttrList]
source
link
▷
def
get_text_height
(
pctx: pangocffi.Context, style: TextStyle, resolution_scale: float
)
source
link
▶
def
style_to_attributes
(
style: TextStyle, text_scale: float, start_index: int, ...
) -> List[Attribute]
def
style_to_attributes(
style: TextStyle,
text_scale: float,
start_index: int,
end_index: int,
) -> List[Attribute]
source
link
▷
def
to_pango_color
(
color: Tuple[float, float, float]
) -> Tuple[int, int, int]
source
link
▶
def
to_pango_units
(
size: float
) -> int
source
link
Reexports
Imported in
elsie.render.backends.cairo.rcontext
.
Generated by
nedoc
v0.10 at 2022-02-05 18:22