Skip to content

Commit

Permalink
cargo test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
junkdog committed Jul 21, 2024
1 parent 8b7e539 commit 5fad9cd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/fx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,20 @@ pub fn resize_area<T: Into<EffectTimer>>(
/// ```no_run
/// use std::cell::RefCell;
/// use std::rc::Rc;
/// use std::time::Duration;
/// use ratatui::prelude::{Buffer, Color, Rect};
/// use tachyonfx::{fx, Effect, EffectTimer, Interpolation};
/// use tachyonfx::{fx, Effect, EffectTimer, Interpolation, Shader};
///
/// let duration = Duration::from_millis(16);
/// let mut main_buffer = Buffer::empty(Rect::new(0, 0, 80, 24));
///
/// let area = Rect::new(0, 0, 80, 24);
/// let offscreen_buffer = Rc::new(RefCell::new(Buffer::empty(area)));
///
/// let fade_effect = fx::fade_to_fg(Color::Red, EffectTimer::from_ms(1000, Interpolation::Linear));
/// let offscreen_effect = fx::offscreen_buffer(fade_effect, offscreen_buffer.clone());
/// let mut offscreen_effect = fx::offscreen_buffer(fade_effect, offscreen_buffer.clone());
///
/// // Later, in your rendering loop:
/// // Later, in your rendering loop
/// offscreen_effect.process(duration, &mut main_buffer, area);
/// // Composite the offscreen buffer onto the main buffer as needed
/// ```
Expand Down

0 comments on commit 5fad9cd

Please sign in to comment.