Write documentation for iced_graphics
This commit is contained in:
parent
45511a442f
commit
2ca7e3c4b0
19 changed files with 271 additions and 19 deletions
|
|
@ -26,22 +26,44 @@ impl Viewport {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the physical size of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn physical_size(&self) -> Size<u32> {
|
||||
self.physical_size
|
||||
}
|
||||
|
||||
/// Returns the physical width of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn physical_width(&self) -> u32 {
|
||||
self.physical_size.height
|
||||
}
|
||||
|
||||
/// Returns the physical height of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn physical_height(&self) -> u32 {
|
||||
self.physical_size.height
|
||||
}
|
||||
|
||||
/// Returns the logical size of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn logical_size(&self) -> Size<f32> {
|
||||
self.logical_size
|
||||
}
|
||||
|
||||
/// Returns the scale factor of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn scale_factor(&self) -> f64 {
|
||||
self.scale_factor
|
||||
}
|
||||
|
||||
/// Returns the projection transformation of the [`Viewport`].
|
||||
///
|
||||
/// [`Viewport`]: struct.Viewport.html
|
||||
pub fn projection(&self) -> Transformation {
|
||||
self.projection
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue