Should work with sub-images now
This commit is contained in:
@@ -10,12 +10,12 @@ func main () {
|
||||
canvas := ggfx.Image[uint8] {
|
||||
Pix: img.Pix,
|
||||
Stride: img.Stride,
|
||||
Bounds: img.Rect,
|
||||
Rect: img.Rect,
|
||||
Width: 4,
|
||||
}
|
||||
black := []uint8 { 0, 0, 0, 255 }
|
||||
yellow := []uint8 { 255, 255, 0, 255 }
|
||||
midpoint := image.Pt(canvas.Bounds.Dx() / 2, canvas.Bounds.Dy() / 2)
|
||||
midpoint := image.Pt(canvas.Rect.Dx() / 2, canvas.Rect.Dy() / 2)
|
||||
|
||||
face := ggfx.Circle(32, 100, midpoint)
|
||||
canvas.FillPolygon(yellow, face...)
|
||||
|
||||
@@ -10,14 +10,14 @@ func main () {
|
||||
canvas := ggfx.Image[uint8] {
|
||||
Pix: img.Pix,
|
||||
Stride: img.Stride,
|
||||
Bounds: img.Rect,
|
||||
Rect: img.Rect,
|
||||
Width: 4,
|
||||
}
|
||||
black := []uint8 { 0, 0, 0, 255 }
|
||||
orange := []uint8 { 255, 48, 0, 255 }
|
||||
midpoint := image.Pt(canvas.Bounds.Dx() / 2, canvas.Bounds.Dy() / 2)
|
||||
midpoint := image.Pt(canvas.Rect.Dx() / 2, canvas.Rect.Dy() / 2)
|
||||
|
||||
canvas.FillRectangle(orange, canvas.Bounds)
|
||||
canvas.FillRectangle(orange, canvas.Rect)
|
||||
for x := 1; x <= 6; x ++ {
|
||||
point := image.Pt(x, 7 - x)
|
||||
canvas.FillRectangle(black, image.Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user