示例#1
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Comment) ApplyTo(c vg.Canvas) {
	if c, ok := c.(Commenter); ok {
		c.Comment(a.Text)
	}
}
示例#2
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Fill) ApplyTo(c vg.Canvas) {
	c.Fill(a.Path)
}
示例#3
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *FillString) ApplyTo(c vg.Canvas) {
	c.FillString(a.fonts[fontID{name: a.Font, size: a.Size}], a.X, a.Y, a.String)
}
示例#4
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Pop) ApplyTo(c vg.Canvas) {
	c.Pop()
}
示例#5
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Stroke) ApplyTo(c vg.Canvas) {
	c.Stroke(a.Path)
}
示例#6
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Scale) ApplyTo(c vg.Canvas) {
	c.Scale(a.X, a.Y)
}
示例#7
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Push) ApplyTo(c vg.Canvas) {
	c.Push()
}
示例#8
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Translate) ApplyTo(c vg.Canvas) {
	c.Translate(a.X, a.Y)
}
示例#9
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *Rotate) ApplyTo(c vg.Canvas) {
	c.Rotate(a.Angle)
}
示例#10
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *SetColor) ApplyTo(c vg.Canvas) {
	c.SetColor(a.Color)
}
示例#11
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *SetLineDash) ApplyTo(c vg.Canvas) {
	c.SetLineDash(a.Dashes, a.Offsets)
}
示例#12
0
文件: recorder.go 项目: skiesel/plot
// ApplyTo applies the action to the given vg.Canvas.
func (a *SetLineWidth) ApplyTo(c vg.Canvas) {
	c.SetLineWidth(a.Width)
}