module

Bon::Simulate

Constants

DEFAULT_BOTTOM_MM = 14.0
DEFAULT_FOREGROUND_FADE = 1.0
DEFAULT_MIN_BOTTOM_MM = 2.0
DEFAULT_MIN_TOP_MM = 12.0
DEFAULT_MOCKUP_PPI = 406
DEFAULT_PPI = 203
DEFAULT_TOP_MM = 10.0
INK_RGB = {35, 35, 32}
PAPER_RGB = {245, 241, 224}

Class methods

default_sources(cwd = Dir.current) : Array(String)
Source
output_path(source : String, options : Options, page_number : Int32 | Nil = nil) : String
Source
parse_color(value : String) : RGB
Source
parse_rgb(value : String) : Tuple(Int32, Int32, Int32)
Source
read_png(path : String) : Raster
Source
render_source(source : String, temp_dir : String, options : Options, output_io : IO = STDOUT, error_io : IO = STDERR) : Array(String)
Source
render_sources(sources : Array(String), options : Options, output_io : IO = STDOUT, error_io : IO = STDERR) : Array(String)
Source
simulate_png(source_png : String, output_png : String, paper_mm : Float64, content_width_mm : Float64, mockup_ppi : Int32, top_mm : Float64, bottom_mm : Float64, seed : Int32, source_width_mm : Float64 | Nil = nil, paper_rgb = PAPER_RGB, foreground_rgb : RGB = INK_RGB, foreground_fade : Float64 = DEFAULT_FOREGROUND_FADE) : Nil
Source
write_png(path : String, width : Int32, height : Int32, rgb : Bytes) : Nil
Source

Nested types