Use recently stabilized intra-doc links

See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
This commit is contained in:
Héctor Ramón Jiménez 2020-11-25 07:11:27 +01:00
parent d612bf5678
commit 01322f69a4
135 changed files with 135 additions and 1769 deletions

View file

@ -12,8 +12,6 @@ pub struct Viewport {
impl Viewport {
/// Creates a new [`Viewport`] with the given physical dimensions and scale
/// factor.
///
/// [`Viewport`]: struct.Viewport.html
pub fn with_physical_size(size: Size<u32>, scale_factor: f64) -> Viewport {
Viewport {
physical_size: size,
@ -27,43 +25,31 @@ 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
}