Changes

Jump to: navigation, search
no edit summary
== Project Name ==
Porting pushStyle(), popStyle(), boolean(), and booleanstrokeCap() to Processing.js
== Project Description ==
[http://processingjs.org/ Processing.js] remains incomplete as a port of [http://processing.org/ Processing]. Among the features still to be implemented are the functions [http://processing.org/reference/pushStyle_.html ''pushStyle()''], [http://processing.org/reference/popStyle_.html ''popStyle()''], and [http://processing.org/reference/boolean_.html ''boolean()''], and [http://processing.org/reference/strokeCap_.html ''strokeCap()'']. The first two functions automatically save style information for later retrieval and reuse. The last ''boolean()'' "converts" arguments into a boolean value. ''strokeCap()'' determines how the ends of lines are rendered.
== Resources ==
== 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.
''pushStyle===boolean()===*Non-zero numeric values become '' calls true''curContext.save**Bytes ()0's and 1' and increments s) are interpreted as numeric values.*''pushedStatesnull'' by one. and ''popStyle()undefine'' checks if there are any saved states via become ''pushedStatesfalse''. If there *Boolean arguments are none an error notice to the console or returned as a JavaScript alert, in an attempt to provide similar behaviour to Processing's implementation. If there are saved states, the function calls ''curContext.restore()'' and decrements ''pushedStates'' by onethemselves.
====Related Mozilla bugs====
1
edit

Navigation menu