Documentation ¶
Index ¶
- func CalcMonoFontSize(ttFont *truetype.Font, spacing float64, textLines []string, ...) int
- func CreateFontContext(ttFont *truetype.Font, fontSize float64, clipRectangle image.Rectangle, ...) *freetype.Context
- func DrawString(fc *freetype.Context, ttFont *truetype.Font, fontSize float64, ...) error
- func HLine(img *image.RGBA, col color.Color, x1, y, x2 int)
- func ParseHexColor(s string) (c color.RGBA, err error)
- func ParseRGBA(rgba string) color.RGBA
- func Rect(img *image.RGBA, col color.Color, x1, y1, x2, y2 int)
- func TextHeight(fc *freetype.Context, size, spacing float64, lines []string) int
- func TextWidthInPixels(ttFont *truetype.Font, size float64, text string) int
- func VLine(img *image.RGBA, col color.Color, x, y1, y2 int)
- func WordWrap(text string, lineWidth int) (lines []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcMonoFontSize ¶
func CalcMonoFontSize(ttFont *truetype.Font, spacing float64, textLines []string, bounds image.Rectangle) int
CalcMonoFontSize calcula o tamanho maximo da fonte usada no bloco de texto para caber em bounds.
func CreateFontContext ¶
func DrawString ¶
func DrawString(fc *freetype.Context, ttFont *truetype.Font, fontSize float64, clipRectangle image.Rectangle, alignment string, spacing float64, text []string, x, y int) error
DrawString calculates the widths and print to image
func TextWidthInPixels ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.