// Set sets a pixel in the display buffer.
486034
func (s *SSD1306Driver) Set(x, y, c int) {
	s.buffer.SetPixel(x, y, c)
}
174579
func (i *Uint16) Set(value uint16) {
	i.lock.Lock()
	defer i.lock.Unlock()
	i.increment = value
}
742582
func (o *Offset) Set(offset interface{}) error {
	n, err := NewOffset(offset)

	if err == nil {
		*o = n
	}

	return err
}
52987
func (vector *BitVector) Set(bit byte, index int) {
	vector.indexAssert(index)
	byteIndex := uint32(index >> 3)
	byteOffset := uint32(index % 8)

	oldByte := vector.data[byteIndex]

	var newByte byte
	if bit == 1 {
		// turn on the byteOffset'th bit
		newByte = oldByte | 1<<byteOffset
	} else {
		// turn off the byteOffset'th bit
		removeMask := byte(^(1 << byteOffset))
		newByte = oldByte & removeMask
	}
	vector.data[byteIndex] = newByte
}
222965
func (p Pointers) Set(i int) {
	p[uint(i)>>ptrShift] |= 1 << (uint(i) & ptrModMask)
}
530265
func (ttlv *TabletTypeListValue) Set(v string) (err error) {
	*ttlv, err = ParseTabletTypes(v)
	return err
}
1260957
func (surface *Surface) Set(x, y int, c color.Color) {
	pix := surface.Pixels()
	i := int32(y)*surface.Pitch + int32(x)*int32(surface.Format.BytesPerPixel)
	switch surface.Format.Format {
	case PIXELFORMAT_ARGB8888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+0] = col.R
		pix[i+1] = col.G
		pix[i+2] = col.B
		pix[i+3] = col.A
	case PIXELFORMAT_ABGR8888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+3] = col.R
		pix[i+2] = col.G
		pix[i+1] = col.B
		pix[i+0] = col.A
	case PIXELFORMAT_RGB24, PIXELFORMAT_RGB888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+0] = col.B
		pix[i+1] = col.G
		pix[i+2] = col.R
	case PIXELFORMAT_BGR24, PIXELFORMAT_BGR888:
		col := surface.ColorModel().Convert(c).(color.RGBA)
		pix[i+2] = col.R
		pix[i+1] = col.G
		pix[i+0] = col.B
	default:
		panic("Unknown pixel format!")
	}
}
1123381
func (ia *Float64Value) Set(s string) error {
	i, err := strconv.ParseFloat(s, 64)
	if err != nil {
		return err
	}
	*ia = Float64Value(i)
	return nil
}
1231043
func (g Gauge) Set(value float64) {
	for _, gauge := range g {
		gauge.Set(value)
	}
}
201492
func (c *Canvas) SetPixels(pixels []uint8) {
	c.gf.Dirty()

	mainthread.Call(func() {
		tex := c.Texture()
		tex.Begin()
		tex.SetPixels(0, 0, tex.Width(), tex.Height(), pixels)
		tex.End()
	})
}
684076
func (cache *Cache) Set(key string, im *imageserver.Image, params imageserver.Params) error {
	data, err := im.MarshalBinary()
	if err != nil {
		return err
	}
	return cache.setData(key, data)
}
836596
func (i *AtomicInt64) Set(n int64) {
	atomic.StoreInt64(&i.int64, n)
}
681473
func (f *Int64Slice) Set(value string) error {
	tmp, err := strconv.ParseInt(value, 10, 64)
	if err != nil {
		return err
	}
	*f = append(*f, tmp)
	return nil
}
1341446
func (b *Bitmap) Set(index int, value bool) {
	byteIndex := index / 8
	bitMask := byte(1 << (uint(index) & 0x7))
	if value {
		b.data[byteIndex] |= bitMask
	} else {
		b.data[byteIndex] &= 0xff - bitMask
	}
}
145598
func set(m []uint8, n uint64) {
	idx, mask := n>>idxShift, n&idxMask
	m[idx] |= 1 << mask
}
1248342
func (g *PCPGauge) Set(val float64) error {
	g.mutex.Lock()
	defer g.mutex.Unlock()
	return g.set(val)
}
1123908
func (s Int64Slice) Set(v int64) {
	for i := range s {
		s[i] = v
	}
}