summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-15 06:28:44 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-15 06:28:44 +0100
commit6ba2461445e68127ef686d2b9d79eb7a09f42a86 (patch)
treeb77ba5aeef7363adfb5d27f4443d7e9eaba7bc0c
parent09707f29fcf7fbd71570a43db214921043427c3f (diff)
downloadiced-6ba2461445e68127ef686d2b9d79eb7a09f42a86.tar.gz
iced-6ba2461445e68127ef686d2b9d79eb7a09f42a86.tar.bz2
iced-6ba2461445e68127ef686d2b9d79eb7a09f42a86.zip
Update `Svg` documentation
-rw-r--r--native/src/widget/svg.rs11
-rw-r--r--src/native.rs8
2 files changed, 13 insertions, 6 deletions
diff --git a/native/src/widget/svg.rs b/native/src/widget/svg.rs
index 42f2ebdf..9580f195 100644
--- a/native/src/widget/svg.rs
+++ b/native/src/widget/svg.rs
@@ -1,4 +1,4 @@
-//! Display an icon.
+//! Display vector graphics in your application.
use crate::{layout, Element, Hasher, Layout, Length, Point, Size, Widget};
use std::{
@@ -6,7 +6,14 @@ use std::{
path::{Path, PathBuf},
};
-/// A simple icon_loader widget.
+/// A vector graphics image.
+///
+/// An [`Svg`] image resizes smoothly without losing any quality.
+///
+/// [`Svg`] images can have a considerable rendering cost when resized,
+/// specially when they are complex.
+///
+/// [`Svg`]: struct.Svg.html
#[derive(Debug, Clone)]
pub struct Svg {
handle: Handle,
diff --git a/src/native.rs b/src/native.rs
index 8c86ec7e..c6ddf25b 100644
--- a/src/native.rs
+++ b/src/native.rs
@@ -81,16 +81,16 @@ pub mod widget {
}
pub mod svg {
- //! Display icons in your user interface.
- pub use iced_winit::svg::Svg;
+ //! Display vector graphics in your user interface.
+ pub use iced_winit::svg::{Handle, Svg};
}
pub use iced_winit::{Checkbox, Radio, Text};
#[doc(no_inline)]
pub use {
- button::Button, image::Image, scrollable::Scrollable,
- slider::Slider, svg::Svg, text_input::TextInput,
+ button::Button, image::Image, scrollable::Scrollable, slider::Slider,
+ svg::Svg, text_input::TextInput,
};
/// A container that distributes its contents vertically.