Should be implemented by contexts that have source rectangle information.
| 4 | /// Should be implemented by contexts that |
| 5 | /// have source rectangle information. |
| 6 | pub 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 | |
| 24 | impl SourceRectangled for SourceRectangle { |
| 25 | #[inline(always)] |
nothing calls this directly
no outgoing calls
no test coverage detected