// Size returns the width and height in character cells of the Text.
434313
func (t *Text) Size() (int, int) {
	if len(t.text) != 0 {
		return t.width, t.height
	}
	return 0, 0
}
104745
func (s *ScanService) Size(size int) *ScanService {
	s.size = &size
	return s
}
741902
func (b *bitmap) size() uintptr {
	return uintptr(len(b.blocks)) * bmBlockWords * uintptrBytes
}
623161
func (res *MCResponse) Size() int {
	return HDR_LEN + len(res.Extras) + len(res.Key) + len(res.Body)
}
792417
func (ix *Reindexer) Size(size int) *Reindexer {
	ix.size = size
	return ix
}
1263239
func (m *MultiMap) Size() int {
	size := 0
	for _, set := range m.m {
		size += len(set)
	}
	return size
}
465548
func (t *TSMReader) Size() uint32 {
	t.mu.RLock()
	size := t.size
	t.mu.RUnlock()
	return uint32(size)
}
1001365
func (p McGroupStatusAnsPayload) Size() int {
	var ansGroupMaskCount int
	for _, mask := range p.Status.AnsGroupMask {
		if mask {
			ansGroupMaskCount++
		}
	}

	return 1 + (5 * ansGroupMaskCount)
}
546720
func (g *Gui) Size() (x, y int) {
	return g.maxX, g.maxY
}
797578
func (n *Node) Size() (uint64, error) {
	return uint64(len(n.RawData())), nil
}
1007964
func (h Headers) Size(e bool) int64 {
	l := 0
	for i := 0; i < len(h); i += 2 {
		if e {
			l += len(encode(h[i])) + 1 + len(encode(h[i+1])) + 1
		} else {
			l += len(h[i]) + 1 + len(h[i+1]) + 1
		}
	}
	return int64(l)
}
898121
func Size() gopter.Gen {
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		return gopter.NewGenResult(genParams.MaxSize, IntShrinker)
	}
}
792692
func (m *DummyMessage) Size() uint32 {
	hdrStr := fmt.Sprintf("%s\r\n", m.Header())
	return uint32(len(hdrStr)) + uint32(len(m.Body()))
}
699223
func (p *Padder) Size() image.Point {
	return p.widget.Size().Add(p.padding.Mul(2))
}
1332063
func (t *Termbox) Size() (int, int) {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	return termbox.Size()
}
501569
func (b *SearchRequestBuilder) Size(size int) *SearchRequestBuilder {
	b.size = size
	return b
}
1129219
func (t Text) Height() float32 {
	atlas, ok := atlasCache[*t.Font]
	if !ok {
		// Generate texture first
		atlas = t.Font.generateFontAtlas(200)
		atlasCache[*t.Font] = atlas
	}

	var currentY float32
	var totalY float32
	var tallest float32

	for _, char := range t.Text {
		// TODO: this might not work for all characters
		switch {
		case char == '\n':
			totalY += tallest
			tallest = float32(0)
			continue
		case char < 32: // all system stuff should be ignored
			continue
		}
		currentY = atlas.Height[char] + t.LineSpacing*atlas.Height[char]
		if currentY > tallest {
			tallest = currentY
		}
	}
	return totalY + tallest
}