src/lib/myScript/common/penParameters.ts
Parameters used for both input and output canvas draw.
constructor(obj: PenParametersInput)
|
Defined in src/lib/myScript/common/penParameters.ts:30
|
getColor |
getColor()
|
Defined in src/lib/myScript/common/penParameters.ts:48
|
Get the color renderer parameter
Returns:
string
The color of the ink |
setColor |
setColor(color: string)
|
Defined in src/lib/myScript/common/penParameters.ts:58
|
Set the color renderer parameter
Parameters :
Returns:
void
|
getRectColor |
getRectColor()
|
Defined in src/lib/myScript/common/penParameters.ts:68
|
Get the rect renderer parameter
Returns:
string
the rectangle color |
setRectColor |
setRectColor(rectColor: string)
|
Defined in src/lib/myScript/common/penParameters.ts:78
|
Set the rect renderer parameter
Parameters :
Returns:
void
|
getFont |
getFont()
|
Defined in src/lib/myScript/common/penParameters.ts:88
|
Get the font renderer parameter
Returns:
string
The font |
setFont |
setFont(font: string)
|
Defined in src/lib/myScript/common/penParameters.ts:98
|
Set the font renderer parameter
Parameters :
Returns:
void
|
getDecoration |
getDecoration()
|
Defined in src/lib/myScript/common/penParameters.ts:108
|
Get the decoration renderer parameter
Returns:
string
The decoration |
setDecoration |
setDecoration(decoration: string)
|
Defined in src/lib/myScript/common/penParameters.ts:118
|
Set the decoration renderer parameter
Parameters :
Returns:
void
|
getWidth |
getWidth()
|
Defined in src/lib/myScript/common/penParameters.ts:128
|
Get the width renderer parameter
Returns:
number
The ink width |
setWidth |
setWidth(width: number)
|
Defined in src/lib/myScript/common/penParameters.ts:138
|
Set the width renderer parameter
Parameters :
Returns:
void
|
alpha |
alpha: |
Defined in src/lib/myScript/common/penParameters.ts:30
|
color |
color: |
Defined in src/lib/myScript/common/penParameters.ts:24
|
decoration |
decoration: |
Defined in src/lib/myScript/common/penParameters.ts:27
|
font |
font: |
Defined in src/lib/myScript/common/penParameters.ts:26
|
pressureType |
pressureType: |
Defined in src/lib/myScript/common/penParameters.ts:29
|
rectColor |
rectColor: |
Defined in src/lib/myScript/common/penParameters.ts:25
|
width |
width: |
Defined in src/lib/myScript/common/penParameters.ts:28
|
export interface PenParametersInput {
color?: string,
rectColor?: string,
font?: string,
decoration?: string,
width?: number,
pressureType?: string,
alpha?: string,
}
/**
* Parameters used for both input and output canvas draw.
*
* @export
* @class PenParameters
*/
export class PenParameters {
color: string;
rectColor: string;
font: string;
decoration: string;
width: number;
pressureType: string;
alpha: string;
constructor(obj?: PenParametersInput) {
this.color = obj && obj.color || '#1580CD';
this.rectColor = obj && obj.rectColor || 'rgba(0, 0, 0, 0.2)';
this.font = obj && obj.font || 'Times New Roman';
this.decoration = obj && obj.decoration || 'normal';
this.width = obj && obj.width || 3;
this.pressureType = obj && obj.pressureType || 'SIMULATED';
this.alpha = obj && obj.alpha || '1.0';
}
/**
* Get the color renderer parameter
*
* @method getColor
* @returns {String} The color of the ink
*/
getColor(): string{
return this.color;
};
/**
* Set the color renderer parameter
*
* @method setColor
* @param {String} color
*/
setColor(color: string) {
this.color = color;
};
/**
* Get the rect renderer parameter
*
* @method getRectColor
* @returns {String} the rectangle color
*/
getRectColor(): string{
return this.rectColor;
};
/**
* Set the rect renderer parameter
*
* @method setRectColor
* @param {String} rectColor
*/
setRectColor(rectColor: string) {
this.rectColor = rectColor;
};
/**
* Get the font renderer parameter
*
* @method getFont
* @returns {String} The font
*/
getFont(): string{
return this.font;
};
/**
* Set the font renderer parameter
*
* @method setFont
* @param {String} font
*/
setFont(font: string) {
this.font = font;
};
/**
* Get the decoration renderer parameter
*
* @method getDecoration
* @returns {String} The decoration
*/
getDecoration(): string{
return this.decoration;
};
/**
* Set the decoration renderer parameter
*
* @method setDecoration
* @param {String} decoration
*/
setDecoration(decoration: string) {
this.decoration = decoration;
};
/**
* Get the width renderer parameter
*
* @method getWidth
* @returns {Number} The ink width
*/
getWidth(): number{
return this.width;
};
/**
* Set the width renderer parameter
*
* @method setWidth
* @param {Number} width
*/
setWidth(width: number) {
this.width = width;
};
}