MCPcopy Create free account
hub / github.com/PistonDevelopers/graphics / SourceRectangled

Interface SourceRectangled

src/source_rectangled.rs:6–22  ·  view source on GitHub ↗

Should be implemented by contexts that have source rectangle information.

Source from the content-addressed store, hash-verified

4/// Should be implemented by contexts that
5/// have source rectangle information.
6pub trait SourceRectangled {
7 /// Adds a source rectangle.
8 fn src_rect(self, x: i32, y: i32, w: i32, h: i32) -> Self;
9
10 /// Moves to a relative source rectangle using
11 /// the current source rectangle as tile.
12 fn src_rel(self, x: i32, y: i32) -> Self;
13
14 /// Flips the source rectangle horizontally.
15 fn src_flip_h(self) -> Self;
16
17 /// Flips the source rectangle vertically.
18 fn src_flip_v(self) -> Self;
19
20 /// Flips the source rectangle horizontally and vertically.
21 fn src_flip_hv(self) -> Self;
22}
23
24impl SourceRectangled for SourceRectangle {
25 #[inline(always)]

Callers

nothing calls this directly

Implementers 1

source_rectangled.rssrc/source_rectangled.rs

Calls

no outgoing calls

Tested by

no test coverage detected