Package pyjamas :: Package Canvas :: Module GWTCanvas :: Class GWTCanvas
[hide private]
[frames] | no frames]

Class GWTCanvas

source code

                 object --+                
                          |                
                 ui.Applier --+            
                              |            
           ui.UIObject.UIObject --+        
                                  |        
                   ui.Widget.Widget --+    
                                      |    
      ui.FocusListener.FocusHandler --+    
                                      |    
ui.KeyboardListener.KeyboardHandler --+    
                                      |    
                         object --+   |    
                                  |   |    
      ui.MouseListener.MouseHandler --+    
                                      |    
                         object --+   |    
                                  |   |    
      ui.ClickListener.ClickHandler --+    
                                      |    
                ui.Focus.FocusMixin --+    
                                      |    
             ui.FocusWidget.FocusWidget --+
                                          |
                                         GWTCanvas

* * Creates a GWTCanvas element. Element type depends on deferred binding. * Default is CANVAS HTML5 DOM element. In the case of IE it should be VML. * * <p> * Different coordinate spaces and pixel spaces will cause aliased scaling. * Use <code>scale(double,double)</code> and consistent coordinate and pixel * spaces for better results. * </p> * * @param coordX the size of the coordinate space in the x direction * @param coordY the size of the coordinate space in the y direction * @param pixelX the CSS width in pixels of the canvas element * @param pixelY the CSS height in pixels of the canvas element

Instance Methods [hide private]
 
__init__(self, coordX=300, coordY=150, pixelX=300, pixelY=150, **kwargs)
* Impl Instance.
source code
 
getCanvasElement(self) source code
 
getCanvasImpl(self) source code
 
arc(self, x, y, radius, startAngle, endAngle, antiClockwise) source code
 
beginPath(self) source code
 
clear(self) source code
 
closePath(self) source code
 
createLinearGradient(self, x0, y0, x1, y1) source code
 
createRadialGradient(self, x0, y0, r0, x1, y1, r1) source code
 
cubicCurveTo(self, cp1x, cp1y, cp2x, cp2y, x, y) source code
 
drawImage(self, img, *args) source code
 
fill(self) source code
 
fillRect(self, startX, startY, width, height) source code
 
fillText(self, text, startX, startY, maxWidth=None) source code
 
getCoordHeight(self) source code
 
getCoordWidth(self) source code
 
getGlobalAlpha(self) source code
 
getGlobalCompositeOperation(self) source code
 
getLineCap(self) source code
 
getLineJoin(self) source code
 
getLineWidth(self) source code
 
getMiterLimit(self) source code
 
lineTo(self, x, y) source code
 
moveTo(self, x, y) source code
 
quadraticCurveTo(self, cpx, cpy, x, y) source code
 
rect(self, startX, startY, width, height) source code
 
resize(self, width, height) source code
 
restoreContext(self) source code
 
rotate(self, angle) source code
 
saveContext(self) source code
 
scale(self, x, y) source code
 
setBackgroundColor(self, color) source code
 
setCoordHeight(self, height) source code
 
setCoordSize(self, width, height) source code
 
setCoordWidth(self, width) source code
 
setFillStyle(self, grad) source code
 
setGlobalAlpha(self, alpha) source code
 
setGlobalCompositeOperation(self, globalCompositeOperation) source code
 
setLineCap(self, lineCap) source code
 
setLineJoin(self, lineJoin) source code
 
setLineWidth(self, width) source code
 
setMiterLimit(self, miterLimit) source code
 
setPixelHeight(self, height) source code
 
setPixelWidth(self, width) source code
 
setStrokeStyle(self, grad) source code
 
stroke(self) source code
 
strokeRect(self, startX, startY, width, height) source code
 
transform(self, m11, m12, m21, m22, dx, dy) source code
 
translate(self, x, y) source code

Inherited from ui.Widget.Widget: doAttachChildren, doDetachChildren, getID, getLayoutData, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, setContextMenu, setID, setLayoutData, setParent

Inherited from ui.UIObject.UIObject: addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getHeight, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, getWidth, isVisible, removeStyleDependentName, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setWidth, setzIndex, sinkEvents, unsinkEvents

Inherited from ui.FocusListener.FocusHandler: addFocusListener, onFocus, onLostFocus, removeFocusListener

Inherited from ui.KeyboardListener.KeyboardHandler: addKeyboardListener, onKeyDown, onKeyPress, onKeyUp, removeKeyboardListener

Inherited from ui.MouseListener.MouseHandler: addMouseListener, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, removeMouseListener

Inherited from ui.ClickListener.ClickHandler: addClickListener, addDoubleClickListener, onClick, onDoubleClick, removeClickListener, removeDoubleClickListener

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from ui.Focus.FocusMixin: getTabIndex, isEnabled, isReadonly, setAccessKey, setEnabled, setFocus, setReadonly, setTabIndex

Instance Variables [hide private]
  coordHeight
* * Sets the coordinate space of the Canvas.
  coordWidth
* * Set the current Fill Style to the specified color gradient.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, coordX=300, coordY=150, pixelX=300, pixelY=150, **kwargs)
(Constructor)

source code 

* Impl Instance. Compiler should statify all the methods, so we * do not end up with duplicate code for each canvas instance.

Overrides: object.__init__

Instance Variable Details [hide private]

coordHeight

* * Sets the coordinate space of the Canvas. * <p> * This will erase the canvas contents! * </p> * * @param width the size of the x component of the coordinate space * @param height the size of the y component of the coordinate space

coordWidth

* * Set the current Fill Style to the specified color gradient. * * @param grad {@link CanvasGradient}