Class: EideticRML::Widgets::Ellipse

Inherits:
Container show all
Includes:
Shape
Defined in:
lib/erml_widgets.rb

Instance Attribute Summary

Attributes inherited from Container

#children

Attributes inherited from Widget

#disabled, #height_pct, #max_height_pct, #max_width_pct, #parent, #printed, #visible, #width_pct

Instance Method Summary collapse

Methods included from HasLocation

#x, #y

Methods inherited from Container

#after_layout, #cols, #initialize, #initialize_copy, #layout, #layout_container, #layout_widget, #leaf?, #leaves, #more, #order, #overflow, #paragraph_style, #preferred_content_height, #preferred_content_width, #preferred_height, #preferred_width, #printed, #rows, #source, #visible

Methods inherited from Widget

#after_layout, #align, #attributes, #before_layout, #border, #border_bottom, #border_left, #border_right, #border_top, #bottom, #clone, #colspan, #content_bottom, #content_height, #content_left, #content_right, #content_top, #content_width, #default_padding_bottom, #default_padding_left, #default_padding_right, #default_padding_top, #display, #display_for_page, #fill, #font, #font_color, #font_size, #font_style, #font_weight, #has_height?, #has_width?, #height, #id, #initialize, #initialize_copy, #klass, #layout_widget, #leaf?, #leaves, #left, #margin, #margin_bottom, #margin_left, #margin_right, #margin_top, #max_content_height, #max_height, #max_height_avail, #max_width, #non_content_height, #non_content_width, #origin_x, #origin_y, #padding, #padding_bottom, #padding_left, #padding_right, #padding_top, #path, #position, #preferred_height, #preferred_width, #print, #right, #root, #root_page, #rotate, #rowspan, #selector_tag, #shift, #tag, #top, #units, #width, #z_index

Methods included from Support

#from_units, parse_measurement, parse_measurement_pts, #to_units

Constructor Details

This class inherits a constructor from EideticRML::Widgets::Container

Instance Method Details

#rotation(value = nil) ⇒ Object



1345
1346
1347
# File 'lib/erml_widgets.rb', line 1345

def rotation(value=nil)
  # TODO
end

#rx(value = nil) ⇒ Object



1349
1350
1351
1352
1353
1354
1355
# File 'lib/erml_widgets.rb', line 1349

def rx(value=nil)
  return @rx if value.nil?
  return to_units(value, @rx) if value.is_a?(Symbol)
  @rx = parse_measurement_pts(value, units || self.units)
  @rx = (width - margin_left - margin_right).quo(2) + @rx if @rx < 0
  @width ||= @rx * 2 + margin_left + margin_right
end

#ry(value = nil) ⇒ Object



1357
1358
1359
1360
1361
1362
1363
# File 'lib/erml_widgets.rb', line 1357

def ry(value=nil)
  return @ry if value.nil?
  return to_units(value, @ry) if value.is_a?(Symbol)
  @ry = parse_measurement_pts(value, units || self.units)
  @ry = (height - margin_top - margin_bottom).quo(2) + @ry if @ry < 0
  @height ||= @ry * 2 + margin_top + margin_bottom
end