Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 532 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 532 Bytes

Sahar

a layout engine for text and images using basic primitives.

Installation

go get ella.to/sahar

Usage

	b := sahar.Stack(
		sahar.Padding(5, 5, 5, 5),

		sahar.FontFamily("Arial", "./testdata/Arial.ttf"),

		sahar.Width(200),
		sahar.Height(200),

		sahar.Stack(
			sahar.Alignments(sahar.Center, sahar.Middle),
			sahar.BackgroundColor("#FF0000"),

			sahar.Text(
				"Hello, World!",
				sahar.Color("#000000"),
				sahar.FontSize(8),
			),

			sahar.Image("./testdata/Sample.jpeg"),
		),
	)