Module ggez::graphics
[−]
[src]
The graphics
module performs the actual drawing of images, text, and other
objects with the Drawable
trait. It also handles basic loading of images
and text.
This module also manages graphics state, coordinate systems, etc. The default coordinate system has the origin in the upper-left corner of the screen.
Structs
GraphicsContext |
A structure that contains graphics state. For instance, background and foreground colors. |
Image |
In-memory image data available to be drawn on the screen. |
Point |
Immutable point type, consisting of x and y. |
Rect |
A rectangle. |
Text |
Drawable text created from a |
Enums
BlendMode | |
Color | |
DrawMode |
Specifies whether a shape should be drawn filled or as an outline. |
Font |
A font that defines the shape of characters drawn on the screen. Can be created from a .ttf file or from an image (bitmap fonts). |
Traits
Drawable |
All types that can be drawn on the screen implement the |
Functions
clear |
Clear the screen to the background color. |
draw |
Draws the given |
draw_ex |
Draws the given |
line |
Draws a line. Currently lines are 1 pixel wide and generally ugly. |
lines |
Draws a series of connected lines. |
point |
Draws a 1-pixel point. |
points |
Draws a set of points. |
present |
Tells the graphics system to actually put everything on the screen.
Call this at the end of your |
Not implemented since we don't have anything resembling a default font. |
|
printf |
Not implemented since we don't have anything resembling a default font. |
rectangle |
Draws a rectangle. |
rectangles |
Draws many rectangles. Not part of the LOVE API but no reason not to include it. |
set_background_color |
Sets the background color. Default: blue. |
set_color |
Sets the foreground color, which will be used for drawing rectangles, lines, etc. Default: white. |