File: triangle.rb

package info (click to toggle)
ruby-cairo 1.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 900 kB
  • ctags: 1,364
  • sloc: ansic: 9,174; ruby: 3,620; sh: 116; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 211 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
module Cairo
  class Context
    module Triangle
      def triangle(x1, y1, x2, y2, x3, y3)
        move_to(x1, y1)
        line_to(x2, y2)
        line_to(x3, y3)
        close_path
      end
    end
  end
end