Documentation ¶
Index ¶
Constants ¶
View Source
const ( ValignTop = 1 ValignMiddle = 2 ValignBottom = 3 AlignLeft = 4 AlignCenter = 5 AlignRight = 6 )
Variables ¶
View Source
var ( ColorTableLine = Color{ R: 0, G: 0, B: 0, } ColorWhite = Color{ R: 255, G: 255, B: 255, } ColorGray = Color{ R: 211, G: 211, B: 211, } ColorBlack = ColorTableLine )
Functions ¶
This section is empty.
Types ¶
type AddPagePipe ¶
type NormalTable ¶
type NormalTable struct {
// contains filtered or unexported fields
}
func GetNormalTable ¶
func GetNormalTable() *NormalTable
func (*NormalTable) AddHeader ¶
func (nti *NormalTable) AddHeader(thc TableHeaderColumn)
func (*NormalTable) AddRow ¶
func (nti *NormalTable) AddRow(r []*TableColumn)
func (*NormalTable) Draw ¶
func (nti *NormalTable) Draw(p PDF, style TableStyle, app ...AddPagePipe)
func (*NormalTable) DrawWithPosition ¶
func (nti *NormalTable) DrawWithPosition(p PDF, style TableStyle, px, py float64)
type PDF ¶
type PDF interface { WriteToFile(filepath string) error Write(w io.Writer) error AddPagePipe(pp ...AddPagePipe) AddPage() Text(text string, style TextStyle, align int) Br(h float64) GetX() float64 GetY() float64 SetX(x float64) SetY(y float64) GetBottomHeight() float64 GetBottomMargin() float64 GetLeftMargin() float64 GetRightMargin() float64 GetHeight() float64 NewLine(width float64) NewDashLine(width float64) LineWithPosition(width float64, x1, y1, x2, y2 float64) RectFillDrawColor(text string, style TextBlockStyle, w, h float64, align, valign int) ImageReader(imageByte io.Reader, x, y, w, h, alpha float64) error }
type TableColumn ¶
func GetTableColumn ¶
func GetTableColumn(w, h float64, align []int, text ...string) *TableColumn
type TableHeaderColumn ¶
type TableHeaderColumn struct { Main TableColumn Sub []TableColumn }
func (*TableHeaderColumn) AddSub ¶
func (thc *TableHeaderColumn) AddSub(text string, width, height float64)
type TableStyle ¶
type TableStyle interface { Header() TextBlockStyle Data() TextBlockStyle }
type TextBlockStyle ¶
func (*TextBlockStyle) GetAlign ¶
func (tbs *TextBlockStyle) GetAlign() int
Click to show internal directories.
Click to hide internal directories.