struct Sheen::StylePainter

Overview

Renders a Style to a string. A short-lived collaborator constructed per render. The pipeline is a sstateless transform over the bound and immutable Style, read through its getters.

Defined in:

sheen/style_painter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(style : Style) #

[View source]

Instance Method Detail

def render(strings : Array(String)) : String #

Renders strings through the bound style. Joins bound content, applies transforms, normalizes, applies the SGR core, shapes the block (padding, height, alignment, border, margins), then applies width+height limits.


[View source]