Project Name
Porting pushStyle(), popStyle(), boolean(), and strokeCap() to Processing.js
Project Description
Processing.js remains incomplete as a port of Processing. Among the features still to be implemented are the functions pushStyle(), popStyle(), boolean(), and strokeCap(). The first two functions automatically save style information for later retrieval and reuse. boolean() "converts" arguments into a boolean value. strokeCap() determines how the ends of lines are rendered.
Resources
Project Leader(s)
Project Contributor(s)
Project Details
pushStyle() and popStyle()
- The number of states saved is tracked by pushedStates.
- pushStyle() calls curContext.save() and increments pushedStates by one.
- Excess pops are ignored.
boolean()
- Non-zero numeric values become true
- Bytes (0's and 1's) are interpreted as numeric values.
- null and undefine become false.
- Boolean arguments are returned as themselves.
Related Mozilla bugs
- #451165 - CanvasRenderingContext2D.fillStyle and strokeStyle accept invalid colours
- pushStyle() and popStyle() use CanvasRenderingContext2D.save() and restore(). These functions save fillStyle and strokeStyle.
boolean()
Things to do
Releases
Version
|
Notes
|
Resources
|
0.2
|
Bug fixes for pushStyle(), popStyle(), and boolean(). Functions now functional.
|
Patch
|
0.1
|
Basic functionality for pushStyle() and popStyle(). Totally untested code for boolean().
|
Patch
|
Project News