Package pyjsdl :: Module display :: Class Canvas

Class Canvas

pyjsobj.HTML5Canvas --+    
                      |    
        surface.Surface --+
                          |
                         Canvas

Instance Methods
 
__init__(self, size, buffered)
Return Surface subclassed from a Canvas implementation. The size argument is the dimension (w,h) of surface.
 
onMouseMove(self, sender, x, y)
 
onMouseDown(self, sender, x, y)
 
onMouseUp(self, sender, x, y)
 
onMouseEnter(self, sender)
 
onMouseLeave(self, sender)
 
onMouseWheel(self, event)
 
onKeyEvent(self, event)
 
onKeyDown(self, sender, keycode, mods)
 
onKeyUp(self, sender, keycode, mods)
 
onTouchInitiate(self, event)
 
onTouchStart(self, event)
 
onTouchEnd(self, event)
 
onTouchMove(self, event)
 
onTouchCancel(self, event)
 
preventContextMenu(self, setting=True)
Control contextmenu event. Optional bool setting to prevent event, default to True.
 
resize(self, width, height)
Resize surface.
 
set_callback(self, cb)
 
load_images(self, images)
 
onImagesLoaded(self, images)
 
start(self)
 
stop(self)
 
update(self, timestamp)
 
render(self)
 
run(self)

Inherited from surface.Surface: __repr__, __str__, blit, copy, fill, getSubimage, get_at, get_colorkey, get_height, get_offset, get_parent, get_rect, get_size, get_width, replace_color, set_at, set_colorkey, subsurface, toDataURL

Method Details

__init__(self, size, buffered)
(Constructor)

 

Return Surface subclassed from a Canvas implementation. The size argument is the dimension (w,h) of surface.

Module initialization places pyjsdl.Surface in module's namespace.

Overrides: surface.Surface.__init__
(inherited documentation)

resize(self, width, height)

 
Resize surface.
Overrides: surface.Surface.resize
(inherited documentation)