Skip to content

Commit

Permalink
Ruma väliaikainen korjaus Windowsille
Browse files Browse the repository at this point in the history
  • Loading branch information
ollpu committed Apr 19, 2021
1 parent d4eeac3 commit 4179386
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,14 @@ use femtovg::{renderer::OpenGl, Canvas, Color, Paint, Path};

impl Widget for Plot {
type Ret = Entity;
fn on_build(&mut self, _state: &mut State, entity: Entity) -> Self::Ret {
fn on_build(&mut self, state: &mut State, entity: Entity) -> Self::Ret {
//state.style.insert_element(entity, "element");
let animation = AnimationState::new()
.with_duration(std::time::Duration::from_secs(30000000))
.with_keyframe((0.0, Stretch(0.0)))
.with_keyframe((0.0, Stretch(5.)));
let animation = state.style.border_width.insert_animation(animation);
state.style.border_width.play_animation(entity, animation);
entity
}
fn on_draw(&mut self, state: &mut State, entity: Entity, canvas: &mut Canvas<OpenGl>) {
Expand Down

0 comments on commit 4179386

Please sign in to comment.