// ResizedMin returns the Rect resized to the given size while keeping the position of the Rect's
// Min.
//
// Sizes of zero area are safe here.
542708
func (r Rect) ResizedMin(size Vec) Rect {
	return Rect{
		Min: r.Min,
		Max: r.Min.Add(size),
	}
}
167590
func (t *TextBar) Resize() {
	t.initialize()
	t.layout()

	t.left.Resize()
	t.center.Resize()
	t.right.Resize()

	t.PostEventWidgetResize(t)
}
246376
func (b *BoxLayout) Resize() {
	b.layout()

	// Now also let the children know we resized.
	for i := range b.cells {
		b.cells[i].widget.Resize()
	}
	b.PostEventWidgetResize(b)
}
43015
func SetRotateSize(rotateSize int64) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetRotateSize(rotateSize)
}
1372582
func (g *Grid) SetMinSize(row, column int) *Grid {
	if row < 0 || column < 0 {
		panic("Invalid minimum row/column size")
	}
	g.minHeight, g.minWidth = row, column
	return g
}
610484
func Resize(buf []byte, o Options) ([]byte, error) {
	return resizer(buf, o)
}
310218
func (msg *Message) Resize(newSize int64) error {
	if newSize > maxAllowedBufferSize || newSize < 0 {
		return fmt.Errorf("Requested new buffer size is invalid. Requested: %d, allowed: 0..%d", newSize, maxAllowedBufferSize)
	}
	if int64(len(msg.Data)) == newSize {
		return nil
	}
	msg.Data = make([]byte, newSize)
	return nil
}
141911
func (s *sizeQueue) monitorSize(outFd uintptr, initialSizes ...*remotecommand.TerminalSize) {
	// send the initial sizes
	for i := range initialSizes {
		if initialSizes[i] != nil {
			s.resizeChan <- *initialSizes[i]
		}
	}

	resizeEvents := make(chan remotecommand.TerminalSize, 1)

	monitorResizeEvents(outFd, resizeEvents, s.stopResizing)

	// listen for resize events in the background
	go func() {
		defer runtime.HandleCrash()

		for {
			select {
			case size, ok := <-resizeEvents:
				if !ok {
					return
				}

				select {
				// try to send the size to resizeChan, but don't block
				case s.resizeChan <- size:
					// send successful
				default:
					// unable to send / no-op
				}
			case <-s.stopResizing:
				return
			}
		}
	}()
}
657195
func (s *PutScheduledUpdateGroupActionInput) SetMinSize(v int64) *PutScheduledUpdateGroupActionInput {
	s.MinSize = &v
	return s
}
989216
func (s *Dynamic) SetSize(n int64) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	s.size = n
	return nil
}
543125
func WmMoveresizeExtra(xu *xgbutil.XUtil, win xproto.Window, direction,
	xRoot, yRoot, button, source int) error {

	return ClientEvent(xu, win, "_NET_WM_MOVERESIZE",
		xRoot, yRoot, direction, button, source)
}
415711
func FormatSize(ss SizeSystem, size int64, short bool) string {
	div, name, shortnm := getUnit(ss, size)
	ds := float64(size) / float64(div)
	numfm := "%.2f"
	if div == 1 {
		numfm = "%.0f"
	}
	if short {
		return fmt.Sprintf(numfm+"%s", ds, shortnm)
	}
	return fmt.Sprintf(numfm+" %s", ds, name)
}
710755
func (p *Padder) Resize(size image.Point) {
	p.widget.Resize(size.Sub(p.padding.Mul(2)))
}
495848
func (t *LinodeService) Resize(linodeId int, planId int) (*LinodeResponse, error) {
	u := &url.Values{}
	u.Add("LinodeID", strconv.Itoa(linodeId))
	u.Add("PlanID", strconv.Itoa(planId))

	v := LinodeResponse{}
	if err := t.client.do("linode.resize", u, &v.Response); err != nil {
		return nil, err
	}

	v.LinodeId.LinodeId = linodeId // hardcode this to input
	return &v, nil
}
1081946
func (i *Image) Resize(spec string) (*Image, error) {
	return i.doWithImageConfig("resize", spec, func(src image.Image, conf imageConfig) (image.Image, error) {
		return imaging.Resize(src, conf.Width, conf.Height, conf.Filter), nil
	})
}
1127654
func (p *Init) Resize(ws console.WinSize) error {
	p.mu.Lock()
	defer p.mu.Unlock()

	if p.console == nil {
		return nil
	}
	return p.console.Resize(ws)
}
275583
func (q *Queue) resize(size int) {
	adjusted := make([]interface{}, size)
	if q.front < q.back {
		// rep not "wrapped" around, one copy suffices
		copy(adjusted, q.rep[q.front:q.back])
	} else {
		// rep is "wrapped" around, need two copies
		n := copy(adjusted, q.rep[q.front:])
		copy(adjusted[n:], q.rep[:q.back])
	}
	q.rep = adjusted
	q.front = 0
	q.back = q.length
}