Method: Tk::BLT::PlotComponent::Marker.create

Defined in:
lib/tkextlib/blt/component.rb

.create(chart, keys = {}) ⇒ Object



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
# File 'lib/tkextlib/blt/component.rb', line 1275

def self.create(chart, keys={})
  unless self::MarkerTypeName
    fail RuntimeError, "#{self} is an abstract class"
  end
  args, fontkeys, methodkeys = _parse_create_args(keys)
  idnum = tk_call_without_enc(chart.path, 'marker', 'create',
                              self::MarkerTypeName, *args)
  chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
  chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
  idnum.to_i  # 'item id' is an integer number
end