blob: ec0e4613d5da144b08156b128311b49e01e6fe56 [file] [log] [blame]
Shenghou Ma5b7562d2012-09-03 03:49:03 +08001// cmpout
2
Francisco Souza18f1a712012-03-28 14:20:51 +11003// Copyright 2012 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
9import (
10 "fmt"
11 "image"
12)
13
14func main() {
15 r := image.Rect(0, 0, 4, 3).Intersect(image.Rect(2, 2, 5, 5))
16 // Size returns a rectangle's width and height, as a Point.
17 fmt.Printf("%#v\n", r.Size()) // prints image.Point{X:2, Y:1}
18}