Expand description
This module contains the graphics-related types and functions such as:
ColorPointRectSizeSurface
Re-exports§
Modules§
- image
- Image handling and rendering module for AppCUI.
Structs§
- Char
Attribute - Represents attributes of a character such as foreground color, background color, and flags.
- Char
Flags - Character
- Represents a character with its attributes, including foreground and background colors, and flags.
The
Characterstruct is used to define a character that can be displayed on the screen. - Point
- This module defines a
Pointstruct representing a point in 2D space with x and y coordinates. - Rect
- A rectangle defined by its left, top, right, and bottom coordinates. The coordinates are automatically adjusted to ensure that left <= right and top <= bottom.
- Size
- Represents a size (width and height) of a rectangle.
- Surface
- A structure that represents a 2D surface for drawing characters and images. The surface is defined as a matrix (width x height) of characters, where each character is of type Character. The surface has a size, an origin point, a clip area, and a cursor position. The size of the surface is maximum 10000 x 10000 characters.
- Text
Format - A structure that contains information about how a text should be displayed on the screen.
- Text
Format Builder - A builder for the TextFormat struct. This builder allows you to create a TextFormat instance starting from the default values and modify it step by step.
Enums§
- Color
- Represents am enum with varians that can be used to describe the foreground and background colors of a character in a terminal or console application.
- Line
Type - LineType is an enum that represents the type of line to be drawn (single, double, thick, etc)
- Rect
Alignment - RectAlignment enum represents the alignment of a rectangle in a 2D space. It is used to specify how a rectangle or other rectangular objects should be positioned relative to a given point.
- Special
Char - A special character set used for drawing boxes, arrows, and other graphical elements in a terminal or console application.
- Text
Alignment - Represents the alignment of the text. It can be Left, Center or Right.
- Wrap
Type - Represents the wrap type of the text. It can be WordWrap, CharacterWrap, MultiLine, SingleLine or SingleLineWrap.