// SetLineCapStyle defines the line cap style. styleStr should be "butt",
// "round" or "square". A square style projects from the end of the line. The
// method can be called before the first page is created. The value is
// retained from page to page.
325120
func (f *Fpdf) SetLineCapStyle(styleStr string) {
	var capStyle int
	switch styleStr {
	case "round":
		capStyle = 1
	case "square":
		capStyle = 2
	default:
		capStyle = 0
	}
	f.capStyle = capStyle
	if f.page > 0 {
		f.outf("%d J", f.capStyle)
	}
}
122396
func setFont(formatStyle *formatStyle) *font {
	fontUnderlineType := map[string]string{"single": "single", "double": "double"}
	if formatStyle.Font.Size < 1 {
		formatStyle.Font.Size = 11
	}
	if formatStyle.Font.Color == "" {
		formatStyle.Font.Color = "#000000"
	}
	f := font{
		B:      formatStyle.Font.Bold,
		I:      formatStyle.Font.Italic,
		Sz:     &attrValInt{Val: formatStyle.Font.Size},
		Color:  &xlsxColor{RGB: getPaletteColor(formatStyle.Font.Color)},
		Name:   &attrValString{Val: formatStyle.Font.Family},
		Family: &attrValInt{Val: 2},
	}
	if f.Name.Val == "" {
		f.Name.Val = "Calibri"
		f.Scheme = &attrValString{Val: "minor"}
	}
	val, ok := fontUnderlineType[formatStyle.Font.Underline]
	if ok {
		f.U = &attrValString{Val: val}
	}
	return &f
}
1289361
func (s *TerminologyData) SetFormat(v string) *TerminologyData {
	s.Format = &v
	return s
}
308489
func (dc *Context) SetFillStyle(pattern Pattern) {
	// if pattern is SolidPattern, also change dc.color(for dc.Clear, dc.drawString)
	if fillStyle, ok := pattern.(*solidPattern); ok {
		dc.color = fillStyle.color
	}
	dc.fillPattern = pattern
}
144635
func (app *Application) SetStyle(style tcell.Style) {
	app.style = style
	if app.screen != nil {
		app.screen.SetStyle(style)
	}
}
979785
func (s *Thumbnails) SetFormat(v string) *Thumbnails {
	s.Format = &v
	return s
}
390903
func (s *BusinessReportSchedule) SetFormat(v string) *BusinessReportSchedule {
	s.Format = &v
	return s
}
328875
func (p *Theme) SetStyle(n string, i Style) {
	p.styles[n] = i
}
240946
func (s *ContentTypeProfile) SetFormat(v string) *ContentTypeProfile {
	s.Format = &v
	return s
}
464117
func SassOptionSetOutputStyle(goopts SassOptions, i int) {
	C.sass_option_set_output_style(goopts, uint32(i))
}
823061
func (s *Position) SetLine(v int64) *Position {
	s.Line = &v
	return s
}
1226413
func (element *Element) addStyleRule(styleRule *StyleRule) {
	element.styleRules = append(element.styleRules, styleRule)
}
1060564
func (s *DeploymentInfo) SetDeploymentStyle(v *DeploymentStyle) *DeploymentInfo {
	s.DeploymentStyle = v
	return s
}
1263177
func (t *Text) SetText(s string) {
	t.width = 0
	t.text = []rune(s)
	if len(t.widths) < len(t.text) {
		t.widths = make([]int, len(t.text))
	} else {
		t.widths = t.widths[0:len(t.text)]
	}
	if len(t.styles) < len(t.text) {
		t.styles = make([]tcell.Style, len(t.text))
	} else {
		t.styles = t.styles[0:len(t.text)]
	}
	t.lengths = []int{}
	length := 0
	for i, r := range t.text {
		t.widths[i] = runewidth.RuneWidth(r)
		t.styles[i] = t.style
		if r == '\n' {
			t.lengths = append(t.lengths, length)
			if length > t.width {
				t.width = length
				length = 0
			}

		} else if t.widths[i] == 0 && length == 0 {
			// If first character on line is combining, inject
			// a leading space.  (Shame on the caller!)
			t.widths = append(t.widths, 0)
			copy(t.widths[i+1:], t.widths[i:])
			t.widths[i] = 1

			t.text = append(t.text, ' ')
			copy(t.text[i+1:], t.text[i:])
			t.text[i] = ' '

			t.styles = append(t.styles, t.style)
			copy(t.styles[i+1:], t.styles[i:])
			t.styles[i] = t.style
			length++
		} else {
			length += t.widths[i]
		}
	}
	if length > 0 {
		t.lengths = append(t.lengths, length)
		if length > t.width {
			t.width = length
		}
	}
	t.height = len(t.lengths)
	t.PostEventWidgetContent(t)
}
1290318
func (s *GetTypeInput) SetFormat(v string) *GetTypeInput {
	s.Format = &v
	return s
}
754735
func (s *InventoryRetrievalJobDescription) SetFormat(v string) *InventoryRetrievalJobDescription {
	s.Format = &v
	return s
}
375633
func (f *File) setDefaultTimeStyle(sheet, axis string, format int) error {
	s, err := f.GetCellStyle(sheet, axis)
	if err != nil {
		return err
	}
	if s == 0 {
		style, _ := f.NewStyle(`{"number_format": ` + strconv.Itoa(format) + `}`)
		f.SetCellStyle(sheet, axis, axis, style)
	}
	return err
}