Module graphics

Source
Expand description

This module contains the graphics-related types and functions such as:

  • Color
  • Point
  • Rect
  • Size
  • Surface

Re-exports§

pub use self::image::Image;
pub use self::image::*;

Modules§

image
Image handling and rendering module for AppCUI.

Structs§

CharAttribute
Represents attributes of a character such as foreground color, background color, and flags.
CharFlags
Character
Represents a character with its attributes, including foreground and background colors, and flags. The Character struct is used to define a character that can be displayed on the screen.
Point
This module defines a Point struct 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.
TextFormat
A structure that contains information about how a text should be displayed on the screen.
TextFormatBuilder
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.
LineType
LineType is an enum that represents the type of line to be drawn (single, double, thick, etc)
RectAlignment
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.
SpecialChar
A special character set used for drawing boxes, arrows, and other graphical elements in a terminal or console application.
TextAlignment
Represents the alignment of the text. It can be Left, Center or Right.
WrapType
Represents the wrap type of the text. It can be WordWrap, CharacterWrap, MultiLine, SingleLine or SingleLineWrap.