textRender.js 222 B

12345678910111213141516
  1. /* eslint-disable radix */
  2. export const textRender = ({
  3. text,
  4. X,
  5. Y,
  6. fontSize,
  7. color,
  8. maxWidth,
  9. maxRowNum = 1,
  10. ctx
  11. }) => {
  12. ctx.font = '14px serif';
  13. ctx.fillStyle = color;
  14. ctx.fillText(text, X, Y);
  15. };