Documentation
¶
Overview ¶
Package vgop provides tools to record a set of vector graphics operations.
Index ¶
- Constants
- type Canvas
- func (c *Canvas) DrawImage(rect vg.Rectangle, img image.Image)
- func (c *Canvas) Fill(path vg.Path)
- func (c *Canvas) FillString(font font.Face, pt vg.Point, str string)
- func (c *Canvas) Pop()
- func (c *Canvas) Push()
- func (c *Canvas) ReplayOn(dst vg.Canvas) error
- func (c *Canvas) Reset()
- func (c *Canvas) Rotate(a float64)
- func (c *Canvas) Scale(x, y float64)
- func (c *Canvas) SetColor(col color.Color)
- func (c *Canvas) SetLineDash(dashes []vg.Length, offs vg.Length)
- func (c *Canvas) SetLineWidth(w vg.Length)
- func (c *Canvas) Size() (w, h vg.Length)
- func (c *Canvas) Stroke(path vg.Path)
- func (c *Canvas) Translate(pt vg.Point)
- type JSON
- type Option
Constants ¶
View Source
const ( // DefaultWidth and DefaultHeight are the default canvas // dimensions. DefaultWidth = 4 * vg.Inch DefaultHeight = 4 * vg.Inch )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
Canvas implements vg.Canvas for serialization.
func (*Canvas) FillString ¶
FillString implements the FillString method of the vg.Canvas interface.
func (*Canvas) Pop ¶
func (c *Canvas) Pop()
Pop implements the Pop method of the vg.Canvas interface.
func (*Canvas) Push ¶
func (c *Canvas) Push()
Push implements the Push method of the vg.Canvas interface.
func (*Canvas) ReplayOn ¶
ReplayOn replays the set of vector graphics operations onto the destination canvas.
func (*Canvas) SetLineDash ¶
SetLineDash implements the SetLineDash method of the vg.Canvas interface.
func (*Canvas) SetLineWidth ¶
SetLineWidth implements the SetLineWidth method of the vg.Canvas interface.
type JSON ¶
type JSON struct {
*Canvas
}
JSON implements JSON serialization for vg.Canvas.
func (*JSON) MarshalJSON ¶
func (*JSON) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.