class OpenXml::DrawingML::Properties::Path

Constants

FILL_MODES

TODO: Implement child classes child_classes :path_close, :path_move_to, :path_line_to, :path_arc_to,

:path_quadradic_bezier_to, :cubic_bezier_to

Public Instance Methods

render?() click to toggle source
Calls superclass method
# File lib/openxml/drawingml/properties/path.rb, line 27
def render?
  attributes.keys.map(&method(:send)).any? { |value| !value.nil? } || super
end

Private Instance Methods

positive_coordinate(value) click to toggle source
# File lib/openxml/drawingml/properties/path.rb, line 33
def positive_coordinate(value)
  message = "Invalid coordinate: should either be an integer (in EMUs) or include a unit"
  raise ArgumentError, message unless positive_universal_measure?(value) || positive_integer?(value)
end
positive_integer?(value) click to toggle source
# File lib/openxml/drawingml/properties/path.rb, line 42
def positive_integer?(value)
  value.is_a?(Integer) && value >= 0
end
positive_universal_measure?(value) click to toggle source
# File lib/openxml/drawingml/properties/path.rb, line 38
def positive_universal_measure?(value)
  value.is_a?(String) && value =~ OpenXml::DrawingML::ST_PositiveUniversalMeasure
end