Module suzy::graphics[][src]

Graphics control the visual appearance of Widgets.

Some widgets will simply contain other widgets (their “children”), but in order to have visuals, widgets need a way to interface with the renderer. The Graphic trait in this module provides this interface.

Because Graphic implementations are tightly coupled with the renderer, there are no actual implementations in this module; Suzy’s “built-in” graphics can be found in the module for the opengl platform

Structs

Color

A type which represents a color with 32 bit floating point components.

DrawContext

This type will get passed to Graphic::draw.

ParseColorError

An error returned from a failed attempt to parse a string as a color.

Enums

DrawPass

At the start of drawing a frame, the pass associated with a context will be set to DrawAll. If, while drawing a frame, a graphic is encountered which is not yet ready to be drawn, it should call DrawContext::graphic_not_ready, which will update the current pass to UpdateContext. In this case, the remaining graphics should do what they need to get ready. If not all graphics have been drawn, a second pass will run, with DrawRemaining. If a graphic had previously been drawn during a DrawAll pass, it should now do nothing.

Traits

DrawParams

A trait for graphical state, with methods to apply changes to that state.

Graphic

A trait which represents a drawable graphic.