Documentation ¶
Overview ¶
Package graphics provides tools for generating images.
Index ¶
- func Center(rect image.Rectangle) image.Point
- func CenteredRectangle(centerPoint image.Point, width int, height int) image.Rectangle
- func DrawCircle(circle geometry.Circle, color string, canvas image.Image) image.Image
- func DrawEdge(edge geometry.Edge, color string, canvas image.Image) image.Image
- func DrawEdges(edges []geometry.Edge, color string, canvas image.Image) image.Image
- func DrawPoints(points []geometry.Point, color string, canvas image.Image) image.Image
- func DrawPolygon(polygon geometry.Polygon, color string, canvas image.Image) image.Image
- func DrawTriangle(triangle geometry.Triangle, color string, canvas image.Image) image.Image
- func LoadPNG(path string) image.Image
- func RenderFilledImage(path string, pattern Pattern) image.Image
- type Pattern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CenteredRectangle ¶
CenteredRectangle returns a rectangle of the given dimensions centered on the given point
func DrawCircle ¶
DrawCircle returns an image with a circle drawn matching the given input on the given image
func DrawPoints ¶
DrawPoints returns an image with all of the given points rendered on the given image
func DrawPolygon ¶
DrawPolygon returns an image with the given polygon drawn on the given image
func DrawTriangle ¶
DrawTriangle returns an image with the given triangle drawn on the given image
Types ¶
Click to show internal directories.
Click to hide internal directories.