Skip to content

Commit 530f1ea

Browse files
no branding
1 parent dc56707 commit 530f1ea

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ license = "MPL-2.0"
1515
[badges]
1616
maintenance = { status = "actively-developed" }
1717

18+
[lib]
19+
name = "animate"
20+
1821
[features]
1922
web = ["wasm-bindgen", "wasm-bindgen-futures", "wasm-logger", "gloo", "js-sys", "wasm-bindgen-test", "web-sys"]
2023
cairo = ["cairo-rs", "png", "gio", "gtk"]

src/backend/cairo_canvas.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ use cairo::{self, FontFace, FontSlant, FontWeight};
77
use gio::prelude::*;
88
use gtk::prelude::*;
99

10-
use ux_primitives::{
11-
canvas::{CanvasContext, Direction, LineCap, LineJoin, TextMetrics},
12-
color::{rgb, Color},
13-
geom::{Point, Rect, Size},
14-
text::{BaseLine, TextAlign, TextStyle, TextWeight},
10+
use primitives::{
11+
BaseLine, CanvasContext, Color, Direction, LineCap, LineJoin, Point, Rect, RgbColor, Size,
12+
TextAlign, TextMetrics, TextStyle, TextWeight,
1513
};
1614

1715
pub struct CairoCanvas<'a> {
@@ -48,7 +46,7 @@ impl<'a> CanvasContext for CairoCanvas<'a> {
4846
// }
4947

5048
fn set_fill_style_color(&self, value: Color) {
51-
let color: rgb::Color = value.into();
49+
let color: RgbColor = value.into();
5250
self.ctx.set_source_rgb(
5351
color.red as f64 / 255.,
5452
color.green as f64 / 255.,
@@ -212,7 +210,7 @@ impl<'a> CanvasContext for CairoCanvas<'a> {
212210
// }
213211

214212
fn set_stroke_style_color(&self, value: Color) {
215-
let color: rgb::Color = value.into();
213+
let color: RgbColor = value.into();
216214
self.ctx.set_source_rgb(
217215
color.red as f64 / 255.,
218216
color.green as f64 / 255.,

src/backend/web_canvas.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
#![allow(dead_code)]
44
#![cfg(feature = "web")]
55

6-
use ux_primitives::{
7-
canvas::{CanvasContext, Direction, LineCap, LineJoin, TextMetrics},
8-
color::{rgb, Color},
9-
geom::{Point, Rect, Size},
10-
text::{BaseLine, TextAlign, TextStyle, TextWeight},
6+
use primitives::{
7+
BaseLine, CanvasContext, Color, Direction, LineCap, LineJoin, Point, Rect, RgbColor, Size,
8+
TextAlign, TextMetrics, TextStyle, TextWeight,
119
};
1210

1311
use web_sys;

0 commit comments

Comments
 (0)