text rotation works, ish.
This commit is contained in:
parent
53280b9258
commit
f800bc387b
15 changed files with 281 additions and 131 deletions
|
|
@ -36,6 +36,11 @@ type vectorRenderer struct {
|
|||
fc *font.Drawer
|
||||
}
|
||||
|
||||
func (vr *vectorRenderer) ResetStyle() {
|
||||
vr.s = &Style{Font: vr.s.Font}
|
||||
vr.fc = nil
|
||||
}
|
||||
|
||||
// GetDPI returns the dpi.
|
||||
func (vr *vectorRenderer) GetDPI() float64 {
|
||||
return vr.dpi
|
||||
|
|
@ -170,7 +175,7 @@ func (vr *vectorRenderer) MeasureText(body string) (box Box) {
|
|||
if vr.c.textTheta == nil {
|
||||
return
|
||||
}
|
||||
box = box.BoundedRotate(*vr.c.textTheta)
|
||||
box = box.Corners().Rotate(Math.RadiansToDegrees(*vr.c.textTheta)).Box()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue