Documentation ¶
Index ¶
- type Document
- type Font
- type Page
- func (p *Page) Center(x, y float64, s string)
- func (p *Page) ClosePath()
- func (p *Page) CurveTo(x1, y1, x2, y2, x3, y3 float64)
- func (p *Page) Fill()
- func (p *Page) FillAndStroke()
- func (p *Page) FillCMYK(c, m, y, k float64)
- func (p *Page) FillGray(g float64)
- func (p *Page) FillRGB(r, g, b float64)
- func (p *Page) Left(x, y float64, s string)
- func (p *Page) LineTo(x, y float64)
- func (p *Page) MoveTo(x, y float64)
- func (p *Page) Multiline(x, y float64, s string)
- func (p *Page) Right(x, y float64, s string)
- func (p *Page) SetFont(f *Font, size float64)
- func (p *Page) SetLeading(leading float64)
- func (p *Page) SetLineWidth(w float64)
- func (p *Page) Stroke()
- func (p *Page) StrokeCMYK(c, m, y, k float64)
- func (p *Page) StrokeGray(g float64)
- func (p *Page) StrokeRGB(r, g, b float64)
- func (p *Page) Translate(x, y float64)
- func (p *Page) Truncate(x, y, width float64, s string)
- func (p *Page) WordWrap(x, y, margin float64, s string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
A Document represents a PDF document.
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) ClosePath ¶
func (p *Page) ClosePath()
ClosePath closes the current subpath with a straight line to its starting point.
func (*Page) FillAndStroke ¶
func (p *Page) FillAndStroke()
FillAndStroke fills and strokes the current path.
func (*Page) FillCMYK ¶
FillCMYK sets an CMYK color to be used by Fill. Each component is in the range from 0 to 1.
func (*Page) FillGray ¶
FillGray sets a grayscale value to be used by Fill. 0 is black and 1 is white.
func (*Page) FillRGB ¶
FillRGB sets an RGB color to be used by Fill. Each component is in the range from 0 to 1.
func (*Page) Multiline ¶
Multiline puts multiple lines of text on the page (splitting s at '\n'). It uses the line spacing set with Leading.
func (*Page) SetLeading ¶
SetLeading sets the line spacing to be used by Multiline.
func (*Page) SetLineWidth ¶
SetLineWidth sets the width of the line to be drawn by Stroke.
func (*Page) StrokeCMYK ¶
StrokeCMYK sets an CMYK color to be used by Stroke. Each component is in the range from 0 to 1.
func (*Page) StrokeGray ¶
StrokeGray sets a grayscale value to be used by Stroke. 0 is black and 1 is white.
func (*Page) StrokeRGB ¶
StrokeRGB sets an RGB color to be used by Stroke. Each component is in the range from 0 to 1.