Class: Kame::Remocon::Opal::Canvas

Inherits:
Object
  • Object
show all
Includes:
Native
Defined in:
lib/kame/remocon/opal/canvas.rb

Defined Under Namespace

Classes: Context, Path2D

Instance Method Summary collapse

Instance Method Details

#get_context(type) ⇒ Object



8
9
10
# File 'lib/kame/remocon/opal/canvas.rb', line 8

def get_context(type)
  Context.new `#@native.getContext(type)`
end

#image_dataObject



12
13
14
# File 'lib/kame/remocon/opal/canvas.rb', line 12

def image_data
  `#@native.toDataURL()`.sub(/^.*,/, "")
end