package main import ( "fmt" "image" ) func main() { // Creates an empty rectangle rect := image.Rectangle{} // Prints the rectangle fmt.Println(rect) }
(0,0)-(0,0)
package main import ( "fmt" "image" ) func main() { // Creates an empty rectangle rect := image.Rectangle{} // Sets the width and height of the rectangle rect.Max.X = 10 rect.Max.Y = 5 // Prints the rectangle fmt.Println(rect) }
(0,0)-(10,5)In this example, an empty rectangle is created and its width and height are set. Then, the rectangle is printed on the console. The package library for the Rectangle Empty function is "image".