mirror of
https://github.com/ratatui/ratatui.git
synced 2025-10-03 07:45:59 +00:00
docs(canvas): add documentation for x_bounds, y_bounds (#35)
Co-authored-by: girvel <widauka@ya.ru> Co-authored-by: Leon Sautour <leon1.sautour@epitech.eu> Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com>
This commit is contained in:
parent
c20fb723ef
commit
33e67abbe9
@ -384,11 +384,18 @@ where
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Define the viewport of the canvas.
|
||||||
|
/// If you were to "zoom" to a certain part of the world you may want to choose different
|
||||||
|
/// bounds.
|
||||||
pub fn x_bounds(mut self, bounds: [f64; 2]) -> Canvas<'a, F> {
|
pub fn x_bounds(mut self, bounds: [f64; 2]) -> Canvas<'a, F> {
|
||||||
self.x_bounds = bounds;
|
self.x_bounds = bounds;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Define the viewport of the canvas.
|
||||||
|
///
|
||||||
|
/// If you were to "zoom" to a certain part of the world you may want to choose different
|
||||||
|
/// bounds.
|
||||||
pub fn y_bounds(mut self, bounds: [f64; 2]) -> Canvas<'a, F> {
|
pub fn y_bounds(mut self, bounds: [f64; 2]) -> Canvas<'a, F> {
|
||||||
self.y_bounds = bounds;
|
self.y_bounds = bounds;
|
||||||
self
|
self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user