Documentation
¶
Index ¶
- type Align
- type BlendFactor
- type CompositeOp
- type Context
- func (c *Context) AddFallbackFont(baseFont, fallbackFont string) error
- func (c *Context) AddFallbackFontID(baseFont, fallbackFont int) error
- func (c *Context) Arc(cx, cy, r, a0, a1 float64, dir int)
- func (c *Context) ArcTo(x1, y1, x2, y2, radius float64)
- func (c *Context) BeginFrame(width, height, aspect float64)
- func (c *Context) BeginPath()
- func (c *Context) BezierTo(c1x, c1y, c2x, c2y, x, y float64)
- func (c *Context) BindFramebuffer(fb *Framebuffer)
- func (c *Context) BoxGradient(x, y, w, h, r, f float64, icol, ocol color.RGBA) Paint
- func (c *Context) CancelFrame()
- func (c *Context) Circle(cx, cy, r float64)
- func (c *Context) ClosePath()
- func (c *Context) CreateFont(name, filename string) error
- func (c *Context) CreateFontMem(name string, data []byte) error
- func (c *Context) CreateFramebuffer(w, h int, imageFlags ImageFlags) (*Framebuffer, error)
- func (c *Context) CreateImage(name string, flags ImageFlags) (int, error)
- func (c *Context) DeleteImage(image_ int)
- func (c *Context) Ellipse(cx, cy, rx, ry float64)
- func (c *Context) EndFrame()
- func (c *Context) Fill()
- func (c *Context) FillColor(p color.RGBA)
- func (c *Context) FillPaint(p Paint)
- func (c *Context) FindFont(name string) int
- func (c *Context) FontBlur(blur float64)
- func (c *Context) FontFace(name string)
- func (c *Context) FontFaceID(font int)
- func (c *Context) FontSize(size float64)
- func (c *Context) GlobalAlpha(alpha float64)
- func (c *Context) GlobalCompositeBlendFunc(sfactor, dfactor int)
- func (c *Context) GlobalCompositeBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha int)
- func (c *Context) GlobalCompositeOperation(op int)
- func (c *Context) ImagePattern(ox, oy, ex, ey, angle float64, image_ int, alpha float64) Paint
- func (c *Context) ImageSize(image_ int) (w, h int)
- func (c *Context) IntersectScissor(x, y, w, h float64)
- func (c *Context) LineCap(cap LineCap)
- func (c *Context) LineJoin(join LineCap)
- func (c *Context) LineTo(x, y float64)
- func (c *Context) LinearGradient(sx, sy, ex, ey float64, icol, ocol color.RGBA) Paint
- func (c *Context) MiterLimit(limit float64)
- func (c *Context) MoveTo(x, y float64)
- func (c *Context) QuadTo(cx, cy, x, y float64)
- func (c *Context) RadialGradient(cx, cy, inr, outr float64, icol, ocol color.RGBA) Paint
- func (c *Context) Rect(x, y, w, h float64)
- func (c *Context) Reset()
- func (c *Context) ResetScissor()
- func (c *Context) ResetTransform()
- func (c *Context) Restore()
- func (c *Context) Rotate(angle float64)
- func (c *Context) RoundedRect(x, y, w, h, r float64)
- func (c *Context) RoundedRectVarying(x, y, w, h, radTopLeft, radTopRight, radBottomRight, radBottomLeft float64)
- func (c *Context) Save()
- func (c *Context) Scale(x, y float64)
- func (c *Context) Scissor(x, y, w, h float64)
- func (c *Context) SkewX(angle float64)
- func (c *Context) SkewY(angle float64)
- func (c *Context) Stroke()
- func (c *Context) StrokeColor(p color.RGBA)
- func (c *Context) StrokePaint(p Paint)
- func (c *Context) StrokeWidth(size float64)
- func (c *Context) Text(x, y float64, str string, end int) float64
- func (c *Context) TextAlign(align Align)
- func (c *Context) TextBounds(x, y float64, str string, end int) (measured, xmin, ymin, xmax, ymax float64)
- func (c *Context) TextBox(x, y, breakRowWidth float64, str string, end int)
- func (c *Context) TextBoxBounds(x, y, breakRowWidth float64, str string, end int) (xmin, ymin, xmax, ymax float64)
- func (c *Context) TextLetterSpacing(spacing float64)
- func (c *Context) TextLineHeight(lineHeight float64)
- func (c *Context) TextMetrics() (ascender, descender, lineh float64)
- func (c *Context) Transform(a, b, c_, d, e, f float64)
- func (c *Context) Translate(x, y float64)
- type CreateFlags
- type Framebuffer
- type GlyphPosition
- type ImageFlags
- type LineCap
- type Paint
- type Solidity
- type TextRow
- type Winding
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 CompositeOp ¶
type CompositeOp C.enum_NVGcompositeOperation
const ( SOURCE_OVER CompositeOp = C.NVG_SOURCE_OVER SOURCE_IN CompositeOp = C.NVG_SOURCE_IN SOURCE_OUT CompositeOp = C.NVG_SOURCE_OUT ATOP CompositeOp = C.NVG_ATOP DESTINATION_OVER CompositeOp = C.NVG_DESTINATION_OVER DESTINATION_IN CompositeOp = C.NVG_DESTINATION_IN DESTINATION_OUT CompositeOp = C.NVG_DESTINATION_OUT DESTINATION_ATOP CompositeOp = C.NVG_DESTINATION_ATOP LIGHTER CompositeOp = C.NVG_LIGHTER COPY CompositeOp = C.NVG_COPY XOR CompositeOp = C.NVG_XOR )
type Context ¶
type Context C.NVGcontext
func CreateGL3 ¶
func CreateGL3(flags CreateFlags) (*Context, error)
func (*Context) AddFallbackFont ¶
func (*Context) AddFallbackFontID ¶
func (*Context) BeginFrame ¶
func (*Context) BindFramebuffer ¶
func (c *Context) BindFramebuffer(fb *Framebuffer)
func (*Context) BoxGradient ¶
func (*Context) CancelFrame ¶
func (c *Context) CancelFrame()
func (*Context) CreateFont ¶
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 (*Context) FontFaceID ¶
func (*Context) GlobalAlpha ¶
func (*Context) GlobalCompositeBlendFunc ¶
func (*Context) GlobalCompositeBlendFuncSeparate ¶
func (*Context) GlobalCompositeOperation ¶
func (*Context) ImagePattern ¶
func (*Context) IntersectScissor ¶
func (*Context) LinearGradient ¶
func (*Context) MiterLimit ¶
func (*Context) RadialGradient ¶
func (*Context) ResetScissor ¶
func (c *Context) ResetScissor()
func (*Context) ResetTransform ¶
func (c *Context) ResetTransform()
func (*Context) RoundedRect ¶
func (*Context) RoundedRectVarying ¶
func (*Context) StrokeColor ¶
func (*Context) StrokePaint ¶
func (*Context) StrokeWidth ¶
func (*Context) TextBounds ¶
func (*Context) TextBoxBounds ¶
func (*Context) TextLetterSpacing ¶
func (*Context) TextLineHeight ¶
func (*Context) TextMetrics ¶
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
type Solidity ¶
type Solidity C.enum_NVGsolidity
type TextRow ¶
type TextRow C.NVGtextRow
Click to show internal directories.
Click to hide internal directories.