File: color.rb

package info (click to toggle)
ruby-cairo 1.16.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,468 kB
  • sloc: ruby: 11,856; ansic: 9,835; sh: 36; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 195 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
require 'cairo/color'

module Cairo
  class Context
    module Color
      def set_source_color(color)
        set_source_rgba(*Cairo::Color.parse(color).to_rgb.to_a)
      end
    end
  end
end