_setOrChangeColorParam (param, value, penState, change) {
        switch (param) {
        case ColorParam.COLOR:
            penState.color = this._wrapColor(value + (change ? penState.color : 0));
            break;
        case ColorParam.SATURATION:
            penState.saturation = this._clampColorParam(value + (change ? penState.saturation : 0));
            break;
        case ColorParam.BRIGHTNESS:
            penState.brightness = this._clampColorParam(value + (change ? penState.brightness : 0));
            break;
        case ColorParam.TRANSPARENCY:
            penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0));
            break;
        default:
            log.warn(`Tried to set or change unknown color parameter: ${param}`);
        }
        this._updatePenColor(penState);
    }
/**
     * Set or change a single color parameter on the pen state, and update the pen color.
     * @param {ColorParam} param - the name of the color parameter to set or change.
     * @param {number} value - the value to set or change the param by.
     * @param {PenState} penState - the pen state to update.
     * @param {boolean} change - if true change param by value, if false set param to value.
     * @private
     */
Set or change a single color parameter on the pen state, and update the pen color.
@param {ColorParam} param - the name of the color parameter to set or change.
@param {number} value - the value to set or change the param by.
@param {PenState} penState - the pen state to update.
@param {boolean} change - if true change param by value, if false set param to value.
@private
Set or change a single color parameter on the pen state and update the pen color . @param { ColorParam } param - the name of the color parameter to set or change . @param { number } value - the value to set or change the param by . @param { PenState } penState - the pen state to update . @param { boolean } change - if true change param by value if false set param to value . @private
_setOrChangeColorParam (param, value, penState, change) {
        switch (param) {
        case ColorParam.COLOR:
            penState.color = this._wrapColor(value + (change ? penState.color : 0));
            break;
        case ColorParam.SATURATION:
            penState.saturation = this._clampColorParam(value + (change ? penState.saturation : 0));
            break;
        case ColorParam.BRIGHTNESS:
            penState.brightness = this._clampColorParam(value + (change ? penState.brightness : 0));
            break;
        case ColorParam.TRANSPARENCY:
            penState.transparency = this._clampColorParam(value + (change ? penState.transparency : 0));
            break;
        default:
            log.warn(`Tried to set or change unknown color parameter: ${param}`);
        }
        this._updatePenColor(penState);
    }
_setOrChangeColorParam ( param , value , penState , change ) { switch ( param ) { case ColorParam . COLOR : penState . color = this . _wrapColor ( value + ( change ? penState . color : 0 ) ) ; break ; case ColorParam . SATURATION : penState . saturation = this . _clampColorParam ( value + ( change ? penState . saturation : 0 ) ) ; break ; case ColorParam . BRIGHTNESS : penState . brightness = this . _clampColorParam ( value + ( change ? penState . brightness : 0 ) ) ; break ; case ColorParam . TRANSPARENCY : penState . transparency = this . _clampColorParam ( value + ( change ? penState . transparency : 0 ) ) ; break ; default : log . warn ( ` ${ param } ` ) ; } this . _updatePenColor ( penState ) ; }
Set or change a single color parameter on the pen state, and update the pen color.
Set or change a single color parameter on the pen state and update the pen color .