Documentation
¶
Overview ¶
Package draw provides provides image composition functions.
Index ¶
- func Box(dst Image, rect image.Rectangle, c color.Color)
- func Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point, op Op)
- func DrawMask(dst Image, r image.Rectangle, src image.Image, sp image.Point, ...)
- func HorizontalLine(dst Image, x, y, w int, c color.Color)
- func Line(dst Image, a, b image.Point, c color.Color)
- func Rectangle(dst Image, rect image.Rectangle, c color.Color)
- func RoundedBox(dst Image, rect image.Rectangle, radius int, c color.Color)
- func RoundedRectangle(dst Image, rect image.Rectangle, radius int, c color.Color)
- func VerticalLine(dst Image, x, y, h int, c color.Color)
- type Drawer
- type Image
- type Op
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawMask ¶
func DrawMask(dst Image, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op)
DrawMask aligns r.Min in dst with sp in src and mp in mask and then replaces the rectangle r in dst with the result of a Porter-Duff composition. A nil mask is treated as opaque.
func HorizontalLine ¶
HorizontalLine draws a line between (x,y) and (x+w,y).
func RoundedBox ¶
RoundedBox draws a filled rectangle with radius pixels rounded corners.
func RoundedRectangle ¶
RoundedRectangle draws a rectangle with radius pixels rounded corners.
Types ¶
Click to show internal directories.
Click to hide internal directories.