Skip to content

Commit

Permalink
Merge pull request #154 from Maldela/atlas
Browse files Browse the repository at this point in the history
Texture atlas
  • Loading branch information
hecrj authored Feb 28, 2020
2 parents 69c81aa + 88d4cd0 commit bab7dbc
Show file tree
Hide file tree
Showing 18 changed files with 957 additions and 351 deletions.
1 change: 1 addition & 0 deletions examples/svg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ publish = false

[dependencies]
iced = { path = "../..", features = ["svg"] }
env_logger = "0.7"
11 changes: 8 additions & 3 deletions examples/svg/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use iced::{Column, Container, Element, Length, Sandbox, Settings, Svg};

pub fn main() {
env_logger::init();

Tiger::run(Settings::default())
}

Expand All @@ -22,9 +24,12 @@ impl Sandbox for Tiger {

fn view(&mut self) -> Element<()> {
let content = Column::new().padding(20).push(
Svg::new(format!("{}/resources/tiger.svg", env!("CARGO_MANIFEST_DIR")))
.width(Length::Fill)
.height(Length::Fill),
Svg::new(format!(
"{}/resources/tiger.svg",
env!("CARGO_MANIFEST_DIR")
))
.width(Length::Fill)
.height(Length::Fill),
);

Container::new(content)
Expand Down
2 changes: 1 addition & 1 deletion native/src/widget/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::{
/// ```
///
/// <img src="https://github.com/hecrj/iced/blob/9712b319bb7a32848001b96bd84977430f14b623/examples/resources/ferris.png?raw=true" width="300">
#[derive(Debug)]
#[derive(Debug, Hash)]
pub struct Image {
handle: Handle,
width: Length,
Expand Down
1 change: 1 addition & 0 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ raw-window-handle = "0.3"
glam = "0.8"
font-kit = "0.4"
log = "0.4"
guillotiere = "0.4"

[dependencies.image]
version = "0.22"
Expand Down
Loading

0 comments on commit bab7dbc

Please sign in to comment.