reduce transparency on pip edge and allow for adjusting pip transparency as a whole
This commit is contained in:
@@ -41,7 +41,7 @@ const DEFAULTS = {
|
||||
red: 255,
|
||||
blue: 255,
|
||||
green: 255,
|
||||
alpha: 0.8,
|
||||
alpha: 0.9,
|
||||
},
|
||||
},
|
||||
body: {
|
||||
@@ -211,7 +211,7 @@ export default class DrawShapes {
|
||||
});
|
||||
}
|
||||
|
||||
pips (context, scale, x, y, cell) {
|
||||
pips (context, scale, x, y, cell, alpha = 1) {
|
||||
const {tileStyle, orientation, pips} = cell;
|
||||
|
||||
if (this.pipVertices[tileStyle]
|
||||
@@ -225,7 +225,9 @@ export default class DrawShapes {
|
||||
const scaleWidth = (scale * 2) * cell.scale;
|
||||
const scaleHeight = (scale * 2) * cell.scale;
|
||||
|
||||
context.globalAlpha = alpha;
|
||||
context.drawImage(this.pipCache.pips[pips], x - (scaleWidth / 2), y - (scaleHeight / 2), scaleWidth, scaleHeight);
|
||||
context.globalAlpha = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user