Documentation ¶
Overview ¶
Package svg 提供基于 svg 的绘图工具
Index ¶
- type Canvas
- func (c *Canvas) CurrentDrawColor() color.Color
- func (c *Canvas) DrawHollowCircle(center draw.Point, radius, width float64)
- func (c *Canvas) DrawHollowPolygon(width float64, endpoints ...draw.Point)
- func (c *Canvas) DrawHollowRect(from, to draw.Point, width float64)
- func (c *Canvas) DrawLine(from, to draw.Point, width float64)
- func (c *Canvas) DrawPoint(center draw.Point, radius float64)
- func (c *Canvas) DrawSolidPolygon(endpoints ...draw.Point)
- func (c *Canvas) DrawSolidRect(from, to draw.Point)
- func (c *Canvas) DrawText(origin draw.Point, text string, opts ...draw.Option)
- func (c *Canvas) Save(filepath string) error
- func (c *Canvas) SetDrawColor(clr color.Color)
- func (c *Canvas) Size() (width, height float64)
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 表示一个 svg 画布
func (*Canvas) CurrentDrawColor ¶
CurrentDrawColor 返回当前的颜色
func (*Canvas) DrawHollowCircle ¶
DrawHollowCircle 绘制一个空心圆
func (*Canvas) DrawHollowPolygon ¶
DrawHollowPolygon 绘制一个空心多边形
func (*Canvas) DrawHollowRect ¶
DrawHollowRect 绘制一个空心矩形
func (*Canvas) DrawSolidPolygon ¶
DrawHollowPolygon 绘制一个空心多边形
func (*Canvas) DrawSolidRect ¶
DrawSolidRect 绘制一个实心矩形
Click to show internal directories.
Click to hide internal directories.