Sha256: 4caa4fd2ac387d681c71333a1bfc1c89354de8485e4e0f72ccba15d497873528

Contents?: true

Size: 907 Bytes

Versions: 127

Compression:

Stored size: 907 Bytes

Contents

module Cairo
  define_constants = Proc.new do |const_module, prefix, target|
    target ||= self
    const_module.constants.each do |const_name|
      target.const_set([prefix, const_name].compact.join("_"),
                       const_module.const_get(const_name))
    end
  end

  %w(operator antialias fill_rule line_cap line_join font_slant
     font_weight subpixel_order hint_style hint_metrics content
     format extend filter).each do |name|
    module_name = name.split(/_/).collect {|component| component.capitalize}.join
    define_constants.call(const_get(module_name), name.upcase)
  end

  define_constants.call(PathDataType, "PATH")
  define_constants.call(PathDataType, nil, Path)
  define_constants.call(SVGVersion, nil, SVGSurface)
  define_constants.call(SVGVersion, "SVG")
  if const_defined?(:TextClusterFlag)
    define_constants.call(TextClusterFlag, "TEXT_CLUSTER_FLAG")
  end
end

Version data entries

127 entries across 119 versions & 2 rubygems

Version Path
cairo-1.17.13 lib/cairo/constants.rb
cairo-1.17.12 lib/cairo/constants.rb
cairo-1.17.11 lib/cairo/constants.rb
cairo-1.17.10 lib/cairo/constants.rb
cairo-1.17.9 lib/cairo/constants.rb
cairo-1.17.8 lib/cairo/constants.rb
cairo-1.17.7 lib/cairo/constants.rb
cairo-1.17.6 lib/cairo/constants.rb
cairo-1.17.5 lib/cairo/constants.rb
cairo-1.17.4 lib/cairo/constants.rb
cairo-1.16.6 lib/cairo/constants.rb
cairo-1.16.5 lib/cairo/constants.rb
cairo-1.16.4 lib/cairo/constants.rb
cairo-1.16.3 lib/cairo/constants.rb
cairo-1.16.2 lib/cairo/constants.rb
cairo-1.16.1-x86-mingw32 lib/cairo/constants.rb
cairo-1.16.1-x64-mingw32 lib/cairo/constants.rb
cairo-1.16.1 lib/cairo/constants.rb
cairo-1.16.0-x86-mingw32 lib/cairo/constants.rb
cairo-1.16.0-x64-mingw32 lib/cairo/constants.rb