Skip to main content

TerminalCanvas

Struct TerminalCanvas 

Source
pub struct TerminalCanvas {
    pub width: usize,
    pub height: usize,
}

Fields§

§width: usize§height: usize

Implementations§

Source§

impl TerminalCanvas

Source

pub fn new(width: usize, height: usize) -> Self

Source

pub fn clear_screen(&self)

Source

pub fn restore_cursor(&self)

Source

pub fn show_cursor(&self)

Source

pub fn move_to(&self, row: usize, col: usize)

Source

pub fn clear_region(&self, top: usize, left: usize, w: usize, h: usize)

Source

pub fn draw_panel( &self, top: usize, left: usize, w: usize, h: usize, title: &str, status: Option<&str>, )

Gambar panel dengan border metal, title bar, dan optional status teks. Mirip tampilan hardware compressor/limiter di studio profesional.

Source

pub fn draw_vu_meter( &self, row: usize, col: usize, label: &str, current_linear: f32, peak_linear: f32, db_value: f32, width: usize, )

Render VU Meter bergaya plugin DAW lengkap:

  • Bar gradien hijau → kuning → merah (segmen LED)
  • Peak hold indicator (⬤) yang persist antar-frame
  • Panah arah (▲/▼) menunjukkan level naik/turun
  • Nilai dBFS digital di samping
Source

pub fn draw_vu_simple( &self, row: usize, col: usize, label: &str, level_linear: f32, width: usize, )

Versi ringkas tanpa peak hold & arrow

Source

pub fn draw_smooth_spectrum( &self, top: usize, left: usize, height: usize, bands: &[(f32, &str)], )

Spectrum analyzer vertikal dengan tepi mulus (antialiasing). Setiap kolom merepresentasikan satu band frekuensi. Menggunakan █ penuh + ▀ setengah atas untuk kesan halus seperti hardware spectrum analyzer analog.

Source

pub fn draw_waveform( &self, top: usize, left: usize, width: usize, height: usize, samples: &[f32], )

Render mini waveform horizontal dalam area tertentu. Setiap sample direpresentasikan sebagai titik • pada posisi Y sesuai amplitude.

Source

pub fn draw_rolling_meter( &self, top: usize, left: usize, width: usize, height: usize, value: f32, peak_value: f32, label: &str, )

Rolling/falling level meter bergaya hardware mixer. Level turun secara gradual memberi kesan “live”.

Source

pub fn draw_stereo_pan( &self, row: usize, col: usize, pan_left: f32, _pan_right: f32, width: usize, )

Indikator stereo pan/phase balance horizontal.

Source

pub fn draw_h_slider( &self, row: usize, col: usize, value_pct: f32, min_val: f32, max_val: f32, label: &str, width: usize, )

Visualisasi slider/knob horizontal bergaya mixer untuk parameter EQ atau gain.

Source

pub fn draw_processing_status( &self, row: usize, col: usize, active_tags: &[&str], )

Badge status proses DSP aktif — tampil seperti indikator di hardware compressor.

Source

pub fn draw_header( &self, row: usize, col: usize, title: &str, sample_rate: u32, channels: usize, )

Header bergaya judul plugin DAW dengan info teknis sistem.

Source

pub fn draw_stat(&self, row: usize, col: usize, label: &str, value: &str)

Source

pub fn draw_separator(&self, row: usize, col: usize, width: usize)

Source

pub fn draw_box(&self, top: usize, left: usize, w: usize, h: usize, title: &str)

Source

pub fn draw_level_meter( &self, row: usize, col: usize, label: &str, peak: f32, rms: f32, width: usize, )

Source

pub fn draw_fft_spectrum( &self, top: usize, left: usize, height: usize, bands: &[(f32, &str)], )

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.