Class createjs.Renderer
				
				
			
				
				
				
					
Defined in:  renderer.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
							 
								createjs.Renderer(canvas, width, height)
							 
							An abstract class that renders shapes and objects to an HTMLCanvasElement
object. 
						 | 
					
| Field Attributes | Field Name and Description | 
|---|---|
| <static> | 
								 
								createjs.Renderer.Composition
								 
								Composite operations. 
							 | 
						
| <static> | 
								 
								createjs.Renderer.Extension
								 
								Extensions. 
							 | 
						
| <static> | 
								 
								createjs.Renderer.Format
								 
								Color formats used by WebGLTextures. 
							 | 
						
| <static> | 
								 
								createjs.Renderer.Mask
								 
								Mask methods. 
							 | 
						
| Method Attributes | Method Name and Description | 
|---|---|
| 
								 addDirtyObject(object)
								 
								Adds a dirty object to another renderer. 
							 | 
						|
| 
								 addObject(object)
								 
								Adds an object to the rendering queue. 
							 | 
						|
| 
								 begin()
								 
								Starts paints objects. 
							 | 
						|
| 
								 destroy()
								 
								Destroys the resources attached to this renderer. 
							 | 
						|
| 
								 drawCanvas(canvas, x, y, width, height)
								 
								Draws an HTMLCanvasElement object to the specified rectangle. 
							 | 
						|
| 
								 drawPartial(image, srcX, srcY, srcWidth, srcHeight, x, y, width, height)
								 
								Draws a part of an HTMLImageElement object to the specified rectangle. 
							 | 
						|
| 
								 drawVideo(video, x, y, width, height)
								 
								Draws an HTMLVideoElement object to the specified rectangle. 
							 | 
						|
| 
								
								 Returns the HTMLCanvasElement object attached to this renderer. 
							 | 
						|
| <static> | 
								 createjs.Renderer.getCompositionKey(name)
								 
								Returns the composition ID associated with the specified name. 
							 | 
						
| <static> | 
								 createjs.Renderer.getCompositionName(key)
								 
								Returns the composition name from the specified ID. 
							 | 
						
| 
								
								 Returns the ratio of a point in this renderer to one of CSS. 
							 | 
						|
| 
								
								 Returns a bit-mask representing the extensions supported by this renderer. 
							 | 
						|
| 
								
								 Returns the height. 
							 | 
						|
| 
								 getWidth()
								 
								Returns the width. 
							 | 
						|
| 
								 paint(time)
								 
								Paints objects added to this renderer. 
							 | 
						|
| <static> | 
								 createjs.Renderer.RenderObject()
								 
								An interface used by a renderer object to draw objects registered with the
paintObject() method. 
							 | 
						
| 
								
								 Resets the HTMLCanvasElement object attached to this renderer. 
							 | 
						|
| 
								 setAlpha(alpha)
								 
								Sets the alpha value. 
							 | 
						|
| 
								 setColorMatrix(matrix)
								 
								Sets the color matrix. 
							 | 
						|
| 
								 setComposition(operation)
								 
								Sets the color-composition operation. 
							 | 
						|
| 
								 setHeight(height)
								 
								Synchronizes the height properties of this renderer with the specified one. 
							 | 
						|
| 
								 setTransformation(a, b, c, d, tx, ty)
								 
								Sets an affine transformation. 
							 | 
						|
| 
								 setWidth(width)
								 
								Synchronizes the width property of this renderer with the specified one. 
							 | 
						|
| 
								 uncache(image)
								 
								Deletes the cache for the specified image. 
							 | 
						|
| 
								 updateCanvas(context)
								 
								Updates the layout of the HTMLCanvasElement object attached to this renderer. 
							 | 
						
					Class Detail
				
				
				
						createjs.Renderer(canvas, width, height)
				
				
				
					An abstract class that renders shapes and objects to an HTMLCanvasElement
object.
					
				
				
				
				
				
					
						- Parameters:
 - {HTMLCanvasElement} canvas
 - {number} width
 - {number} height
 
					Field Detail
				
				
					 
					<static> 
					
					
					createjs.Renderer.Composition
					
					
					
						Composite operations.
						
						
					
					
					
						
						
						
						
					<static> 
					
					
					createjs.Renderer.Extension
					
					
					
						Extensions.
						
						
					
					
					
						
						
						
						
					<static> 
					
					
					createjs.Renderer.Format
					
					
					
						Color formats used by WebGLTextures.
						
						
					
					
					
						
						
						
						
					<static> 
					
					
					createjs.Renderer.Mask
					
					
					
						Mask methods.
						
						
					
					
					
						
						
						
						
					
				
			
		
			
				
					Method Detail
				
				
					 
					
					
					
					addDirtyObject(object)
					
					
					
						Adds a dirty object to another renderer.
						
						
					
					
					
					
						
							- Parameters:
 - {createjs.Renderer.RenderObject} object
 
					
					
					addObject(object)
					
					
					
						Adds an object to the rendering queue.
						
						
					
					
					
					
						
							- Parameters:
 - {createjs.Renderer.RenderObject} object
 
					
					
					begin()
					
					
					
						Starts paints objects.
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					destroy()
					
					
					
						Destroys the resources attached to this renderer.
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					drawCanvas(canvas, x, y, width, height)
					
					
					
						Draws an HTMLCanvasElement object to the specified rectangle.
						
						
					
					
					
					
						
							- Parameters:
 - {HTMLCanvasElement} canvas
 - {number} x
 - {number} y
 - {number} width
 - {number} height
 
					
					
					drawPartial(image, srcX, srcY, srcWidth, srcHeight, x, y, width, height)
					
					
					
						Draws a part of an HTMLImageElement object to the specified rectangle.
						
						
					
					
					
					
						
							- Parameters:
 - {HTMLImageElement} image
 - {number} srcX
 - {number} srcY
 - {number} srcWidth
 - {number} srcHeight
 - {number} x
 - {number} y
 - {number} width
 - {number} height
 
					
					
					drawVideo(video, x, y, width, height)
					
					
					
						Draws an HTMLVideoElement object to the specified rectangle.
						
						
					
					
					
					
						
							- Parameters:
 - {HTMLVideoElement} video
 - {number} x
 - {number} y
 - {number} width
 - {number} height
 
					
					{HTMLCanvasElement}
					getCanvas()
					
					
					
						Returns the HTMLCanvasElement object attached to this renderer.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {HTMLCanvasElement}
 
<static> 
					
					{number}
					createjs.Renderer.getCompositionKey(name)
					
					
					
						Returns the composition ID associated with the specified name.
						
						
					
					
					
					
						
							- Parameters:
 - {string} name
 
- Returns:
 - {number}
 
<static> 
					
					{string}
					createjs.Renderer.getCompositionName(key)
					
					
					
						Returns the composition name from the specified ID.
						
						
					
					
					
					
						
							- Parameters:
 - {number} key
 
- Returns:
 - {string}
 
					
					{createjs.Point}
					getCSSRatio()
					
					
					
						Returns the ratio of a point in this renderer to one of CSS.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {createjs.Point}
 
					
					{number}
					getExtensions()
					
					
					
						Returns a bit-mask representing the extensions supported by this renderer.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {number}
 
					
					{number}
					getHeight()
					
					
					
						Returns the height.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {number}
 
					
					{number}
					getWidth()
					
					
					
						Returns the width.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {number}
 
					
					
					paint(time)
					
					
					
						Paints objects added to this renderer. This method returns true if this
renderer actually draws objects.
						
						
					
					
					
					
						
							- Parameters:
 - {number} time
 
<static> 
					
					
					createjs.Renderer.RenderObject()
					
					
					
						An interface used by a renderer object to draw objects registered with the
paintObject() method.
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					resetCanvas()
					
					
					
						Resets the HTMLCanvasElement object attached to this renderer.
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					setAlpha(alpha)
					
					
					
						Sets the alpha value.
						
						
					
					
					
					
						
							- Parameters:
 - {number} alpha
 
					
					
					setColorMatrix(matrix)
					
					
					
						Sets the color matrix.
						
						
					
					
					
					
						
							- Parameters:
 - 
									{Array.
} matrix 
					
					
					setComposition(operation)
					
					
					
						Sets the color-composition operation.
						
						
					
					
					
					
						
							- Parameters:
 - {number} operation
 
					
					
					setHeight(height)
					
					
					
						Synchronizes the height properties of this renderer with the specified one.
						
						
					
					
					
					
						
							- Parameters:
 - {number} height
 
					
					
					setTransformation(a, b, c, d, tx, ty)
					
					
					
						Sets an affine transformation.
						
						
					
					
					
					
						
							- Parameters:
 - {number} a
 - {number} b
 - {number} c
 - {number} d
 - {number} tx
 - {number} ty
 
					
					
					setWidth(width)
					
					
					
						Synchronizes the width property of this renderer with the specified one.
						
						
					
					
					
					
						
							- Parameters:
 - {number} width
 
					
					
					uncache(image)
					
					
					
						Deletes the cache for the specified image.
						
						
					
					
					
					
						
							- Parameters:
 - {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image
 
					
					
					updateCanvas(context)
					
					
					
						Updates the layout of the HTMLCanvasElement object attached to this renderer.
						
						
					
					
					
					
						
							- Parameters:
 - {string} context