Module pix_engine::prelude

source ·
Expand description

Exports most commonly used types, traits, and functions.

Re-exports

pub use super::audio::AudioCallback;
pub use super::audio::AudioDevice;
pub use super::audio::AudioDeviceDriver;
pub use super::audio::AudioFormat;
pub use super::audio::AudioSpec;
pub use super::audio::AudioSpecDesired;
pub use super::audio::AudioStatus;
pub use super::color::Color;
pub use super::color::Mode as ColorMode;
pub use super::draw::Draw;
pub use super::engine::Engine;
pub use super::engine::PixEngine;
pub use super::error::Error as PixError;
pub use super::error::Result as PixResult;
pub use super::event::Axis;
pub use super::event::ControllerButton;
pub use super::event::ControllerEvent;
pub use super::event::ControllerId;
pub use super::event::ControllerUpdate;
pub use super::event::Event;
pub use super::event::HatState;
pub use super::event::Key;
pub use super::event::KeyEvent;
pub use super::event::KeyMod;
pub use super::event::Mouse;
pub use super::event::WindowEvent;
pub use super::gui::theme;
pub use super::gui::theme::ColorType;
pub use super::gui::theme::Font;
pub use super::gui::theme::Theme;
pub use super::image::Image;
pub use super::image::PixelFormat;
pub use super::lighting::Light;
pub use super::lighting::LightSource;
pub use super::math::map;
pub use super::math::random_rng;
pub use super::math::Float;
pub use super::math::Num;
pub use super::shape::Contains;
pub use super::shape::Ellipse;
pub use super::shape::Intersects;
pub use super::shape::Line;
pub use super::shape::Point;
pub use super::shape::Quad;
pub use super::shape::Rect;
pub use super::shape::Sphere;
pub use super::shape::Tri;
pub use super::state::settings::AngleMode;
pub use super::state::settings::ArcMode;
pub use super::state::settings::BlendMode;
pub use super::state::settings::DrawMode;
pub use super::state::settings::EllipseMode;
pub use super::state::settings::FontStyle;
pub use super::state::settings::ImageMode;
pub use super::state::settings::RectMode;
pub use super::state::PixState;
pub use super::texture::TextureId;
pub use super::transform::Flipped;
pub use super::vector::Vector;
pub use super::window::Cursor;
pub use super::window::Position;
pub use super::window::SystemCursor;
pub use super::window::WindowId;

Macros

Constructs a circle Ellipse at position (x, y) with radius.
Constructs a Color with red, green, blue and optional alpha.
Constructs an Ellipse at position (x, y) with width and height.
Constructs a Color with hue, saturation, brightness and optional alpha.
Constructs a Color with hue, saturation, lightness and optional alpha.
Constructs a Line with two points.
Returns the Perlin noise value at specified coordinates.
Constructs a Point with N coordinates.
Constructs a Quad with four points.
Returns a random number within a range.
Constructs a Rect at position (x, y) with width and height.
Constructs a Color with red, green, blue and optional alpha.
Constructs a Sphere at position (x, y, z) with radius.
Constructs a square Rect at position (x, y) with the same width and height.
Constructs a Triangle with three points.
Constructs a Vector.

Traits

A phantom type for retrieving the SDL_AudioFormat of a given generic type. All format types are returned as native-endian.