Documentation ¶
Index ¶
- Variables
- func CopyStride(dst_buf []uint8, dst_stride int, src_buf []uint8, src_stride int, ...)
- func DrawCircle(dst draw.Image, x, y, r int, color color.Color)
- func DrawLine(dst draw.Image, x1, y1, x2, y2 int, color color.Color)
- func DrawRectangle(dst draw.Image, x1, y1, x2, y2 int, color color.Color)
- func DrawTriangle(dst draw.Image, triangle Triangle2D, color color.Color)
- func FillCircle(dst draw.Image, x, y, r int, color color.Color)
- func FillRect(dst draw.Image, r image.Rectangle, c color.Color)
- func FillRectangle(dst draw.Image, x1, y1, x2, y2 int, color color.Color)
- func FillTriangle(dst draw.Image, triangle Triangle2D, color color.Color)
- type Point2D
- type Triangle2D
Constants ¶
This section is empty.
Variables ¶
View Source
var ( COLOR_WHITE = color.RGBA{255, 255, 255, 255} COLOR_BLACK = color.RGBA{0, 0, 0, 255} COLOR_RED = color.RGBA{255, 0, 0, 255} COLOR_LIME = color.RGBA{0, 255, 0, 255} COLOR_BLUE = color.RGBA{0, 0, 255, 255} COLOR_YELLOW = color.RGBA{255, 255, 0, 255} COLOR_CYAN = color.RGBA{0, 255, 255, 255} COLOR_MAGENTA = color.RGBA{255, 0, 255, 255} COLOR_SILVER = color.RGBA{192, 192, 192, 255} COLOR_GRAY = color.RGBA{128, 128, 128, 255} COLOR_MAROON = color.RGBA{128, 0, 0, 255} COLOR_OLIVE = color.RGBA{128, 128, 0, 255} COLOR_GREEN = color.RGBA{0, 128, 0, 255} COLOR_PURPLE = color.RGBA{128, 0, 128, 255} COLOR_TEAL = color.RGBA{0, 128, 128, 255} COLOR_NAVY = color.RGBA{0, 0, 128, 255} COLOR_DARKBLUE = color.RGBA{0, 0, 139, 255} COLOR_DARKGREEN = color.RGBA{1, 50, 32, 255} COLOR_DARKYELLOW = color.RGBA{0x9B, 0x87, 0x0c, 255} COLOR_DARKGRAY = color.RGBA{169, 169, 169, 255} COLOR_DIMGRAY = color.RGBA{105, 105, 105, 255} )
Functions ¶
func CopyStride ¶
func DrawTriangle ¶
func DrawTriangle(dst draw.Image, triangle Triangle2D, color color.Color)
func FillRectangle ¶
* Draws a filled rectangle whose top left corner is (x1, y1)
- and bottom right corner is (x2,y2), using the current color.
func FillTriangle ¶
func FillTriangle(dst draw.Image, triangle Triangle2D, color color.Color)
Types ¶
type Triangle2D ¶
type Triangle2D struct {
// contains filtered or unexported fields
}
func NewTriangle ¶
func NewTriangle(x1, y1, x2, y2, x3, y3 int) Triangle2D
func (*Triangle2D) GetVert ¶
func (self *Triangle2D) GetVert(i int) Point2D
func (*Triangle2D) SetVert ¶
func (self *Triangle2D) SetVert(i int, x, y int)
func (*Triangle2D) SortByY ¶
func (self *Triangle2D) SortByY()
Click to show internal directories.
Click to hide internal directories.