nvg

package
v0.0.0-...-697b985 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: BSD-3-Clause, Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align C.enum_NVGalign
const (
	ALIGN_LEFT   Align = C.NVG_ALIGN_LEFT
	ALIGN_CENTER Align = C.NVG_ALIGN_CENTER
	ALIGN_RIGHT  Align = C.NVG_ALIGN_RIGHT

	ALIGN_TOP      Align = C.NVG_ALIGN_TOP
	ALIGN_MIDDLE   Align = C.NVG_ALIGN_MIDDLE
	ALIGN_BOTTOM   Align = C.NVG_ALIGN_BOTTOM
	ALIGN_BASELINE Align = C.NVG_ALIGN_BASELINE
)

type BlendFactor

type BlendFactor C.enum_NVGblendFactor
const (
	ZERO                BlendFactor = C.NVG_ZERO
	ONE                 BlendFactor = C.NVG_ONE
	SRC_COLOR           BlendFactor = C.NVG_SRC_COLOR
	ONE_MINUS_SRC_COLOR BlendFactor = C.NVG_ONE_MINUS_SRC_COLOR
	DST_COLOR           BlendFactor = C.NVG_DST_COLOR
	ONE_MINUS_DST_COLOR BlendFactor = C.NVG_ONE_MINUS_DST_COLOR
	SRC_ALPHA           BlendFactor = C.NVG_SRC_ALPHA
	ONE_MINUS_SRC_ALPHA BlendFactor = C.NVG_ONE_MINUS_SRC_ALPHA
	DST_ALPHA           BlendFactor = C.NVG_DST_ALPHA
	ONE_MINUS_DST_ALPHA BlendFactor = C.NVG_ONE_MINUS_DST_ALPHA
	SRC_ALPHA_SATURATE  BlendFactor = C.NVG_SRC_ALPHA_SATURATE
)

type Context

type Context C.NVGcontext

func CreateGL3

func CreateGL3(flags CreateFlags) (*Context, error)

func (*Context) AddFallbackFont

func (c *Context) AddFallbackFont(baseFont, fallbackFont string) error

func (*Context) AddFallbackFontID

func (c *Context) AddFallbackFontID(baseFont, fallbackFont int) error

func (*Context) Arc

func (c *Context) Arc(cx, cy, r, a0, a1 float64, dir int)

func (*Context) ArcTo

func (c *Context) ArcTo(x1, y1, x2, y2, radius float64)

func (*Context) BeginFrame

func (c *Context) BeginFrame(width, height, aspect float64)

func (*Context) BeginPath

func (c *Context) BeginPath()

func (*Context) BezierTo

func (c *Context) BezierTo(c1x, c1y, c2x, c2y, x, y float64)

func (*Context) BindFramebuffer

func (c *Context) BindFramebuffer(fb *Framebuffer)

func (*Context) BoxGradient

func (c *Context) BoxGradient(x, y, w, h, r, f float64, icol, ocol color.RGBA) Paint

func (*Context) CancelFrame

func (c *Context) CancelFrame()

func (*Context) Circle

func (c *Context) Circle(cx, cy, r float64)

func (*Context) ClosePath

func (c *Context) ClosePath()

func (*Context) CreateFont

func (c *Context) CreateFont(name, filename string) error

func (*Context) CreateFontMem

func (c *Context) CreateFontMem(name string, data []byte) error

func (*Context) CreateFramebuffer

func (c *Context) CreateFramebuffer(w, h int, imageFlags ImageFlags) (*Framebuffer, error)

func (*Context) CreateImage

func (c *Context) CreateImage(name string, flags ImageFlags) (int, error)

func (*Context) DeleteImage

func (c *Context) DeleteImage(image_ int)

func (*Context) Ellipse

func (c *Context) Ellipse(cx, cy, rx, ry float64)

func (*Context) EndFrame

func (c *Context) EndFrame()

func (*Context) Fill

func (c *Context) Fill()

func (*Context) FillColor

func (c *Context) FillColor(p color.RGBA)

func (*Context) FillPaint

func (c *Context) FillPaint(p Paint)

func (*Context) FindFont

func (c *Context) FindFont(name string) int

func (*Context) FontBlur

func (c *Context) FontBlur(blur float64)

func (*Context) FontFace

func (c *Context) FontFace(name string)

func (*Context) FontFaceID

func (c *Context) FontFaceID(font int)

func (*Context) FontSize

func (c *Context) FontSize(size float64)

func (*Context) GlobalAlpha

func (c *Context) GlobalAlpha(alpha float64)

func (*Context) GlobalCompositeBlendFunc

func (c *Context) GlobalCompositeBlendFunc(sfactor, dfactor int)

func (*Context) GlobalCompositeBlendFuncSeparate

func (c *Context) GlobalCompositeBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha int)

func (*Context) GlobalCompositeOperation

func (c *Context) GlobalCompositeOperation(op int)

func (*Context) ImagePattern

func (c *Context) ImagePattern(ox, oy, ex, ey, angle float64, image_ int, alpha float64) Paint

func (*Context) ImageSize

func (c *Context) ImageSize(image_ int) (w, h int)

func (*Context) IntersectScissor

func (c *Context) IntersectScissor(x, y, w, h float64)

func (*Context) LineCap

func (c *Context) LineCap(cap LineCap)

func (*Context) LineJoin

func (c *Context) LineJoin(join LineCap)

func (*Context) LineTo

func (c *Context) LineTo(x, y float64)

func (*Context) LinearGradient

func (c *Context) LinearGradient(sx, sy, ex, ey float64, icol, ocol color.RGBA) Paint

func (*Context) MiterLimit

func (c *Context) MiterLimit(limit float64)

func (*Context) MoveTo

func (c *Context) MoveTo(x, y float64)

func (*Context) QuadTo

func (c *Context) QuadTo(cx, cy, x, y float64)

func (*Context) RadialGradient

func (c *Context) RadialGradient(cx, cy, inr, outr float64, icol, ocol color.RGBA) Paint

func (*Context) Rect

func (c *Context) Rect(x, y, w, h float64)

func (*Context) Reset

func (c *Context) Reset()

func (*Context) ResetScissor

func (c *Context) ResetScissor()

func (*Context) ResetTransform

func (c *Context) ResetTransform()

func (*Context) Restore

func (c *Context) Restore()

func (*Context) Rotate

func (c *Context) Rotate(angle float64)

func (*Context) RoundedRect

func (c *Context) RoundedRect(x, y, w, h, r float64)

func (*Context) RoundedRectVarying

func (c *Context) RoundedRectVarying(x, y, w, h, radTopLeft, radTopRight, radBottomRight, radBottomLeft float64)

func (*Context) Save

func (c *Context) Save()

func (*Context) Scale

func (c *Context) Scale(x, y float64)

func (*Context) Scissor

func (c *Context) Scissor(x, y, w, h float64)

func (*Context) SkewX

func (c *Context) SkewX(angle float64)

func (*Context) SkewY

func (c *Context) SkewY(angle float64)

func (*Context) Stroke

func (c *Context) Stroke()

func (*Context) StrokeColor

func (c *Context) StrokeColor(p color.RGBA)

func (*Context) StrokePaint

func (c *Context) StrokePaint(p Paint)

func (*Context) StrokeWidth

func (c *Context) StrokeWidth(size float64)

func (*Context) Text

func (c *Context) Text(x, y float64, str string, end int) float64

func (*Context) TextAlign

func (c *Context) TextAlign(align Align)

func (*Context) TextBounds

func (c *Context) TextBounds(x, y float64, str string, end int) (measured, xmin, ymin, xmax, ymax float64)

func (*Context) TextBox

func (c *Context) TextBox(x, y, breakRowWidth float64, str string, end int)

func (*Context) TextBoxBounds

func (c *Context) TextBoxBounds(x, y, breakRowWidth float64, str string, end int) (xmin, ymin, xmax, ymax float64)

func (*Context) TextLetterSpacing

func (c *Context) TextLetterSpacing(spacing float64)

func (*Context) TextLineHeight

func (c *Context) TextLineHeight(lineHeight float64)

func (*Context) TextMetrics

func (c *Context) TextMetrics() (ascender, descender, lineh float64)

func (*Context) Transform

func (c *Context) Transform(a, b, c_, d, e, f float64)

func (*Context) Translate

func (c *Context) Translate(x, y float64)

type CreateFlags

type CreateFlags C.enum_NVGcreateFlags
const (
	ANTIALIAS       CreateFlags = C.NVG_ANTIALIAS
	STENCIL_STROKES CreateFlags = C.NVG_STENCIL_STROKES
	DEBUG           CreateFlags = C.NVG_DEBUG
)

type Framebuffer

type Framebuffer C.NVGLUframebuffer

func (*Framebuffer) Delete

func (fb *Framebuffer) Delete()

func (*Framebuffer) Image

func (fb *Framebuffer) Image() int

type GlyphPosition

type GlyphPosition C.NVGglyphPosition

type ImageFlags

type ImageFlags C.enum_NVGimageFlags
const (
	IMAGE_GENERATE_MIPMAPS ImageFlags = C.NVG_IMAGE_GENERATE_MIPMAPS
	IMAGE_REPEATX          ImageFlags = C.NVG_IMAGE_REPEATX
	IMAGE_REPEATY          ImageFlags = C.NVG_IMAGE_REPEATY
	IMAGE_FLIPY            ImageFlags = C.NVG_IMAGE_FLIPY
	IMAGE_PREMULTIPLIED    ImageFlags = C.NVG_IMAGE_PREMULTIPLIED
	IMAGE_NEAREST          ImageFlags = C.NVG_IMAGE_NEAREST
)

type LineCap

type LineCap C.enum_NVGlineCap
const (
	BUTT   LineCap = C.NVG_BUTT
	ROUND  LineCap = C.NVG_ROUND
	SQUARE LineCap = C.NVG_SQUARE
	BEVEL  LineCap = C.NVG_BEVEL
	MITER  LineCap = C.NVG_MITER
)

type Paint

type Paint C.NVGpaint

type Solidity

type Solidity C.enum_NVGsolidity
const (
	SOLID Solidity = C.NVG_SOLID
	HOLE  Solidity = C.NVG_HOLE
)

type TextRow

type TextRow C.NVGtextRow

type Winding

type Winding C.enum_NVGwinding
const (
	CCW Winding = C.NVG_CCW
	CW  Winding = C.NVG_CW
)

Jump to

Keyboard shortcuts

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