Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/baad-c0de/mage-core
/ functions
Functions
55 in github.com/baad-c0de/mage-core
⨍
Functions
55
◇
Types & classes
20
↓ 4 callers
Method
clear
(&mut self, rect: Rect, paper: u32)
src/present.rs:99
↓ 4 callers
Method
rect
Returns a rectangle representing the bounds of the image. # Returns A rectangle representing the bounds of the image. # Notes The rectangle return
src/image.rs:436
↓ 4 callers
Method
update
(&mut self, queue: &Queue)
src/render.rs:479
↓ 3 callers
Method
clip_within
Creates a new rectangle by clipping this rectangle to the given dimensions. The new rectangle will be the largest rectangle that fits within the give
src/image.rs:179
↓ 3 callers
Method
coords_to_index
Returns the index of the char at the given coordinates. # Arguments `x` - The x coordinate of the char to get the index of. `y` - The y coordinate o
src/image.rs:301
↓ 3 callers
Method
resize
(&mut self, new_size: PhysicalSize<u32>)
src/render.rs:301
↓ 2 callers
Method
blit
Blit the an area of the source image to the screen. The source rectangle is clipped to the source image. # Arguments `dst_rect` - Where to blit the
src/present.rs:32
↓ 2 callers
Function
create_texture_bind_group
( device: &Device, texture_bind_group_layout: &BindGroupLayout, fg_texture: &Texture, bg_textu
src/render.rs:390
↓ 2 callers
Method
draw_string
Draws a string at the given coordinates. # Arguments `p` - The coordinates to draw the string at. `text` - The string to draw. `ink` - The foregroun
src/image.rs:366
↓ 2 callers
Function
load_font_image
(data: &[u8])
src/config.rs:65
↓ 2 callers
Method
new_image
(&self)
src/present.rs:16
↓ 2 callers
Method
present
(&mut self, mut present_input: PresentInput)
examples/basic.rs:47
↓ 2 callers
Function
run
(mut app: A, config: Config)
src/lib.rs:33
↓ 2 callers
Method
size_in_chars
(&self)
src/render.rs:377
↓ 1 callers
Method
alt_only
(&self)
src/input.rs:38
↓ 1 callers
Method
blit_internal
(&mut self, dst_rect: Rect, src_rect: Rect, src_image: &Image)
src/present.rs:113
↓ 1 callers
Method
clear
Clears the image with a given ink and paper colour. # Arguments `ink` - The foreground colour to clear the image with. `paper` - The background colo
src/image.rs:322
↓ 1 callers
Method
colour
(&self)
src/colour.rs:22
↓ 1 callers
Method
draw_char
Draws a character at the given coordinates. # Arguments `p` - The coordinates to draw the character at. `ch` - The character to draw. # Notes If t
src/image.rs:345
↓ 1 callers
Method
images
(&mut self)
src/render.rs:381
↓ 1 callers
Method
intersect
Returns the intersection of this rectangle and another rectangle. The intersection of two rectangles is the largest rectangle that is contained withi
src/image.rs:145
↓ 1 callers
Method
point_to_index
Returns the index of the char at the given coordinates. # Arguments `p` - The coordinates of the char to get the index of. # Returns The index of
src/image.rs:285
↓ 1 callers
Function
present
(app: &mut A, state: &mut RenderState)
src/lib.rs:183
↓ 1 callers
Method
render
(&mut self)
src/render.rs:330
↓ 1 callers
Function
tick
(app: &mut A, state: &mut RenderState, dt: Duration)
src/lib.rs:174
↓ 1 callers
Method
tick
(&mut self, tick_input: TickInput)
examples/basic.rs:42
↓ 1 callers
Method
update
(&mut self, modifiers: ModifiersState)
src/input.rs:58
Method
alt_down
(&self)
src/input.rs:26
Method
ctrl_alt
(&self)
src/input.rs:50
Method
ctrl_down
(&self)
src/input.rs:22
Method
ctrl_only
(&self)
src/input.rs:34
Method
default
()
src/config.rs:27
Method
default
()
src/input.rs:66
Method
draw_filled_rect
Draws a rectangle at the given coordinates and dimensions using the given character. # Arguments `p` - The coordinates to draw the rectangle at. `wi
src/image.rs:401
Method
from
(colour: Colour)
src/colour.rs:51
Method
from_point_and_size
Creates a new rectangle from a point and size. The point is the top-left corner of the rectangle. # Arguments `p` - The top-left corner of the rect
src/image.rs:97
Method
from_points
Creates a new rectangle from two points. The points do not need to be in any particular order. The rectangle will be the smallest rectangle that cont
src/image.rs:70
Function
main
()
examples/basic.rs:9
Function
main
()
examples/hello.rs:9
Method
new
(window: &'a Window, font: FontData)
src/render.rs:73
Method
new
()
src/input.rs:10
Method
new
(x: i32, y: i32)
src/image.rs:28
Method
new
()
examples/basic.rs:36
Method
new
()
examples/hello.rs:31
Method
new_char
Creates a new character with the given char, ink and paper colours. The char is converted to a u8. # Arguments `ch` - The char to render. This is a
src/image.rs:244
Method
new_u32
Creates a new 32-bit character with the given char, ink and paper colours. # Arguments `ch` - The char to render. This is a 32-bit value. `ink` - T
src/image.rs:230
Method
present
(&mut self, mut present_input: PresentInput)
examples/hello.rs:41
Method
rect
(&self)
src/present.rs:7
Method
shift_alt
(&self)
src/input.rs:46
Method
shift_ctrl
(&self)
src/input.rs:42
Method
shift_ctrl_alt
(&self)
src/input.rs:54
Method
shift_down
(&self)
src/input.rs:18
Method
shift_only
(&self)
src/input.rs:30
Method
tick
(&mut self, _tick_input: TickInput)
examples/hello.rs:37
Method
union
Returns the union of this rectangle and another rectangle. The union of two rectangles is the smallest rectangle that contains both rectangles. # Ar
src/image.rs:119