Documentation ¶
Index ¶
- Variables
- func Baseline(m *font.Metrics) fixed.Int26_6
- func GetTestFace() font.Face
- func LineHeight(m *font.Metrics) fixed.Int26_6
- func LineHeightInt(m *font.Metrics) int
- func NewFace(font *truetype.Font, opt *truetype.Options) font.Face
- type Drawer
- type FaceCache
- func (fc *FaceCache) Glyph(dot fixed.Point26_6, ru rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ...)
- func (fc *FaceCache) GlyphAdvance(ru rune) (advance fixed.Int26_6, ok bool)
- func (fc *FaceCache) GlyphBounds(ru rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)
- func (fc *FaceCache) Kern(r0, r1 rune) fixed.Int26_6
- type FaceCacheL
- func (fc *FaceCacheL) Glyph(dot fixed.Point26_6, ru rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ...)
- func (fc *FaceCacheL) GlyphAdvance(ru rune) (advance fixed.Int26_6, ok bool)
- func (fc *FaceCacheL) GlyphBounds(ru rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)
- func (fc *FaceCacheL) Kern(r0, r1 rune) fixed.Int26_6
- type FaceRunes
- type GlyphAdvanceCache
- type GlyphBoundsCache
- type GlyphCache
- type SyntaxHighlightComment
Constants ¶
This section is empty.
Variables ¶
View Source
var CarriageReturnRune = '♪'
View Source
var NullRune = '◦'
View Source
var TabWidth = 8
Functions ¶
func GetTestFace ¶
func LineHeightInt ¶
Types ¶
type Drawer ¶
type Drawer interface { Reader() iorw.Reader SetReader(iorw.Reader) ContentChanged() Face() font.Face SetFace(font.Face) LineHeight() int SetFg(color.Color) Bounds() image.Rectangle SetBounds(image.Rectangle) // rune offset (set text view position; save/restore view in session file) RuneOffset() int SetRuneOffset(int) LocalPointOf(index int) image.Point LocalIndexOf(image.Point) int Measure() image.Point Draw(img draw.Image) // specialized: covers editor row button margin FirstLineOffsetX() int SetFirstLineOffsetX(x int) // cursor SetCursorOffset(int) // scrollable utils ScrollOffset() image.Point SetScrollOffset(image.Point) ScrollSize() image.Point ScrollViewSize() image.Point ScrollPageSizeY(up bool) int ScrollWheelSizeY(up bool) int // visibility utils RangeVisible(offset, n int) bool RangeVisibleOffset(offset, n int) int }
type FaceCache ¶
func NewFaceCache ¶
func (*FaceCache) GlyphAdvance ¶
func (*FaceCache) GlyphBounds ¶
type FaceCacheL ¶
Same as FaceCache but with locks.
func NewFaceCacheL ¶
func NewFaceCacheL(face font.Face) *FaceCacheL
func (*FaceCacheL) GlyphAdvance ¶
func (fc *FaceCacheL) GlyphAdvance(ru rune) (advance fixed.Int26_6, ok bool)
func (*FaceCacheL) GlyphBounds ¶
func (fc *FaceCacheL) GlyphBounds(ru rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)
type GlyphAdvanceCache ¶
type GlyphAdvanceCache struct {
// contains filtered or unexported fields
}
type GlyphBoundsCache ¶
type GlyphBoundsCache struct {
// contains filtered or unexported fields
}
type GlyphCache ¶
type GlyphCache struct {
// contains filtered or unexported fields
}
type SyntaxHighlightComment ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.