text rotation is sucky.
This commit is contained in:
parent
102f7a8aa3
commit
b78f2327aa
8 changed files with 140 additions and 12 deletions
|
|
@ -177,12 +177,17 @@ func (rr *rasterRenderer) MeasureText(body string) Box {
|
|||
t = 0
|
||||
}
|
||||
|
||||
return Box{
|
||||
textBox := Box{
|
||||
Top: int(math.Ceil(t)),
|
||||
Left: int(math.Ceil(l)),
|
||||
Right: int(math.Ceil(r)),
|
||||
Bottom: int(math.Ceil(b)),
|
||||
}
|
||||
if rr.rotateRadians == 0 {
|
||||
return textBox
|
||||
}
|
||||
|
||||
return textBox.Rotate(rr.rotateRadians)
|
||||
}
|
||||
|
||||
// SetTextRotation sets a text rotation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue