Crate bevy_retrograde_epaint

Source
Expand description

Bevy Retrograde epaint integration

The target use-case is easy drawing of primitives such as lines, circles, text, etc. for use in debug rendering and visualization.

Modules§

ahash
AHash is a hashing algorithm is intended to be a high performance, (hardware specific), keyed hash function. This can be seen as a DOS resistant alternative to FxHash, or a fast equivalent to SipHash. It provides a high speed hash algorithm, but where the result is not predictable without knowing a Key. This allows it to be used in a HashMap without allowing for the possibility that an malicious user can induce a collision.
align
One- and two-dimensional alignment (Align::Center, Align2::LEFT_TOP etc).
color
Color conversions and types.
emath
Opinionated 2D math library for building GUIs.
mutex
Helper module that wraps some Mutex types with different implementations.
prelude
Epaint plugin prelude
shape_transform
smart_aim
Find “simple” numbers is some range. Used by sliders.
stats
Collect statistics about what is being painted.
tessellator
Converts graphics primitives into textured triangles.
text
Everything related to text, fonts, text layout, cursors etc.

Macros§

emath_assert
An assert that is only active when egui is compiled with the egui_assert feature or with the debug_egui_assert feature in debug builds.
epaint_assert
An assert that is only active when egui is compiled with the egui_assert feature or with the debug_egui_assert feature in debug builds.

Structs§

Align2
Two-dimension alignment, e.g. Align2::LEFT_TOP.
ClippedMesh
A Mesh within a clip rectangle.
ClippedShape
A Shape within a clip rectangle.
Color32
This format is used for space-efficient color representation (32 bits).
Galley
A collection of text locked into place.
Mesh
Textured triangles in two dimensions.
Mesh16
A version of Mesh that uses 16-bit indices.
PaintStats
Collected allocation statistics for shapes and meshes.
Pos2
A position on screen.
RectTransform
Linearly transforms positions from one Rect to another.
RetroEpaintPlugin
Text rendering plugin for Bevy Retrograde
Rgba
0-1 linear space RGBA color with premultiplied alpha.
Rot2
Represents a rotation in the 2D plane. A rotation of 𝞃/4 = 90° rotates the X axis to the Y axis. Normally a Rot2 is normalized (unit-length). If not, it will also scale vectors.
Shadow
The color and fuzziness of a fuzzy shape. Can be used for a rectangular shadow with a soft penumbra.
ShapeBundle
Bundle for rendering an epaint shape
Stroke
Describes the width and color of a line.
TessellationOptions
Tessellation quality options
Tessellator
Converts Shapes into Mesh.
Texture
An 8-bit texture containing font data.
TextureAtlas
Contains font data in an atlas, where each character occupied a small rectangle.
Vertex
The 2D vertex type.

Enums§

Align
left/center/right or top/center/bottom alignment for e.g. anchors and layouts.
Shape
A paint primitive such as a circle or a piece of text. Coordinates are all screen space points (not physical pixels).
TextStyle
One of a few categories of styles of text, e.g. body, button or heading.
TextureId
What texture to use in a Mesh mesh.

Constants§

WHITE_UV
The UV coordinate of a white region of the texture mesh. The default egui texture has the top-left corner pixel fully white. You need need use a clamping texture sampler for this to work (so it doesn’t do bilinear blending with bottom right corner).

Traits§

NumExt
Extends f32, Vec2 etc with at_least and at_most as aliases for max and min.
Numeric
Implemented for all builtin numeric types
One
Helper trait to implement lerp and remap.
Real
Helper trait to implement lerp and remap.

Functions§

almost_equal
Return true when arguments are the same within some rounding error.
clampDeprecated
Returns range.start() if x <= range.start(), returns range.end() if x >= range.end() and returns x elsewhen.
format_with_decimals_in_range
format_with_minimum_decimals
lerp
Linear interpolation.
normalized_angle
Wrap angle to [-PI, PI] range.
pos2
pos2(x,y) == Pos2::new(x, y)
remap
Linearly remap a value from one range to another, so that when x == from.start() returns to.start() and when x == from.end() returns to.end().
remap_clamp
Like remap, but also clamps the value so that the returned value is always in the to range.
round_to_decimals
Round a value to the given number of decimal places.
vec2
vec2(x,y) == Vec2::new(x, y)