Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions vg/recorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ type Canvas struct {
// This includes source filename and line number.
KeepCaller bool

// c holds a backing vg.Canvas. If c is non-nil
// then method calls to the Canvas will be
// reflected to c.
c vg.Canvas

// fonts holds a collection of font/size descriptions.
fonts map[fontID]font.Face
cache *font.Cache
Expand Down Expand Up @@ -78,7 +73,7 @@ func (c *Canvas) Reset() {
c.Actions = c.Actions[:0]
}

// ReplayOn applies the set of Actions recorded by the Recorder onto
// ReplayOn applies the set of Actions recorded by the Canvas onto
// the destination Canvas.
func (c *Canvas) ReplayOn(dst vg.Canvas) error {
if c.fonts == nil {
Expand Down Expand Up @@ -112,9 +107,6 @@ func (c *Canvas) ReplayOn(dst vg.Canvas) error {
}

func (c *Canvas) append(a Action) {
if c.c != nil {
a.ApplyTo(c)
}
if c.KeepCaller {
a.callerLocation().set()
}
Expand Down Expand Up @@ -460,7 +452,7 @@ type Commenter interface {

var _ Commenter = (*Canvas)(nil)

// Comment implements a Recorder comment mechanism.
// Comment implements a comment mechanism.
type Comment struct {
Text string

Expand Down