HTML5 Canvas Cheat Sheet v1.1

http://blog.nihilogic.dk/

Canvas element

Compositing

Attributes

Attributes

Name

Type

Default

Name

Type

Default

width

unsigned long

300

globalAlpha

float

1.0

height

unsigned long

150

globalCompositeOperation string source-over Supports any of the following values:

Methods Return

Name

string

toDataURL( [Optional] string type, [Variadic] any args) getContext( string contextId)

Object

source-over

source-in

source-out

2D Context Attributes Name

Type

canvas

HTMLCanvasObject [readonly] source-atop

Methods Return

Name

void void

save( ) restore( )

Transformation

destination-over destination-in

destination-out destination-atop

lighter

Methods Return

Name

void void void void

scale( float x, float y) rotate( float angle) translate( float x, float y) transform( float m11, float m12, float m21, float m22, float dx, float dy) setTransform( float m11, float m12, float m21, float m22, float dx, float dy)

void

copy

xor

Line styles Attributes Name

Type

Default

lineWidth

float

1.0

lineCap string butt Supports any of the following values: butt round square

Image drawing Methods Return

Name

drawImage( Object image, float dx, float dy, [Optional] float dw, float dh) Argument "image" can be of type HTMLImageElement, HTMLCanvasElement or HTMLVideoElement void drawImage( Object image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh) void

lineJoin string miter Supports any of the following values: round bevel miter

miterLimit

float

10

Colors, styles and shadows

Text

Attributes

Attributes

Name

Type

Default

Name

Type

Default

strokeStyle

any

black

font

string

10px sans-serif

fillStyle

any

black

shadowOffsetX

float

0.0

shadowOffsetY

float

0.0

textAlign string start Supports any of the following values: [start, end, left, right, center]

shadowBlur

float

0.0

shadowColor

string

transparent black

Methods Return

Methods Name

createLinearGradient( float x0, float y0, float x1, float y1) CanvasGradient createRadialGradient( float x0, float y0, float r0, float x1, float y1, float r1) CanvasPattern createPattern( Object image, string repetition) Argument "image" can be of type HTMLImageElement, HTMLCanvasElement or HTMLVideoElement "repetition" supports any of the following values: [repeat (default), repeat-x, repeat-y, no-repeat]

CanvasGradient

CanvasGradient interface void

textBaseline string alphabetic Supports any of the following values: [top, hanging, middle, alphabetic, ideographic, bottom]

addColorStop( float offset, string color)

CanvasPattern interface

Return

Name

void

fillText( string text, float x, float y, [Optional] float maxWidth) strokeText( string text, float x, float y, [Optional] float maxWidth) measureText( string text)

void

TextMetrics

TextMetrics interface width

Methods Return

Name

void

clearRect( float x, float y, float w, float h) fillRect( float x, float y, float w, float h) strokeRect( float x, float y, float w, float h)

void void

Methods Return

Name

void void void void void void void void

beginPath( ) closePath( ) fill( ) stroke( ) clip( ) moveTo( float x, float y) lineTo( float x, float y) quadraticCurveTo( float cpx, float cpy, float x, float y ) bezierCurveTo( float cp1x, float cp1y, float cp2x, float cp2y, float x, float y ) arcTo( float x1, float y1, float x2, float y2, float radius ) arc( float x, float y, float radius, float startAngle, float endAngle, boolean anticlockwise ) rect( float x, float y, float w, float h) isPointInPath( float x, float y)

void

void

void

void boolean

[readonly]

Rectangles

No attributes or methods.

Paths

float

Pixel manipulation Methods Return

Name

ImageData ImageData imagedata) ImageData

createImageData( float sw, float sh) createImageData( ImageData

void

getImageData( float sx, float sy, float sw, float sh) putImageData( ImageData imagedata, float dx, float dy, [Optional] float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight)

ImageData interface width

unsigned long

[readonly]

height

unsigned long

[readonly]

data

CanvasPixelArray

[readonly]

CanvasPixelArray interface length

Source: http://www.whatwg.org/specs/web-apps/current-work/ (2009-05-04)

unsigned long

[readonly]

HTML5 Canvas Cheat Sheet [.pdf] - Cheat-Sheets.org

HTML5 Canvas Cheat Sheet v1.1. Page 2. Colors, styles and shadows. Attributes. Name. Type. Default. strokeStyle any black. fillStyle any black. shadowOffsetX.

147KB Sizes 1 Downloads 361 Views

Recommend Documents

git cheat sheet - Cheat-Sheets.org
git clone ssh://[email protected]/repo.git. Create a new local repository. $ git init. LOCAL CHANGES. Changed files in y our working directory. $ git status.

CSS3 Cheat Sheet - GitHub
Border Radius vendor prefix required for iOS

gitchangelog Cheat Sheet - GitHub
new: test: added a bunch of test around user usability of feature X. fix: typo in spelling my name in comment. !minor. By Delqvs cheatography.com/delqvs/. Published 14th August, 2017. Last updated 14th August, 2017. Page 1 of 1. Sponsored by ApolloPa

Cheat sheet Services
Create a Version of your current container, and test it out on your live site by using Preview or Debug mode. Navigate around your site and see if the rules and tags are acting the way you expect. Migrate by removing hard-coded tags: You're almost re

Meterpreter Cheat Sheet - SCADAhacker
Page 1 ... Displays network interfaces information meterpreter> route. View and modify networking routing table meterpreter> portfwd. Establish port forwarding.

Reschedule Cheat Sheet
desire to meet with. • You've realized that your account has a meeting scheduled more than once with the same company. • You have reached your outstanding ...

jQuery Cheat Sheet
6. Traversing. 7. Events. 8. Effects. 10. AJAX. 11. Core. 12 of 2 13 ... DOM Insertion, Inside .append() .appendTo() .html() .prepend() .prependTo() .text().

TOP 150 CHEAT SHEET
2 Ezekiel Elliott. DAL. 8. RB. 52 Lamar Miller. HOU. 10. RB ... 62 Dion Lewis. TEN. 8. RB PPR. 112 Kenny Stills .... Ezekiel Elliott. DAL. 3. 7. A.J. Green. CIN. 4. 11.

Machine Learning Cheat Sheet - GitHub
get lost in the middle way of the derivation process. This cheat sheet ... 3. 2.2. A brief review of probability theory . . . . 3. 2.2.1. Basic concepts . . . . . . . . . . . . . . 3 ...... pdf of standard normal π ... call it classifier) or a decis

Cheat Sheet Subnetting.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Cheat Sheet Subnetting.pdf. Cheat Sheet Subnetting.pdf. Open. Extract. Open with. Sign In. Details. Comments

vi / vim graphical cheat sheet
F "back" fwd. G eof/ goto ln Hscreen top. J join lines. K help. L screen bottom ... version at http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html.

CSS3 Cheat Sheet - Smashing Magazine
display none | inline | block | inline- block | list-item | run-in | compact | table | inline- table | table-row-group | table-header-group | table- footer-group | table-row |.Missing:

R Markdown : : CHEAT SHEET - GitHub
Word, or RTF documents; html or pdf based slides ... stop render when errors occur (FALSE) (default = FALSE) .... colortheme. Beamer color theme to use. X css.

Google+ Cheat Sheet - G Suite
3 Find or follow people. 4 Follow or create collections, which group posts around a topic. Learning Center gsuite.google.com/learning-center.

Overtone Cheat Sheet 0.9.1 - WordPress.com
graphviz. Show PDF show-graphviz-synth ... Generate Buffer Data data->wavetable create-buffer-data ... LINEAR LIN EXPONENTIAL EXP. Onset Analysis.

RTOS Threading Cheat Sheet - GitHub
If the UART is enabled, it causes a data frame to start transmitting with the parameters indicated in the. UARTLCRH register. Data continues to be transmitted ...

Pokemon Go Cheat Sheet 619 ^% Pokemon Go Cheat Codes Ios
Free Pokemon Go hacks and cheats online for Android and iOS devices, which ... 6 Code Generator Pokemon Go Cheats For Ios 10 Live Free Game Generator.

espresso-cheat-sheet-2.1.0.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item.

nikon d5100 cheat sheet pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. nikon d5100 cheat sheet pdf. nikon d5100 cheat sheet pdf. Open.

espresso-cheat-sheet-2.1.0.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

Cheat Sheet V01.pdf
hospital, había leído Cartas. También averiguó por qué las había leído. —Verá —le dijo la joven—; se nos advirtió que en las entrevistas de examen,. después de las preguntas de verdad, las técnicas, las matronas o los médicos. 1. No

wcf cheat sheet pdf
Page 1 of 1. File: Wcf cheat sheet pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. wcf cheat sheet pdf. wcf cheat sheet pdf. Open. Extract. Open with. Sign In. Main menu. Displaying wcf cheat sheet pdf. Page 1