Package pyjsdl :: Module pyjsobj :: Class HTML5Canvas

Class HTML5Canvas

 Element --+    
           |    
FocusElement --+
               |
              HTML5Canvas

Instance Methods
 
__init__(self, width, height)
 
resize(self, width, height)
 
drawImage(self, image, *args)
 
fill(self)
 
setFillStyle(self, style)
 
fillRect(self, x, y, width, height)
 
clear(self)
 
setLineWidth(self, width)
 
setStrokeStyle(self, style)
 
strokeRect(self, x, y, width, height)
 
saveContext(self)
 
restoreContext(self)
 
translate(self, x, y)
 
scale(self, x, y)
 
rotate(self, angle)
 
transform(self, m11, m12, m21, m22, dx, dy)
 
arc(self, x, y, r, sAngle, eAngle, counterclockwise)
 
beginPath(self)
 
closePath(self)
 
moveTo(self, x, y)
 
lineTo(self, x, y)
 
stroke(self)
 
setFont(self, font)
 
setTextAlign(self, align)
 
setTextBaseline(self, baseline)
 
fillText(self, text, x, y)
 
strokeText(self, text, x, y)
 
measureText(self, text)
 
getImageData(self, x, y, width, height)
 
putImageData(self, *args)
 
getContext(self, ctx_type='2d', ctx_attr=None)
 
toDataURL(self, img_type='image/png', enc_options=0.92)
 
toBlob(self, callback, img_type='image/png', quality=0.92)
 
getElement(self)

Inherited from FocusElement: addFocusListener, addKeyEventListener, addKeyboardListener, addMouseListener, blur, focus, onBlur, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, onMouseWheel, onTouchCancel, onTouchEnd, onTouchInitiate, onTouchMove, onTouchStart, removeKeyEventListener, sinkEvents

Inherited from Element: addEventListener, appendChild, click, getAttribute, getAttributes, getBoundingClientRect, getClientHeight, getClientLeft, getClientTop, getClientWidth, getID, getMouseWheelEventType, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getStyle, getTitle, removeChild, removeEventListener, setAttribute, setElement, setHeight, setID, setSize, setTitle, setWidth, style

Method Details

__init__(self, width, height)
(Constructor)

 
Overrides: Element.__init__

getElement(self)

 
Overrides: Element.getElement