class Rubyvis::Rule

Public Class Methods

defaults() click to toggle source
# File lib/rubyvis/mark/rule.rb, line 10
def self.defaults
  Rule.new.mark_extend(Mark.defaults).line_width(1).stroke_style('black').antialias(false)
end

Public Instance Methods

anchor(name) click to toggle source
# File lib/rubyvis/mark/rule.rb, line 18
def anchor(name)
  line_anchor(name)
end
build_implied(s) click to toggle source
# File lib/rubyvis/mark/rule.rb, line 21
def build_implied(s)
  l=s.left
  r=s.right
  #t=s.top
  #b=s.bottom
  
  if((!s.width.nil?) or ((l.nil?) and (r.nil?)) or ((!r.nil?) and (!l.nil?)))
    s.height=0
  else
    s.width=0
  end
  mark_build_implied(s)
end
type() click to toggle source
# File lib/rubyvis/mark/rule.rb, line 14
def type
  'rule'
end