Skip to content

Commit 00c8db3

Browse files
committed
default() render options
1 parent e97889c commit 00c8db3

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codevis"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
edition = "2021"
55
description = "A tool for turning your code into one large image"
66
license = "MIT"

src/render/mod.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,27 @@ pub struct Options<'a> {
7474
pub tab_spaces: u32,
7575
}
7676

77+
impl Default for Options<'_> {
78+
fn default() -> Self {
79+
Options {
80+
column_width: 100,
81+
line_height: 2,
82+
target_aspect_ratio: 16. / 9.,
83+
threads: num_cpus::get(),
84+
highlight_truncated_lines: false,
85+
fg_color: FgColor::StyleAsciiBrightness,
86+
bg_color: BgColor::Style,
87+
theme: "Solarized (dark)",
88+
force_full_columns: true,
89+
ignore_files_without_syntax: false,
90+
plain: false,
91+
display_to_be_processed_file: false,
92+
color_modulation: 0.3,
93+
tab_spaces: 4,
94+
}
95+
}
96+
}
97+
7798
mod highlight;
7899
use highlight::Cache;
79100

0 commit comments

Comments
 (0)