Documentation ¶
Index ¶
- Constants
- func ConvertPNG2JPEG(srcPath, dstPath string) (err error)
- func DrawPNG(srcPath string)
- func GetImageType(picturePath string) (pictureType string, err error)
- func GetImageWidthAndHeight(picturePath string) (w, h int)
- type Div
- func (div *Div) Copy(content string) *Div
- func (div *Div) GenerateAtomicCell() error
- func (div *Div) GetHeight() (height float64)
- func (div *Div) GetWidth() (width float64)
- func (div *Div) HorizontalCentered() *Div
- func (div *Div) RightAlign() *Div
- func (div *Div) SetBackColor(color string) *Div
- func (div *Div) SetBorder(border core.Scope) *Div
- func (div *Div) SetContent(content string) *Div
- func (div *Div) SetFont(font core.Font) *Div
- func (div *Div) SetFontColor(color string) *Div
- func (div *Div) SetFontWithColor(font core.Font, color string) *Div
- func (div *Div) SetFrameType(frameType int) *Div
- func (div *Div) SetMarign(margin core.Scope) *Div
- type HLine
- type Image
- type Span
- func (span *Span) Copy(content string) *Span
- func (span *Span) GenerateAtomicCell() error
- func (span *Span) GetHeight() (height float64)
- func (span *Span) GetWidth() (width float64)
- func (span *Span) HorizontalCentered() *Span
- func (span *Span) RightAlign() *Span
- func (span *Span) SetBorder(border core.Scope) *Span
- func (span *Span) SetContent(content string) *Span
- func (span *Span) SetFont(font core.Font) *Span
- func (span *Span) SetFontColor(color string) *Span
- func (span *Span) SetFontWithColor(font core.Font, color string) *Span
- func (span *Span) SetHeight(height float64) *Span
- func (span *Span) SetMarign(margin core.Scope) *Span
- func (span *Span) VerticalCentered() *Span
- type Table
- func (table *Table) GenerateAtomicCell() error
- func (table *Table) GetColWidth(row, col int) float64
- func (table *Table) NewCell() *TableCell
- func (table *Table) NewCellByRange(w, h int) *TableCell
- func (table *Table) SetLineHeight(lineHeight float64)
- func (table *Table) SetMargin(margin core.Scope)
- type TableCell
Constants ¶
View Source
const ( DIV_STRAIGHT = 1 // 实线边框 DIV_DASHED = 2 // 虚线边框 DIV_DOTTED = 3 // 点状线的边框 DIV_NONE = 4 // 无边框 )
Variables ¶
This section is empty.
Functions ¶
func ConvertPNG2JPEG ¶
func GetImageType ¶
func GetImageWidthAndHeight ¶
Types ¶
type Div ¶
type Div struct {
// contains filtered or unexported fields
}
带有各种边框的内容, 可以自动换行
func NewDivWithWidth ¶
func (*Div) HorizontalCentered ¶
func (*Div) RightAlign ¶
func (*Div) SetBackColor ¶
func (*Div) SetContent ¶
func (*Div) SetFontColor ¶
func (*Div) SetFrameType ¶
type HLine ¶
type HLine struct {
// contains filtered or unexported fields
}
func (*HLine) GenerateAtomicCell ¶
func (h *HLine) GenerateAtomicCell()
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func NewImageFromServer ¶
NewImageFromServer 从远程请求图片
func NewServerImage ¶
NewServerImage 获取远程 图片
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
不会进行自动分页, 可以用于页眉, 页脚的内容.
func NewSpanWithWidth ¶
func (*Span) GenerateAtomicCell ¶
func (*Span) HorizontalCentered ¶
func (*Span) RightAlign ¶
func (*Span) SetContent ¶
func (*Span) SetFontColor ¶
func (*Span) SetFontWithColor ¶
func (*Span) VerticalCentered ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
构建表格
func (*Table) GenerateAtomicCell ¶
func (*Table) SetLineHeight ¶
设置表的行高, 行高必须大于当前使用字体的行高
Click to show internal directories.
Click to hide internal directories.