Documentation
¶
Index ¶
- type Canvas
- func (c *Canvas) RenderToImage() (image.Image, error)
- func (c *Canvas) SaveAsBMP(filename string) error
- func (c *Canvas) SaveAsJPEG(filename string) error
- func (c *Canvas) SaveAsPNG(filename string) error
- func (c *Canvas) SaveAsSVG(filename string) error
- func (c *Canvas) WithBackground(bg background.Background) *Canvas
- func (c *Canvas) WithChrome(chrome chrome.Chrome) *Canvas
- func (c *Canvas) WithContent(content content.Content) *Canvas
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
Canvas represents a rendering canvas with all necessary configuration
func NewCanvas ¶
func NewCanvas() *Canvas
NewCanvas creates a new Canvas instance with default options
func (*Canvas) RenderToImage ¶
RenderToImage renders an image using the given chrome, background, and content; all of which are optional, but at least one is required
func (*Canvas) SaveAsJPEG ¶ added in v0.7.0
SaveAsJPEG saves an image to a file in JPEG format
func (*Canvas) WithBackground ¶ added in v0.7.0
func (c *Canvas) WithBackground(bg background.Background) *Canvas
WithBackground sets the background renderer
func (*Canvas) WithChrome ¶ added in v0.7.0
WithChrome sets the chrome renderer
Click to show internal directories.
Click to hide internal directories.