Documentation ¶
Index ¶
- Constants
- Variables
- func CoordinationToRelation(c, v int) float64
- func DrawImage(img draw.Image, target image.Image, x, y int)
- func DrawRect(x1, y1, x2, y2, thickness int, img draw.Image, col color.Color)
- func EncodeMonoChrome(w io.Writer, buffer io.Reader) error
- func GetImage(img *ImageData, resp map[string]string, rgba draw.Image) error
- func HLine(img draw.Image, col color.Color, x1, y, x2 int)
- func Justify(input string, length int) string
- func LoadFonts(src string) (map[string]opentype.Font, error)
- func LoadImages(src string) (map[string]image.Image, error)
- func NumToPersianWords(number string) string
- func NumToWords(number string) string
- func ProcessRequest(requests map[string]PrintRequest, fonts map[string]opentype.Font, ...) (map[string]string, error)
- func RelationalCoordinate(r float64, v int) int
- func VLine(img draw.Image, col color.Color, x, y1, y2 int)
- type Drawable
- type Image
- type ImageData
- type Line
- type PrintRequest
- type PrintTx
- type Rect
- type Text
Constants ¶
View Source
const ( Bmp = "bmp" BmpMonoChrome = "bmp-monochrome" Png = "png" )
View Source
const ( BmpAndPng = "bmp+png" JustPng = "png" )
Variables ¶
Functions ¶
func CoordinationToRelation ¶ added in v0.0.7
func NumToPersianWords ¶ added in v0.0.9
func NumToWords ¶ added in v0.0.9
func ProcessRequest ¶
func RelationalCoordinate ¶ added in v0.0.7
Types ¶
type ImageData ¶
type PrintRequest ¶
type PrintTx ¶
type PrintTx struct { MonoChrome bool MonoChromeColor color.Color Rgba draw.Image Src image.Image Fg image.Image Bg *image.Uniform Dpi float64 Margin float64 Fonts map[string]opentype.Font Faces *map[string]font.Face Images map[string]image.Image }
func (*PrintTx) CoordinationX ¶ added in v0.0.7
func (*PrintTx) CoordinationY ¶ added in v0.0.7
func (*PrintTx) RelationalX ¶ added in v0.0.7
func (*PrintTx) RelationalY ¶ added in v0.0.7
type Text ¶
type Text struct { Text string X float64 Y float64 // TODO:FixedWidth int MaxWidth float64 // if result width is more than this value, library tries new font face with decreased size RightAlign bool NumbersToArabic bool NumbersToPersian bool NumberToWords bool NumberToPersianWords bool FontFace string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.