draw

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HBar     = "\u2501"
	VBar     = "\u2502"
	CrossBar = "\u253f"
)

Variables

This section is empty.

Functions

func DrawCircle

func DrawCircle(w io.Writer, x, y, r float64, strokeCol color.SimpleColor, fillCol *color.SimpleColor)

DrawCircle strokes a circle with optional filling.

func DrawGrid

func DrawGrid(w io.Writer, x, y int, r *types.Rectangle, strokeCol color.SimpleColor, fillCol *color.SimpleColor)

DrawGrid draws an x * y grid on r using strokeCol and fillCol.

func DrawHairCross

func DrawHairCross(w io.Writer, x, y float64, r *types.Rectangle)

DrawHairCross draw a haircross with origin x/y.

func DrawLine

func DrawLine(w io.Writer, xp, yp, xq, yq float64, lineWidth float64, strokeColor *color.SimpleColor, style *types.LineJoinStyle)

DrawLine draws the path from P to Q using lineWidth, strokeColor and style.

func DrawLineSimple

func DrawLineSimple(w io.Writer, xp, yp, xq, yq float64)

DrawLineSimple draws the path from P to Q.

func DrawRect

func DrawRect(w io.Writer, r *types.Rectangle, lineWidth float64, strokeColor *color.SimpleColor, style *types.LineJoinStyle)

DrawRect strokes a rectangular path for r using lineWidth, strokeColor and style.

func DrawRectSimple

func DrawRectSimple(w io.Writer, r *types.Rectangle)

DrawRectSimple strokes a rectangular path for r.

func FillRect

func FillRect(w io.Writer, r *types.Rectangle, lineWidth float64, strokeCol *color.SimpleColor, fillCol color.SimpleColor, style *types.LineJoinStyle)

FillRect fills a rectangular path for r using lineWidth, strokeCol, fillCol and style.

func FillRectNoBorder

func FillRectNoBorder(w io.Writer, r *types.Rectangle, fillCol color.SimpleColor)

FillRectNoBorder fills a rectangular path for r using fillCol.

func HorSepLine

func HorSepLine(ii []int) string

HorSepLine renders a horizontal divider with optional column separators: ━━━━━━━━━━┿━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━━

func SetFillColor

func SetFillColor(w io.Writer, c color.SimpleColor)

SetFillColor sets the fill color.

func SetLineJoinStyle

func SetLineJoinStyle(w io.Writer, s types.LineJoinStyle)

SetLineJoinStyle sets the line join style for stroking operations.

func SetLineWidth

func SetLineWidth(w io.Writer, width float64)

SetLineWidth sets line width for stroking operations.

func SetStrokeColor

func SetStrokeColor(w io.Writer, c color.SimpleColor)

SetStrokeColor sets the stroke color.

Types

type RenderMode

type RenderMode int

RenderMode represents the text rendering mode (see 9.3.6)

const (
	RMFill RenderMode = iota
	RMStroke
	RMFillAndStroke
)

Render mode

Jump to

Keyboard shortcuts

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