P1 wallpaper group var P1 = []Matrix{Identity} Pm wallpaper group var Pm = []Matrix{ Identity, Identity.ReflectYAbout(0.5), } Pg wallpaper group var Pg = []Matrix{ Identity, Identity.Translate(0.5, 0.0).ReflectYAbout(0.5), } func Cm(x, y float64) Tiler { return Tiler{ Point{x, 0.0}, Point
(clip *Path, cell Matrix)
| 291 | |
| 292 | // Tile tiles a path within a clipping path using the given primitive cell. |
| 293 | func (p *Path) Tile(clip *Path, cell Matrix) *Path { |
| 294 | // get path overflow out of cell |
| 295 | bounds := p.FastBounds() |
| 296 | clipBounds := clip.FastBounds() |
| 297 | cells := TileRectangle(cell, clipBounds, bounds) |
| 298 | |
| 299 | // append all tiles |
| 300 | r := &Path{} |
| 301 | for _, cell := range cells { |
| 302 | pos := cell.Dot(Origin) |
| 303 | r = r.Append(p.Copy().Translate(pos.X, pos.Y)) |
| 304 | } |
| 305 | return r.And(clip) |
| 306 | } |
| 307 | |
| 308 | // Triangulate tessellates the path with triangles that fill the path. WIP |
| 309 | func (p *Path) Triangulate() ([][3]Point, [][5]Point) { |
no test coverage detected