Documentation ¶
Overview ¶
Package paint is to define a custom CSS <image> in code, which will respond to style and size changes.
Index ¶
- type PaintRenderingContext2D
- func (_this *PaintRenderingContext2D) Arc(x float64, y float64, radius float64, startAngle float64, endAngle float64, ...)
- func (_this *PaintRenderingContext2D) ArcTo(x1 float64, y1 float64, x2 float64, y2 float64, radius float64)
- func (_this *PaintRenderingContext2D) BeginPath()
- func (_this *PaintRenderingContext2D) BezierCurveTo(cp1x float64, cp1y float64, cp2x float64, cp2y float64, x float64, y float64)
- func (_this *PaintRenderingContext2D) ClearRect(x float64, y float64, w float64, h float64)
- func (_this *PaintRenderingContext2D) Clip(fillRule *canvas.CanvasFillRule)
- func (_this *PaintRenderingContext2D) Clip2(path *canvas.Path2D, fillRule *canvas.CanvasFillRule)
- func (_this *PaintRenderingContext2D) ClosePath()
- func (_this *PaintRenderingContext2D) CreateLinearGradient(x0 float64, y0 float64, x1 float64, y1 float64) (_result *canvas.CanvasGradient)
- func (_this *PaintRenderingContext2D) CreatePattern(image *Union, repetition string) (_result *canvas.CanvasPattern)
- func (_this *PaintRenderingContext2D) CreateRadialGradient(x0 float64, y0 float64, r0 float64, x1 float64, y1 float64, r1 float64) (_result *canvas.CanvasGradient)
- func (_this *PaintRenderingContext2D) DrawImage(image *Union, dx float64, dy float64)
- func (_this *PaintRenderingContext2D) DrawImage2(image *Union, dx float64, dy float64, dw float64, dh float64)
- func (_this *PaintRenderingContext2D) DrawImage3(image *Union, sx float64, sy float64, sw float64, sh float64, dx float64, ...)
- func (_this *PaintRenderingContext2D) Ellipse(x float64, y float64, radiusX float64, radiusY float64, rotation float64, ...)
- func (_this *PaintRenderingContext2D) Fill(fillRule *canvas.CanvasFillRule)
- func (_this *PaintRenderingContext2D) Fill2(path *canvas.Path2D, fillRule *canvas.CanvasFillRule)
- func (_this *PaintRenderingContext2D) FillRect(x float64, y float64, w float64, h float64)
- func (_this *PaintRenderingContext2D) FillStyle() *Union
- func (_this *PaintRenderingContext2D) GetLineDash() (_result []float64)
- func (_this *PaintRenderingContext2D) GetTransform() (_result *geometry.DOMMatrix)
- func (_this *PaintRenderingContext2D) GlobalAlpha() float64
- func (_this *PaintRenderingContext2D) GlobalCompositeOperation() string
- func (_this *PaintRenderingContext2D) ImageSmoothingEnabled() bool
- func (_this *PaintRenderingContext2D) ImageSmoothingQuality() canvas.ImageSmoothingQuality
- func (_this *PaintRenderingContext2D) IsPointInPath(x float64, y float64, fillRule *canvas.CanvasFillRule) (_result bool)
- func (_this *PaintRenderingContext2D) IsPointInPath2(path *canvas.Path2D, x float64, y float64, fillRule *canvas.CanvasFillRule) (_result bool)
- func (_this *PaintRenderingContext2D) IsPointInStroke(x float64, y float64) (_result bool)
- func (_this *PaintRenderingContext2D) IsPointInStroke2(path *canvas.Path2D, x float64, y float64) (_result bool)
- func (_this *PaintRenderingContext2D) JSValue() js.Value
- func (_this *PaintRenderingContext2D) LineCap() canvas.CanvasLineCap
- func (_this *PaintRenderingContext2D) LineDashOffset() float64
- func (_this *PaintRenderingContext2D) LineJoin() canvas.CanvasLineJoin
- func (_this *PaintRenderingContext2D) LineTo(x float64, y float64)
- func (_this *PaintRenderingContext2D) LineWidth() float64
- func (_this *PaintRenderingContext2D) MiterLimit() float64
- func (_this *PaintRenderingContext2D) MoveTo(x float64, y float64)
- func (_this *PaintRenderingContext2D) QuadraticCurveTo(cpx float64, cpy float64, x float64, y float64)
- func (_this *PaintRenderingContext2D) Rect(x float64, y float64, w float64, h float64)
- func (_this *PaintRenderingContext2D) ResetTransform()
- func (_this *PaintRenderingContext2D) Restore()
- func (_this *PaintRenderingContext2D) Rotate(angle float64)
- func (_this *PaintRenderingContext2D) Save()
- func (_this *PaintRenderingContext2D) Scale(x float64, y float64)
- func (_this *PaintRenderingContext2D) SetFillStyle(value *Union)
- func (_this *PaintRenderingContext2D) SetGlobalAlpha(value float64)
- func (_this *PaintRenderingContext2D) SetGlobalCompositeOperation(value string)
- func (_this *PaintRenderingContext2D) SetImageSmoothingEnabled(value bool)
- func (_this *PaintRenderingContext2D) SetImageSmoothingQuality(value canvas.ImageSmoothingQuality)
- func (_this *PaintRenderingContext2D) SetLineCap(value canvas.CanvasLineCap)
- func (_this *PaintRenderingContext2D) SetLineDash(segments []float64)
- func (_this *PaintRenderingContext2D) SetLineDashOffset(value float64)
- func (_this *PaintRenderingContext2D) SetLineJoin(value canvas.CanvasLineJoin)
- func (_this *PaintRenderingContext2D) SetLineWidth(value float64)
- func (_this *PaintRenderingContext2D) SetMiterLimit(value float64)
- func (_this *PaintRenderingContext2D) SetShadowBlur(value float64)
- func (_this *PaintRenderingContext2D) SetShadowColor(value string)
- func (_this *PaintRenderingContext2D) SetShadowOffsetX(value float64)
- func (_this *PaintRenderingContext2D) SetShadowOffsetY(value float64)
- func (_this *PaintRenderingContext2D) SetStrokeStyle(value *Union)
- func (_this *PaintRenderingContext2D) SetTransform(a float64, b float64, c float64, d float64, e float64, f float64)
- func (_this *PaintRenderingContext2D) SetTransform2(transform *geometry.DOMMatrix2DInit)
- func (_this *PaintRenderingContext2D) ShadowBlur() float64
- func (_this *PaintRenderingContext2D) ShadowColor() string
- func (_this *PaintRenderingContext2D) ShadowOffsetX() float64
- func (_this *PaintRenderingContext2D) ShadowOffsetY() float64
- func (_this *PaintRenderingContext2D) Stroke()
- func (_this *PaintRenderingContext2D) Stroke2(path *canvas.Path2D)
- func (_this *PaintRenderingContext2D) StrokeRect(x float64, y float64, w float64, h float64)
- func (_this *PaintRenderingContext2D) StrokeStyle() *Union
- func (_this *PaintRenderingContext2D) Transform(a float64, b float64, c float64, d float64, e float64, f float64)
- func (_this *PaintRenderingContext2D) Translate(x float64, y float64)
- type PaintRenderingContext2DSettings
- type PaintSize
- type PaintWorkletGlobalScope
- type Union
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaintRenderingContext2D ¶
type PaintRenderingContext2D struct { // Value_JS holds a reference to a javascript value Value_JS js.Value }
class: PaintRenderingContext2D
func PaintRenderingContext2DFromJS ¶
func PaintRenderingContext2DFromJS(value js.Value) *PaintRenderingContext2D
PaintRenderingContext2DFromJS is casting a js.Value into PaintRenderingContext2D.
func PaintRenderingContext2DFromWrapper ¶
func PaintRenderingContext2DFromWrapper(input core.Wrapper) *PaintRenderingContext2D
PaintRenderingContext2DFromJS is casting from something that holds a js.Value into PaintRenderingContext2D.
func (*PaintRenderingContext2D) BeginPath ¶
func (_this *PaintRenderingContext2D) BeginPath()
func (*PaintRenderingContext2D) BezierCurveTo ¶
func (*PaintRenderingContext2D) ClearRect ¶
func (_this *PaintRenderingContext2D) ClearRect(x float64, y float64, w float64, h float64)
func (*PaintRenderingContext2D) Clip ¶
func (_this *PaintRenderingContext2D) Clip(fillRule *canvas.CanvasFillRule)
func (*PaintRenderingContext2D) Clip2 ¶
func (_this *PaintRenderingContext2D) Clip2(path *canvas.Path2D, fillRule *canvas.CanvasFillRule)
func (*PaintRenderingContext2D) ClosePath ¶
func (_this *PaintRenderingContext2D) ClosePath()
func (*PaintRenderingContext2D) CreateLinearGradient ¶
func (_this *PaintRenderingContext2D) CreateLinearGradient(x0 float64, y0 float64, x1 float64, y1 float64) (_result *canvas.CanvasGradient)
func (*PaintRenderingContext2D) CreatePattern ¶
func (_this *PaintRenderingContext2D) CreatePattern(image *Union, repetition string) (_result *canvas.CanvasPattern)
func (*PaintRenderingContext2D) CreateRadialGradient ¶
func (_this *PaintRenderingContext2D) CreateRadialGradient(x0 float64, y0 float64, r0 float64, x1 float64, y1 float64, r1 float64) (_result *canvas.CanvasGradient)
func (*PaintRenderingContext2D) DrawImage ¶
func (_this *PaintRenderingContext2D) DrawImage(image *Union, dx float64, dy float64)
func (*PaintRenderingContext2D) DrawImage2 ¶
func (*PaintRenderingContext2D) DrawImage3 ¶
func (*PaintRenderingContext2D) Fill ¶
func (_this *PaintRenderingContext2D) Fill(fillRule *canvas.CanvasFillRule)
func (*PaintRenderingContext2D) Fill2 ¶
func (_this *PaintRenderingContext2D) Fill2(path *canvas.Path2D, fillRule *canvas.CanvasFillRule)
func (*PaintRenderingContext2D) FillRect ¶
func (_this *PaintRenderingContext2D) FillRect(x float64, y float64, w float64, h float64)
func (*PaintRenderingContext2D) FillStyle ¶
func (_this *PaintRenderingContext2D) FillStyle() *Union
FillStyle returning attribute 'fillStyle' with type Union (idl: Union).
func (*PaintRenderingContext2D) GetLineDash ¶
func (_this *PaintRenderingContext2D) GetLineDash() (_result []float64)
func (*PaintRenderingContext2D) GetTransform ¶
func (_this *PaintRenderingContext2D) GetTransform() (_result *geometry.DOMMatrix)
func (*PaintRenderingContext2D) GlobalAlpha ¶
func (_this *PaintRenderingContext2D) GlobalAlpha() float64
GlobalAlpha returning attribute 'globalAlpha' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) GlobalCompositeOperation ¶
func (_this *PaintRenderingContext2D) GlobalCompositeOperation() string
GlobalCompositeOperation returning attribute 'globalCompositeOperation' with type string (idl: DOMString).
func (*PaintRenderingContext2D) ImageSmoothingEnabled ¶
func (_this *PaintRenderingContext2D) ImageSmoothingEnabled() bool
ImageSmoothingEnabled returning attribute 'imageSmoothingEnabled' with type bool (idl: boolean).
func (*PaintRenderingContext2D) ImageSmoothingQuality ¶
func (_this *PaintRenderingContext2D) ImageSmoothingQuality() canvas.ImageSmoothingQuality
ImageSmoothingQuality returning attribute 'imageSmoothingQuality' with type canvas.ImageSmoothingQuality (idl: ImageSmoothingQuality).
func (*PaintRenderingContext2D) IsPointInPath ¶
func (_this *PaintRenderingContext2D) IsPointInPath(x float64, y float64, fillRule *canvas.CanvasFillRule) (_result bool)
func (*PaintRenderingContext2D) IsPointInPath2 ¶
func (_this *PaintRenderingContext2D) IsPointInPath2(path *canvas.Path2D, x float64, y float64, fillRule *canvas.CanvasFillRule) (_result bool)
func (*PaintRenderingContext2D) IsPointInStroke ¶
func (_this *PaintRenderingContext2D) IsPointInStroke(x float64, y float64) (_result bool)
func (*PaintRenderingContext2D) IsPointInStroke2 ¶
func (*PaintRenderingContext2D) JSValue ¶
func (_this *PaintRenderingContext2D) JSValue() js.Value
JSValue returns the js.Value or js.Null() if _this is nil
func (*PaintRenderingContext2D) LineCap ¶
func (_this *PaintRenderingContext2D) LineCap() canvas.CanvasLineCap
LineCap returning attribute 'lineCap' with type canvas.CanvasLineCap (idl: CanvasLineCap).
func (*PaintRenderingContext2D) LineDashOffset ¶
func (_this *PaintRenderingContext2D) LineDashOffset() float64
LineDashOffset returning attribute 'lineDashOffset' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) LineJoin ¶
func (_this *PaintRenderingContext2D) LineJoin() canvas.CanvasLineJoin
LineJoin returning attribute 'lineJoin' with type canvas.CanvasLineJoin (idl: CanvasLineJoin).
func (*PaintRenderingContext2D) LineTo ¶
func (_this *PaintRenderingContext2D) LineTo(x float64, y float64)
func (*PaintRenderingContext2D) LineWidth ¶
func (_this *PaintRenderingContext2D) LineWidth() float64
LineWidth returning attribute 'lineWidth' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) MiterLimit ¶
func (_this *PaintRenderingContext2D) MiterLimit() float64
MiterLimit returning attribute 'miterLimit' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) MoveTo ¶
func (_this *PaintRenderingContext2D) MoveTo(x float64, y float64)
func (*PaintRenderingContext2D) QuadraticCurveTo ¶
func (_this *PaintRenderingContext2D) QuadraticCurveTo(cpx float64, cpy float64, x float64, y float64)
func (*PaintRenderingContext2D) Rect ¶
func (_this *PaintRenderingContext2D) Rect(x float64, y float64, w float64, h float64)
func (*PaintRenderingContext2D) ResetTransform ¶
func (_this *PaintRenderingContext2D) ResetTransform()
func (*PaintRenderingContext2D) Restore ¶
func (_this *PaintRenderingContext2D) Restore()
func (*PaintRenderingContext2D) Rotate ¶
func (_this *PaintRenderingContext2D) Rotate(angle float64)
func (*PaintRenderingContext2D) Save ¶
func (_this *PaintRenderingContext2D) Save()
func (*PaintRenderingContext2D) Scale ¶
func (_this *PaintRenderingContext2D) Scale(x float64, y float64)
func (*PaintRenderingContext2D) SetFillStyle ¶
func (_this *PaintRenderingContext2D) SetFillStyle(value *Union)
SetFillStyle setting attribute 'fillStyle' with type Union (idl: Union).
func (*PaintRenderingContext2D) SetGlobalAlpha ¶
func (_this *PaintRenderingContext2D) SetGlobalAlpha(value float64)
SetGlobalAlpha setting attribute 'globalAlpha' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetGlobalCompositeOperation ¶
func (_this *PaintRenderingContext2D) SetGlobalCompositeOperation(value string)
SetGlobalCompositeOperation setting attribute 'globalCompositeOperation' with type string (idl: DOMString).
func (*PaintRenderingContext2D) SetImageSmoothingEnabled ¶
func (_this *PaintRenderingContext2D) SetImageSmoothingEnabled(value bool)
SetImageSmoothingEnabled setting attribute 'imageSmoothingEnabled' with type bool (idl: boolean).
func (*PaintRenderingContext2D) SetImageSmoothingQuality ¶
func (_this *PaintRenderingContext2D) SetImageSmoothingQuality(value canvas.ImageSmoothingQuality)
SetImageSmoothingQuality setting attribute 'imageSmoothingQuality' with type canvas.ImageSmoothingQuality (idl: ImageSmoothingQuality).
func (*PaintRenderingContext2D) SetLineCap ¶
func (_this *PaintRenderingContext2D) SetLineCap(value canvas.CanvasLineCap)
SetLineCap setting attribute 'lineCap' with type canvas.CanvasLineCap (idl: CanvasLineCap).
func (*PaintRenderingContext2D) SetLineDash ¶
func (_this *PaintRenderingContext2D) SetLineDash(segments []float64)
func (*PaintRenderingContext2D) SetLineDashOffset ¶
func (_this *PaintRenderingContext2D) SetLineDashOffset(value float64)
SetLineDashOffset setting attribute 'lineDashOffset' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetLineJoin ¶
func (_this *PaintRenderingContext2D) SetLineJoin(value canvas.CanvasLineJoin)
SetLineJoin setting attribute 'lineJoin' with type canvas.CanvasLineJoin (idl: CanvasLineJoin).
func (*PaintRenderingContext2D) SetLineWidth ¶
func (_this *PaintRenderingContext2D) SetLineWidth(value float64)
SetLineWidth setting attribute 'lineWidth' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetMiterLimit ¶
func (_this *PaintRenderingContext2D) SetMiterLimit(value float64)
SetMiterLimit setting attribute 'miterLimit' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetShadowBlur ¶
func (_this *PaintRenderingContext2D) SetShadowBlur(value float64)
SetShadowBlur setting attribute 'shadowBlur' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetShadowColor ¶
func (_this *PaintRenderingContext2D) SetShadowColor(value string)
SetShadowColor setting attribute 'shadowColor' with type string (idl: DOMString).
func (*PaintRenderingContext2D) SetShadowOffsetX ¶
func (_this *PaintRenderingContext2D) SetShadowOffsetX(value float64)
SetShadowOffsetX setting attribute 'shadowOffsetX' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetShadowOffsetY ¶
func (_this *PaintRenderingContext2D) SetShadowOffsetY(value float64)
SetShadowOffsetY setting attribute 'shadowOffsetY' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) SetStrokeStyle ¶
func (_this *PaintRenderingContext2D) SetStrokeStyle(value *Union)
SetStrokeStyle setting attribute 'strokeStyle' with type Union (idl: Union).
func (*PaintRenderingContext2D) SetTransform ¶
func (*PaintRenderingContext2D) SetTransform2 ¶
func (_this *PaintRenderingContext2D) SetTransform2(transform *geometry.DOMMatrix2DInit)
func (*PaintRenderingContext2D) ShadowBlur ¶
func (_this *PaintRenderingContext2D) ShadowBlur() float64
ShadowBlur returning attribute 'shadowBlur' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) ShadowColor ¶
func (_this *PaintRenderingContext2D) ShadowColor() string
ShadowColor returning attribute 'shadowColor' with type string (idl: DOMString).
func (*PaintRenderingContext2D) ShadowOffsetX ¶
func (_this *PaintRenderingContext2D) ShadowOffsetX() float64
ShadowOffsetX returning attribute 'shadowOffsetX' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) ShadowOffsetY ¶
func (_this *PaintRenderingContext2D) ShadowOffsetY() float64
ShadowOffsetY returning attribute 'shadowOffsetY' with type float64 (idl: unrestricted double).
func (*PaintRenderingContext2D) Stroke ¶
func (_this *PaintRenderingContext2D) Stroke()
func (*PaintRenderingContext2D) Stroke2 ¶
func (_this *PaintRenderingContext2D) Stroke2(path *canvas.Path2D)
func (*PaintRenderingContext2D) StrokeRect ¶
func (_this *PaintRenderingContext2D) StrokeRect(x float64, y float64, w float64, h float64)
func (*PaintRenderingContext2D) StrokeStyle ¶
func (_this *PaintRenderingContext2D) StrokeStyle() *Union
StrokeStyle returning attribute 'strokeStyle' with type Union (idl: Union).
func (*PaintRenderingContext2D) Translate ¶
func (_this *PaintRenderingContext2D) Translate(x float64, y float64)
type PaintRenderingContext2DSettings ¶
type PaintRenderingContext2DSettings struct {
Alpha bool
}
dictionary: PaintRenderingContext2DSettings
func PaintRenderingContext2DSettingsFromJS ¶
func PaintRenderingContext2DSettingsFromJS(value js.Value) *PaintRenderingContext2DSettings
PaintRenderingContext2DSettingsFromJS is allocating a new PaintRenderingContext2DSettings object and copy all values in the value javascript object.
func (*PaintRenderingContext2DSettings) JSValue ¶
func (_this *PaintRenderingContext2DSettings) JSValue() js.Value
JSValue is allocating a new javascript object and copy all values
type PaintSize ¶
class: PaintSize
func PaintSizeFromJS ¶
PaintSizeFromJS is casting a js.Value into PaintSize.
func PaintSizeFromWrapper ¶
PaintSizeFromJS is casting from something that holds a js.Value into PaintSize.
type PaintWorkletGlobalScope ¶
type PaintWorkletGlobalScope struct {
worklets.WorkletGlobalScope
}
class: PaintWorkletGlobalScope
func PaintWorkletGlobalScopeFromJS ¶
func PaintWorkletGlobalScopeFromJS(value js.Value) *PaintWorkletGlobalScope
PaintWorkletGlobalScopeFromJS is casting a js.Value into PaintWorkletGlobalScope.
func PaintWorkletGlobalScopeFromWrapper ¶
func PaintWorkletGlobalScopeFromWrapper(input core.Wrapper) *PaintWorkletGlobalScope
PaintWorkletGlobalScopeFromJS is casting from something that holds a js.Value into PaintWorkletGlobalScope.
func (*PaintWorkletGlobalScope) DevicePixelRatio ¶
func (_this *PaintWorkletGlobalScope) DevicePixelRatio() float64
DevicePixelRatio returning attribute 'devicePixelRatio' with type float64 (idl: unrestricted double).
func (*PaintWorkletGlobalScope) RegisterPaint ¶
func (_this *PaintWorkletGlobalScope) RegisterPaint(name string, paintCtor *webidl.VoidFunction)