Documentation ¶
Index ¶
- func Page(doc *rmtool.Document, pageID string, w io.Writer) error
- func Pdf(d *rmtool.Document, w io.Writer) error
- func PdfPage(c *Context, d *rmtool.Document, pageID string, w io.Writer) error
- type Ballpoint
- type BasePen
- type Brush
- type Context
- type Fineliner
- type Highlighter
- type Marker
- type MechanicalPencil
- type Paintbrush
- type Palette
- type Pencil
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Page ¶
Page renders the page from the given document and writes the result to the given writer.
Unlike RenderDrawing, this includes the page's background template.
Types ¶
type Ballpoint ¶
type Ballpoint struct {
// contains filtered or unexported fields
}
The Ballpoint pen has some sensitivity for pressure
type Context ¶
type Context struct { DataDir string // contains filtered or unexported fields }
Context holds parameters and cached data for rendering operations.
If multiple drawings are rendered, they should use the same Context.
func DefaultContext ¶
func DefaultContext() *Context
DefaultContext creates a new rendering context with default settings.
func NewContext ¶
NewContext sets up a new rendering context.
dataDir should point to a directory with a spritesheet for the brushes and a subdirectory 'templates' with page backgrounds.
type Fineliner ¶
type Fineliner struct {
// contains filtered or unexported fields
}
Fineliner has no sensitivity to pressure or tilt.
type Highlighter ¶
type Highlighter struct {
// contains filtered or unexported fields
}
func (*Highlighter) RenderStroke ¶
func (h *Highlighter) RenderStroke(dst draw.Image, s lines.Stroke)
type MechanicalPencil ¶
type MechanicalPencil struct {
// contains filtered or unexported fields
}
func (*MechanicalPencil) RenderStroke ¶
func (m *MechanicalPencil) RenderStroke(dst draw.Image, s lines.Stroke)
type Paintbrush ¶
type Paintbrush struct {
// contains filtered or unexported fields
}
func (*Paintbrush) RenderStroke ¶
func (p *Paintbrush) RenderStroke(dst draw.Image, s lines.Stroke)
type Palette ¶
type Palette struct { Background color.Color Highlighter color.Color // contains filtered or unexported fields }
Palette holds the colors used for rendering.
You can use a palette to map from the default colors of the reMarkable tablet (black, gray, white) ro another color scheme.