← Previous Next →

Scrawl-canvas v8 - Canvas test 004

Radial gradients

paletteStart
paletteEnd
Cycle palette
 
 
Int. color space
Ret. color space
startX
endX
startY
endY
startRadius
endRadius
Include red
Include blue
Easing
Precision
Screen capture image of the demo canvas

To note: Javascript is not running in this browser environment. The canvas element is ignored; instead a placeholder image displays where the canvas would have appeared.

Test purpose

Additionally, test to make sure canvas responds correctly to external dimensions resizing - <canvas> element is responsive - by changing its width and height values using the controls.

Known issue: the ability to resize the canvas using a container element with CSS resize: both setting does not work on Safari browsers. This is - allegedly - due to an canvas overflow which triggers the <canvas> element's z-index setting to increase ... which then stops the mouse drag event hitting the container element's drag corner. One (extremely ugly!) fix is to always display scrollbars on the container (overflow: scroll). A better solution is to supply UX controls in the HTML markup to handle a user's desire to resize the canvas container.

Touch test: canvas should be resizable

Annotated code