// GetFieldWidth returns this primitive's field screen width.
551788
func (d *DropDown) GetFieldWidth() int {
	if d.fieldWidth > 0 {
		return d.fieldWidth
	}
	fieldWidth := 0
	for _, option := range d.options {
		width := TaggedStringWidth(option.Text)
		if width > fieldWidth {
			fieldWidth = width
		}
	}
	return fieldWidth
}
315260
func (w *Writer) GetTermDimensions() (int, int) {
	f, ok := io.Writer(w.Out).(*os.File)
	if !ok {
		return 80, 25
	}
	fd := f.Fd()
	var csbi consoleScreenBufferInfo
	procGetConsoleScreenBufferInfo.Call(fd, uintptr(unsafe.Pointer(&csbi)))
	return int(csbi.maximumWindowSize.x), int(csbi.maximumWindowSize.y)
}
856609
func argWidth(arg string) int {
	// Strip zero-width characters.
	replacer := strings.NewReplacer(
		"\n", "",
		"\t", "",
		"\r", "",
		"\f", "",
		"\v", "",
		string(bold), "",
		string(yellow), "",
		string(cyan), "",
		string(endColor), "",
	)
	s := replacer.Replace(arg)
	return utf8.RuneCountInString(s)
}
250082
func (f *Fpdf) GetStringWidth(s string) float64 {
	if f.err != nil {
		return 0
	}
	w := 0
	for _, ch := range []byte(s) {
		if ch == 0 {
			break
		}
		w += f.currentFont.Cw[ch]
	}
	return float64(w) * f.fontSize / 1000
}
1366856
func (s Style) GetDotWidth(defaults ...float64) float64 {
	if s.DotWidth == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return DefaultDotWidth
	}
	return s.DotWidth
}
737498
func getSizeOfPayloadSizeField(payload []byte) int {
	s := 1
	for i := len(payload); i >= 256; i /= 256 {
		s++
	}
	return s
}
129442
func (f *Fpdf) GetPageSize() (width, height float64) {
	width = f.w
	height = f.h
	return
}
700481
func (v *Window) GetSize() (width int, height int) {
	var cwidth, cheight C.gint
	C.gtk_window_get_size(WINDOW(v), &cwidth, &cheight)
	return int(cwidth), int(cheight)
}
702677
func (p *WindowsParser) GetWinSize() *WinSize {
	w, h, err := p.tty.Size()
	if err != nil {
		panic(err)
	}
	return &WinSize{
		Row: uint16(h),
		Col: uint16(w),
	}
}
741313
func BoundWidth(b orb.Bound) float64 {
	c := (b.Min[1] + b.Max[1]) / 2.0

	s1 := orb.Point{b.Min[0], c}
	s2 := orb.Point{b.Max[0], c}

	return Distance(s1, s2)
}
11568
func GetBandwidth(query map[string]string, lastModifiedSince string) (*Bandwidth, string, error) {
	bandwidth := new(Bandwidth)

	if lastModified, err := executeRequest("bandwidth", query, lastModifiedSince, &bandwidth); err != nil {
		return nil, "", err
	} else {
		return bandwidth, lastModified, nil
	}
}
1231236
func IsVariableWidth(str string) bool {
	if IsNull(str) {
		return true
	}
	return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str)
}
403742
func (a *SetDeviceMetricsOverrideArgs) SetScreenWidth(screenWidth int) *SetDeviceMetricsOverrideArgs {
	a.ScreenWidth = &screenWidth
	return a
}
870244
func Width() int {
	ws, err := getWinsize()

	if err != nil {
		return -1
	}

	return int(ws.Col)
}
1265253
func StrHelperGetStringWidth(str string, fontSize int, ifont IFont) float64 {
	w := 0
	bs := []byte(str)
	i := 0
	max := len(bs)
	for i < max {
		w += ifont.GetCw()[bs[i]]
		i++
	}
	return float64(w) * (float64(fontSize) / 1000.0)
}
994292
func Width() (uint, error) {
	output, err := size()
	if err != nil {
		return 0, err
	}
	_, width, err := parse(output)
	return width, err
}
1284018
func (a *CreateTargetArgs) SetWidth(width int) *CreateTargetArgs {
	a.Width = &width
	return a
}