diff options
Diffstat (limited to 'def.go')
-rw-r--r-- | def.go | 37 |
1 files changed, 36 insertions, 1 deletions
@@ -39,6 +39,39 @@ type gradientType struct { objNum int } +const ( + OrientationPortrait = "portrait" + OrientationLandscape = "landscape" +) + +type colorMode int + +const ( + colorModeRGB colorMode = iota + colorModeSpot + colorModeCMYK +) + +type colorType struct { + r, g, b float64 + ir, ig, ib int + mode colorMode + spotStr string // name of current spot color + gray bool + str string +} + +// SpotColorType specifies a named spot color value +type spotColorType struct { + id, objID int + val cmykColorType +} + +// CMYKColorType specifies an ink-based CMYK color value +type cmykColorType struct { + c, m, y, k byte // 0% to 100% +} + // SizeType fields Wd and Ht specify the horizontal and vertical extents of a // document element such as a page. type SizeType struct { @@ -224,6 +257,7 @@ type Fpdf struct { footerFncLpi func(bool) // function provided by app and called to write footer with last page flag zoomMode string // zoom display mode layoutMode string // layout display mode + xmp []byte // XMP metadata title string // title subject string // subject author string // author @@ -253,8 +287,9 @@ type Fpdf struct { colorFlag bool // indicates whether fill and text colors are different color struct { // Composite values of colors - draw, fill, text clrType + draw, fill, text colorType } + spotColorMap map[string]spotColorType // Map of named ink-based colors } type encType struct { |