mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-11 16:18:10 +00:00
Merge pull request #250 from thewhodidthis/bf#233--shape
visual/ShapeStim: take contrast into account when calling beginFill
This commit is contained in:
commit
2e856a5851
@ -262,7 +262,8 @@ export class ShapeStim extends util.mix(VisualStim).with(ColorMixin, WindowMixin
|
||||
this._pixi.lineStyle(this._lineWidth, this._lineColor.int, this._opacity, 0.5);
|
||||
if (typeof this._fillColor !== 'undefined' && this._fillColor !== null)
|
||||
{
|
||||
this._pixi.beginFill(this._fillColor.int, this._opacity);
|
||||
const contrastedColor = this.getContrastedColor(new Color(this._fillColor), this._contrast);
|
||||
this._pixi.beginFill(contrastedColor.int, this._opacity);
|
||||
}
|
||||
this._pixi.drawPolygon(this._pixiPolygon_px);
|
||||
if (typeof this._fillColor !== 'undefined' && this._fillColor !== null)
|
||||
|
Loading…
Reference in New Issue
Block a user