Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drawWheelText(idx, text, bingo) {
- const {
- isMobile,
- } = this.state;
- this.ctx.beginPath();
- this.ctx.save();
- this.ctx.font = `${isMobile ? '12px' : '16px'} 微软雅黑`;
- this.ctx.fillStyle = (bingo && bingo === text && 'green') || 'red';
- this.ctx.rotate(((idx * this.singlePizzaAngle) + (this.singlePizzaAngle / 2)) * Math.PI / 180);
- this.ctx.fillText(text, isMobile ? 30 : 50, 0);
- this.ctx.restore();
- }
Add Comment
Please, Sign In to add comment