Module pix_engine::state::settings
source · Expand description
Settings methods for the Engine
.
Methods for reading and setting various engine configuration values.
Provided types:
DrawMode
: Determines how(x, y)
coordinates are used for rendering.RectMode
: Alias forDrawMode
.EllipseMode
: Alias forDrawMode
.ImageMode
: Alias forDrawMode
.ArcMode
: Determines how arcs are rendered.BlendMode
: Determines how images and textures are blended.AngleMode
: Determines how angles are interpreted.FontStyle
: Determines how text is rendered.
Provided PixState
methods:
PixState::background
: Sets the Color used byPixState::clear
to clear the canvas.PixState::fill
: Sets the Color used to fill shapes.PixState::stroke
: Sets the Color used to stroke shapes and text.PixState::stroke_weight
: Sets the stroke line thickness for lines and text.PixState::text_shadow
: Sets the shadow distance for drawing text.PixState::smooth
: Enables the anti-alias smoothing option for drawing shapes.PixState::bezier_detail
: Set the resolution at which Bezier curves are dispalyed.PixState::wrap
: Sets the wrap width for rendering text.PixState::clip
: Sets a clip rectangle for rendering.PixState::fullscreen
: Sets fullscreen mode to enabled or disabled.PixState::toggle_fullscreen
: Toggles fullscreen.PixState::vsync
: Sets vertical sync mode to enabled or disabled.PixState::toggle_vsync
: Toggles vertical sync.PixState::cursor
: Set a custom window cursor or hide the cursor.PixState::disable
: Disable UI elements from being interactive.PixState::running
: Whether the render loop is running (callingPixEngine::on_update
).PixState::run
: Enable or disable the render loop.PixState::show_frame_rate
: Display the average frame rate in the title bar.PixState::target_frame_rate
: Return the current targeted frame rate.PixState::frame_rate
: Set or clear a targeted frame rate.PixState::scale
: Set the rendering scale of the current canvas.PixState::rect_mode
: Change theRectMode
for rendering rectangles.PixState::ellipse_mode
: Change theEllipseMode
for rendering ellipses.PixState::image_mode
: Change theImageMode
for rendering images.PixState::image_tint
: Set or clear a Color used to tint Images.PixState::arc_mode
: Change theArcMode
for rendering arcs.PixState::angle_mode
: Change theAngleMode
for angle interpretation.PixState::blend_mode
: Change theBlendMode
for rendering images and textures.PixState::push
: Push a copy of all the current settings to a stack.PixState::pop
: Pop the previously pushed settings off the stack, restoring them.
Structs
- Font style for drawing text.
Enums
- Determines how angles are interpreted.
- Drawing mode which determines how arcs are drawn.
- Drawing mode which determines how textures are blended together.
- Drawing mode which changes how
(x, y)
coordinates are interpreted.