script

package
v0.0.0-...-50cf7ee Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Width4K     = 3840 // 4K resolution, 2160p
	Height4K    = 2160 // 4K resolution, 2160p
	Width1080p  = 1920 // FHD 1080p resolution
	Height1080p = 1080 // FHD 1080p resolution
	Width720p   = 1280 // HD 720p resolution
	Height720p  = 720
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnimUtil

type AnimUtil struct {
}

func (AnimUtil) DrawColourBars

func (_ AnimUtil) DrawColourBars(gc *draw2dimg.GraphicContext, bounds util.Rectangle, cols ...color.Color) (float64, float64)

func (AnimUtil) DrawColourBarsVertical

func (_ AnimUtil) DrawColourBarsVertical(gc *draw2dimg.GraphicContext, bounds util.Rectangle, cols ...color.Color) (float64, float64)

func (AnimUtil) DrawString

func (_ AnimUtil) DrawString(gc *draw2dimg.GraphicContext, x, y float64, s string, a ...interface{}) float64

func (AnimUtil) FitString

func (_ AnimUtil) FitString(l, t, r, b, sl, st, sr, sb float64) (float64, float64, float64, float64)

func (AnimUtil) FloatToA

func (_ AnimUtil) FloatToA(v float64) string

func (AnimUtil) GetStringBounds

func (_ AnimUtil) GetStringBounds(gc *draw2dimg.GraphicContext, s string) util.Rectangle

func (AnimUtil) Rect

func (_ AnimUtil) Rect(x1, y1, x2, y2 float64) util.Rectangle

func (AnimUtil) StringSize

func (_ AnimUtil) StringSize(gc *draw2dimg.GraphicContext, s string, a ...interface{}) util.Rectangle

type Colour

type Colour struct{}

func (Colour) Colour

func (_ Colour) Colour(hex string) (color.RGBA, error)

func (Colour) ColourString

func (_ Colour) ColourString(c color.Color) string

func (Colour) Gradient

func (_ Colour) Gradient(n int, from, to color.Color) []color.Color

func (Colour) Grey

func (_ Colour) Grey(y int) color.Color

func (Colour) GreyScale

func (_ Colour) GreyScale(i int) color.Color

func (Colour) Histogram

func (_ Colour) Histogram() *color4.Histogram

func (Colour) Invert

func (_ Colour) Invert(c color.Color) color.Color

type Draw2Dimg

type Draw2Dimg struct{}

func (Draw2Dimg) NewGraphicContext

func (_ Draw2Dimg) NewGraphicContext(img draw.Image) *draw2dimg.GraphicContext

type Filter

type Filter struct{}

func (Filter) Equalize

func (_ Filter) Equalize(h *color.Histogram, b image.Rectangle) graph.Filter

func (Filter) Filter

func (_ Filter) Filter(f graph.Filter, src image.Image, dst graph.Image, b image.Rectangle) error

Filter applies a graph.Filter on a source image within the specified bounds, writing the result to the destination image.

The source and destination image may be the same Image if the filter supports it.

func (Filter) FilterNew

func (_ Filter) FilterNew(f graph.Filter, src image.Image) (graph.Image, error)

FilterNew applies a graph.Filter on a source image, returning a new mutable image with the new content.

func (Filter) FilterOver

func (_ Filter) FilterOver(f graph.Filter, src graph.Image) error

FilterOver applies the filter over the supplied mutable image, overwriting its previous state.

type Graph

type Graph struct {
}

func (Graph) FillPoly

func (_ Graph) FillPoly(gc *draw2dimg.GraphicContext, c color.Color, v ...float64)

func (Graph) FillPolyRel

func (_ Graph) FillPolyRel(gc *draw2dimg.GraphicContext, c color.Color, v ...float64)

func (Graph) FillRectangle

func (_ Graph) FillRectangle(gc *draw2dimg.GraphicContext, x, y, w, h float64, c color.Color) (float64, float64)

func (Graph) New1080p

func (g Graph) New1080p() renderer.Context

func (Graph) New4k

func (g Graph) New4k() renderer.Context

func (Graph) New720p

func (g Graph) New720p() renderer.Context

func (Graph) NewContext

func (g Graph) NewContext() renderer.Context

func (Graph) NewFont

func (_ Graph) NewFont(name string, size float64, family draw2d.FontFamily, style draw2d.FontStyle) font.Font

func (Graph) NewSizedContext

func (_ Graph) NewSizedContext(w, h int) renderer.Context

func (Graph) ParseFont

func (_ Graph) ParseFont(s string) (font.Font, error)

func (Graph) Rectangle

func (_ Graph) Rectangle(gc *draw2dimg.GraphicContext, x, y, w, h float64)

func (Graph) RelLine

func (_ Graph) RelLine(gc *draw2dimg.GraphicContext, x, y float64, v ...float64)

func (Graph) SetFont

func (_ Graph) SetFont(gc *draw2dimg.GraphicContext, s string) error

type Image

type Image struct {
	Width4K  int
	Height4K int
}

func (Image) Fill

func (_ Image) Fill(ctx renderer.Context, background color.Color)

Fill fills the image in the context with a specific colour

func (Image) Histogram

func (_ Image) Histogram(src image.Image) *color2.Histogram

func (Image) New1080p

func (_ Image) New1080p() *image.RGBA

New1080p creates a new RGBA image at 1080p resolution, also known as FHD or Full HD.

func (Image) New2160p

func (g Image) New2160p() *image.RGBA

New2160p creates a new RGBA image at 2160p. This is the same as New4K.

func (Image) New4K

func (_ Image) New4K() *image.RGBA

New4K creates a new RGBA image at 4K resolution

func (Image) New720p

func (_ Image) New720p() *image.RGBA

New720p creates a new RGBA image at 720p resolution, also known has HD or HD Ready.

func (Image) NewFloat16

func (_ Image) NewFloat16(w, h int) *exr.RGBAImage

NewFloat16 returns a RGBAImage using float16 for each colour component

func (Image) NewFloat32

func (_ Image) NewFloat32(w, h int) *exr.RGBAImage

NewFloat32 returns a RGBAImage using float32 for each colour component

func (Image) NewRGBA

func (_ Image) NewRGBA(w, h int) *image.RGBA

NewRGBA creates an RGBA image with the specified dimensions

func (Image) NewRGBA64

func (_ Image) NewRGBA64(w, h int) *image.RGBA64

NewRGBA64 creates an RGBA64 image with the specified dimensions

type Mapper

type Mapper struct{}

Mapper provides the graphMapper package

func (Mapper) Blue

func (_ Mapper) Blue() graph.Mapper

func (Mapper) Blue16

func (_ Mapper) Blue16() graph.Mapper

func (Mapper) Brighten

func (_ Mapper) Brighten(amount int) graph.Mapper

func (Mapper) Darken

func (_ Mapper) Darken(amount int) graph.Mapper

func (Mapper) DeltaRGB

func (_ Mapper) DeltaRGB(r, g, b int) graph.Mapper

func (Mapper) Filter

func (_ Mapper) Filter(m graph.Mapper) graph.Filter

func (Mapper) Green

func (_ Mapper) Green() graph.Mapper

func (Mapper) Green16

func (_ Mapper) Green16() graph.Mapper

func (Mapper) MaxLevel

func (_ Mapper) MaxLevel(r, g, b int) graph.Mapper

func (Mapper) MinLevel

func (_ Mapper) MinLevel(r, g, b int) graph.Mapper

func (Mapper) Mono

func (_ Mapper) Mono() graph.Mapper

func (Mapper) Mono16

func (_ Mapper) Mono16() graph.Mapper

func (Mapper) Red

func (_ Mapper) Red() graph.Mapper

func (Mapper) Red16

func (_ Mapper) Red16() graph.Mapper

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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