draw2dExtend

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHexColor

func ParseHexColor(s string) (color color.RGBA)

func Triangle

func Triangle(path draw2d.PathBuilder, x1, y1, x2, y2 float64)

Triangle draws a triangle using a path between (x1,y1) and (x2,y2)

Types

type BackgroundOptions

type BackgroundOptions struct {
	Padding, Radius float64
	FillColor       color.RGBA
}

func NewBackgroundOptions

func NewBackgroundOptions() *BackgroundOptions

type DrawBuilder

type DrawBuilder struct {
	// contains filtered or unexported fields
}

func NewDrawBuilder

func NewDrawBuilder(fontData draw2d.FontData) *DrawBuilder

func (*DrawBuilder) DrawCircle

func (d *DrawBuilder) DrawCircle(radius float64)

func (*DrawBuilder) DrawRoundedRectangle

func (d *DrawBuilder) DrawRoundedRectangle(width, height float64, roundedRadius float64)

func (*DrawBuilder) DrawText

func (d *DrawBuilder) DrawText(text string, fontSize float64, backgroundOptions *BackgroundOptions) (width, height float64)

func (*DrawBuilder) DrawTriangle

func (d *DrawBuilder) DrawTriangle(width, height float64)

func (*DrawBuilder) SetFillColor

func (d *DrawBuilder) SetFillColor(fillColor color.RGBA) *DrawBuilder

func (*DrawBuilder) SetGraphicContext

func (d *DrawBuilder) SetGraphicContext(graphicContext *draw2dimg.GraphicContext) *DrawBuilder

func (*DrawBuilder) SetStrokeColor

func (d *DrawBuilder) SetStrokeColor(strokeColor color.RGBA) *DrawBuilder

func (*DrawBuilder) SetStrokeWidth

func (d *DrawBuilder) SetStrokeWidth(strokeWidth float64) *DrawBuilder

type Point

type Point struct {
	X, Y float64
}

func GetRotatePointByType

func GetRotatePointByType(pointType string, leftTopX, leftTopY float64, width, height float64) Point

Jump to

Keyboard shortcuts

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