Comment revisions

This commit is contained in:
Gunnsteinn Hall 2017-07-17 14:36:16 +00:00
parent 0029d4cc8e
commit 9d0e42a5f2
2 changed files with 8 additions and 11 deletions

View File

@ -7,19 +7,13 @@ package creator
type PageSize [2]float64
//
// Common page sizes in mm:
// A3: {297, 420}
// A4: {210, 297}
// A5: {148, 210}
// Letter: {216, 280}
// Legal: {216, 356}
// Converted to points at standard resolution 72ppi and rounded to 2 digits:
//
// Default PDF resolution (points/inch, points/mm).
var PPI float64 = 72 // Points per inch. (Default resolution).
var PPMM float64 = 72 * 1.0 / 25.4 // Points per mm. (Default resolution).
//
// Commonly used page sizes
//
var (
PageSizeA3 = PageSize{297 * PPMM, 420 * PPMM}
PageSizeA4 = PageSize{210 * PPMM, 297 * PPMM}
@ -28,6 +22,7 @@ var (
PageSizeLegal = PageSize{8.5 * PPI, 14 * PPI}
)
// TextAlignment options for paragraph.
type TextAlignment int
const (

View File

@ -278,8 +278,10 @@ func (table *Table) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext,
return blocks, ctx, nil
}
// Define table cell's border style.
type CellBorderStyle int
// Currently supported table styles are: None (no border) and boxed (line along each side).
const (
CellBorderStyleNone CellBorderStyle = iota
CellBorderStyleBox
@ -312,7 +314,7 @@ type tableCell struct {
table *Table
}
// Make a new cell and insert into the table at specified row and column.
// Make a new cell and insert into the table at current position in the table.
func (table *Table) NewCell() *tableCell {
table.curCell++