proof

package
v1.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package proof holds the scenes that cmd/glutter-proof renders to prove, with a picture, that a step of docs/IMPLEMENTATION.md works. A step adds its scene here.

Flutter: no counterpart

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundledTextEngine

func BundledTextEngine() *layout.Engine

BundledTextEngine returns a text engine that knows only the bundled fonts, so that what it draws is the same on every machine.

Flutter: no counterpart

func DecorationsScene

func DecorationsScene() *ui.Scene

DecorationsScene draws the decorations proof: the scene of the decorations proof.

Flutter: no counterpart

func Names

func Names() []string

Names returns the names of the registered scenes in alphabetical order.

func Register

func Register(s Scene)

Register adds a scene made by a package that package proof cannot import, such as internal/proof/widgetscenes; it is called from init functions and panics with the tag ProofSceneDuplicate when the name is taken.

func RenderingTourScene

func RenderingTourScene() *ui.Scene

RenderingTourScene builds the render tree of the rendering tour proof, lays it out and paints it with the rendering binding of a fake engine, and returns the scene that the view rendered.

Flutter: no counterpart

func SystemTextEngine

func SystemTextEngine() *layout.Engine

SystemTextEngine returns the text engine of the proof scenes: the bundled fonts and the fonts of the machine, found by scanning the font directories (the proof scenes are not an app, so they leave fontconfig to the engine). The engine is made once.

Flutter: no counterpart

func TextScene

func TextScene(e *layout.Engine, latinOnly bool) *ui.Scene

TextScene draws the text proof: the scene of the text-tour proof, made with the given engine. With latinOnly it leaves out the right-to-left, CJK and emoji text, which need fonts that the bundled ones lack; what is left is the same on every machine, which is what the golden tests need.

Flutter: no counterpart

Types

type Scene

type Scene struct {
	// Name is what -scene takes.
	Name string
	// Description says what the picture should show.
	Description string
	// Width and Height are the size of the image in pixels.
	Width, Height int
	// Build creates the scene.
	Build func() *ui.Scene
}

Scene is a registered proof scene.

func Lookup

func Lookup(name string) (Scene, error)

Lookup returns the scene with the name, or the error ProofSceneUnknown.

Directories

Path Synopsis
Package widgetscenes holds the proof scenes that are made by pumping a widget tree through gluttertest.
Package widgetscenes holds the proof scenes that are made by pumping a widget tree through gluttertest.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL