-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Asmuth
committed
Aug 5, 2011
1 parent
5c22d95
commit 2888450
Showing
15 changed files
with
521 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 1,16 @@ | ||
// Copyright 2009 The geom Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//target:github.com/skelterjohn/geom | ||
package geom | ||
|
||
type Bounded interface { | ||
Bounds() (bounds *Rect) | ||
} | ||
|
||
type Transformable interface { | ||
Translate(offset Point) | ||
Rotate(rad float64) | ||
Scale(xfactor, yfactor float64) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,35 @@ | ||
package qtree | ||
|
||
/* | ||
A number of tests to test qtree's ability to analyze the differences between | ||
collections of shapes | ||
*/ | ||
|
||
import ( | ||
"github.com/skelterjohn/geom" | ||
) | ||
|
||
func col1() (items []Item) { | ||
items = append(items, Item(&geom.Rect{geom.Point{0, 0}, geom.Point{1, 1}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{0, 2}, geom.Point{1, 3}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{2, 2}, geom.Point{3, 3}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{2, 0}, geom.Point{3, 1}})) | ||
return | ||
} | ||
|
||
func col2() (items []Item) { | ||
items = append(items, Item(&geom.Rect{geom.Point{10, 0}, geom.Point{11, 1}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{10, 2}, geom.Point{11, 3}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{12, 2}, geom.Point{13, 3}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{12, 0}, geom.Point{13, 1}})) | ||
return | ||
} | ||
|
||
func col3() (items []Item) { | ||
items = append(items, Item(&geom.Rect{geom.Point{0, 10}, geom.Point{1, 11}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{0, 12}, geom.Point{1, 13}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{2, 12}, geom.Point{3, 13}})) | ||
items = append(items, Item(&geom.Rect{geom.Point{2, 10}, geom.Point{3, 11}})) | ||
return | ||
} | ||
|
Oops, something went wrong.