feat: support text rotation
This commit is contained in:
parent
7e1f003be8
commit
a42d0727df
1 changed files with 6 additions and 0 deletions
|
|
@ -558,6 +558,12 @@ func (p *Painter) Text(body string, x, y int) *Painter {
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *Painter) TextRotation(body string, x, y int, radians float64) {
|
||||||
|
p.render.SetTextRotation(radians)
|
||||||
|
p.render.Text(body, x, y)
|
||||||
|
p.render.ClearTextRotation()
|
||||||
|
}
|
||||||
|
|
||||||
func (p *Painter) TextFit(body string, x, y, width int, textAligns ...string) chart.Box {
|
func (p *Painter) TextFit(body string, x, y, width int, textAligns ...string) chart.Box {
|
||||||
style := p.style
|
style := p.style
|
||||||
textWarp := style.TextWrap
|
textWarp := style.TextWrap
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue