diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-17 01:16:50 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-17 01:16:50 +0200 |
commit | c655f7c3a776f0e17172eea56b753b87f52916aa (patch) | |
tree | d8867c1a4ebb9dca2b6474233d077998b4d1829b /robo.go | |
parent | b7549ce99e0de217c735f01a5213461f4d43a3d6 (diff) |
Scale font
Diffstat (limited to 'robo.go')
-rw-r--r-- | robo.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -49,6 +49,17 @@ func (p Point) SearchMarksManual(c *bufio.ReadWriter) bool { return parseUnit(recv(c.Reader)) == 0 } +func (p Point) Scale(f Unit) Point { + return Point{p.X * f, p.Y * f} +} + +func (ph Path) Scale(f Unit) (ret Path) { + for _, p := range ph { + ret = append(ret, p.Scale(f)) + } + return +} + func (ph Path) send(c *bufio.Writer, a ...interface{}) { fmt.Fprint(c, a...) for _, p := range ph { |