aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-17 01:16:50 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-17 01:16:50 +0200
commitc655f7c3a776f0e17172eea56b753b87f52916aa (patch)
treed8867c1a4ebb9dca2b6474233d077998b4d1829b /robo.go
parentb7549ce99e0de217c735f01a5213461f4d43a3d6 (diff)
Scale font
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/robo.go b/robo.go
index 50e15be..fb4b21d 100644
--- a/robo.go
+++ b/robo.go
@@ -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 {