Documentation
¶
Index ¶
- func Fint32ToFloat32(i fixed.Int26_6) float32
- type Font
- type FontName
- type VectorFont
- func (s *VectorFont) Hint() font.Hinting
- func (s *VectorFont) MeasureHeight() float32
- func (s *VectorFont) MeasureText(text string) (res mgl32.Vec2)
- func (s *VectorFont) Name() FontName
- func (s *VectorFont) PathText(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
- func (s *VectorFont) PathTextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
- func (s *VectorFont) SetHint(hint font.Hinting)
- func (s *VectorFont) SetSize(size int)
- func (s *VectorFont) Size() int
- func (s *VectorFont) Text(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
- func (s *VectorFont) TextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fint32ToFloat32 ¶
Types ¶
type Font ¶
type Font interface {
Name() FontName
Size() int
SetSize(size int)
Hint() font.Hinting
SetHint(hint font.Hinting)
//
Text(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
TextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
PathText(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
PathTextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
MeasureText(text string) mgl32.Vec2
}
type VectorFont ¶
type VectorFont struct {
// contains filtered or unexported fields
}
func NewVectorFont ¶
func (*VectorFont) Hint ¶
func (s *VectorFont) Hint() font.Hinting
func (*VectorFont) MeasureHeight ¶
func (s *VectorFont) MeasureHeight() float32
func (*VectorFont) MeasureText ¶
func (s *VectorFont) MeasureText(text string) (res mgl32.Vec2)
func (*VectorFont) Name ¶
func (s *VectorFont) Name() FontName
func (*VectorFont) PathText ¶
func (s *VectorFont) PathText(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
func (*VectorFont) PathTextInRect ¶
func (s *VectorFont) PathTextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
func (*VectorFont) SetHint ¶
func (s *VectorFont) SetHint(hint font.Hinting)
func (*VectorFont) SetSize ¶
func (s *VectorFont) SetSize(size int)
func (*VectorFont) Size ¶
func (s *VectorFont) Size() int
func (*VectorFont) Text ¶
func (s *VectorFont) Text(ctx gorat.VectorDrawer, text string, point mgl32.Vec2, align gcore.Align)
func (*VectorFont) TextInRect ¶
func (s *VectorFont) TextInRect(ctx gorat.VectorDrawer, text string, rect image.Rectangle, align gcore.Align)
Click to show internal directories.
Click to hide internal directories.