Module drawing

Source
Expand description

Drawing-related items Functions for drawing in Carnelian Carnelian uses the Render abstraction over Forma and Spinel to put pixels on screen. The items in this module are higher- level drawing primitives.

Structs§

FontFace
Struct containing a font data.
Glyph
GlyphMap
Paint
Struct combining a foreground and background color.
Text
TextGrid
Struct containing text grid details.

Enums§

DisplayRotation
Some Fuchsia device displays are mounted rotated. This value represents The supported rotations and can be used by views to rotate their content to display appropriately when running on the frame buffer.

Functions§

linebreak_text
Break up text into chunks guaranteed to be no wider than max_width when rendered with face at font_size.
load_font
Load a font from the provided path.
measure_text_size
Return the size in pixels for the specified text, face and size.
measure_text_width
Return the width in pixels for the specified text, face and size.
path_for_circle
Create a render path for the specified circle.
path_for_corner_knockouts
Create a path for knocking out the points of a rectangle, giving it a rounded appearance.
path_for_cursor
Create a render path for a fuchsia-style teardrop cursor.
path_for_polygon
Create a render path for the specified polygon.
path_for_rectangle
Create a render path for the specified rectangle.
path_for_rounded_rectangle
Create a render path for the specified rounded rectangle.