ker/mod/tfw.view.icon.js
function updatePen( penIndex, penColor = "0" ) {
    if ( !this._content ) return;

    let elementsToFill = this._content.elementsToFillPerColor[ penIndex ];
    if ( !Array.isArray( elementsToFill ) ) elementsToFill = [];
    let elementsToStroke = this._content.elementsToStrokePerColor[ penIndex ];
    if ( !Array.isArray( elementsToStroke ) ) elementsToStroke = [];

    updateColor( elementsToFill, elementsToStroke, penColor );
}
function updatePen( penIndex, penColor = "0" ) {
    if ( !this._content ) return;

    let elementsToFill = this._content.elementsToFillPerColor[ penIndex ];
    if ( !Array.isArray( elementsToFill ) ) elementsToFill = [];
    let elementsToStroke = this._content.elementsToStrokePerColor[ penIndex ];
    if ( !Array.isArray( elementsToStroke ) ) elementsToStroke = [];

    updateColor( elementsToFill, elementsToStroke, penColor );
}
function updatePen ( penIndex , penColor = "0" ) { if ( ! this . _content ) return ; let elementsToFill = this . _content . elementsToFillPerColor [ penIndex ] ; if ( ! Array . isArray ( elementsToFill ) ) elementsToFill = [ ] ; let elementsToStroke = this . _content . elementsToStrokePerColor [ penIndex ] ; if ( ! Array . isArray ( elementsToStroke ) ) elementsToStroke = [ ] ; updateColor ( elementsToFill , elementsToStroke , penColor ) ; }
Update the color of a pen.

@this ViewXJS
@param   {integer} penIndex - The index of the pen.
@param   {string} penColor - The new color of this pen.
@returns {undefined}
Update the color of a pen .