// Convenient Drawing Functions
// Clear fills the entire image with the current color.
963753
func (dc *Context) Clear() {
	src := image.NewUniform(dc.color)
	draw.Draw(dc.im, dc.im.Bounds(), src, image.ZP, draw.Src)
}
1116929
func (s *LoginSession) Clear() error {
	if s == nil {
		return nil
	}
	if !s.loaded {
		return ErrLoginSessionNotLoaded
	}
	s.loginSession = nil
	s.loginSessionB64 = ""
	s.cleared = true
	return nil
}
1305269
func (set *Set) Clear() {
	set.lock.Lock()

	set.items = map[interface{}]struct{}{}

	set.lock.Unlock()
}
602557
func (c *writer) clear() {
	if c.lines != 0 {
		fmt.Fprintf(c.out, moveCursorUp, c.lines)
	}
	c.lines = 0
}
613696
func (c *BufferLRU) Clear() {
	c.mut.Lock()
	defer c.mut.Unlock()

	c.ll = nil
	c.cache = nil
	c.actualSize = 0
}
574981
func (c *InputModal) Clear() {
	c.title = ""
	c.text = ""
	c.input.SetValue("")
	c.isDone = false
	c.isVisible = false
}
72394
func (as *AttributeSource) Clear() {
	for state := as.currentState(); state != nil; state = state.next {
		state.attribute.Clear()
	}
}
146307
func (r *AutoVXLANCfgResource) Clear() error {
	key := fmt.Sprintf(vXLANResourceConfigPath, r.ID)
	return r.StateDriver.ClearState(key)
}
1320360
func (e *Element) Clear() error {
	e.lock.RLock()
	defer e.lock.RUnlock()

	var err error

	if !e.ready {
		return &ElementNotReadyErr{}
	}

	if e.nodeName == "textarea" {
		_, err = e.tab.DOM.SetNodeValue(e.id, "")
	} else if e.nodeName == "input" {
		_, err = e.tab.DOM.SetAttributeValue(e.id, "value", "")
	} else {
		err = &IncorrectElementTypeErr{ExpectedName: "textarea or input", NodeName: e.nodeName}
	}
	return err
}
441821
func (t *Tree) Clear() {
	if t.r == nil {
		return
	}

	clr(t.r)
	t.c, t.first, t.last, t.r = 0, nil, nil, nil
	t.ver++
}
831321
func (mem *memNamedMapping) Clear() {
	names := mem.ListAllNames()
	for _, item := range names {
		mem.removeNameIdxSync(item)
	}
}
1066386
func (stats *Stats) Clear() {
	stats.durations = stats.durations[:0]
	stats.histogram = nil
	stats.dirty = false
	stats.result = BenchResults{}
}
773693
func (s *UniformSample) Clear() {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.count = 0
	s.values = make([]int64, 0, s.reservoirSize)
}
1308242
func (w *Writer) Clear() {
	f, ok := io.Writer(w.Out).(*os.File)
	if ok && !isatty.IsTerminal(f.Fd()) {
		ok = false
	}
	if !ok {
		for i := 0; i < w.lineCount; i++ {
			fmt.Fprintf(w.Out, "%c[%dA", esc, 0) // move the cursor up
			fmt.Fprintf(w.Out, "%c[2K\r", esc)   // clear the line
		}
		return
	}
	fd := f.Fd()
	var csbi consoleScreenBufferInfo
	procGetConsoleScreenBufferInfo.Call(fd, uintptr(unsafe.Pointer(&csbi)))

	for i := 0; i < w.lineCount; i++ {
		// move the cursor up
		csbi.cursorPosition.y--
		procSetConsoleCursorPosition.Call(fd, uintptr(*(*int32)(unsafe.Pointer(&csbi.cursorPosition))))
		// clear the line
		cursor := coord{
			x: csbi.window.left,
			y: csbi.window.top + csbi.cursorPosition.y,
		}
		var count, w dword
		count = dword(csbi.size.x)
		procFillConsoleOutputCharacter.Call(fd, uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&w)))
	}
	w.lineCount = 0
}
815613
func (s *SvcProvider) Clear() error {
	key := fmt.Sprintf(svcProviderPath, s.ID)
	err := s.StateDriver.ClearState(key)
	return err
}
1236190
func (r *RegionSet) Clear() {
	r.lock.Lock()
	defer r.lock.Unlock()
	r.regions = r.regions[0:0]
	r.flush()
}
444888
func (g *Oper) Clear() error {
	key := operGlobalPath
	return g.StateDriver.ClearState(key)
}