Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
context.fillReact no es una función
const canvas = document.getElementById("canvas"); canvas.width = window.innerWidth = 750; canvas.height = 600; var context = canvas.getContext("2d"); context.fillStyle = "white"; context.fillReact(0, 0, canvas.width, canvas.height); let draw_color = "black"; let draw_width = "2"; let is_drawing = false; canvas.addEventListener("touchstart", start, false); canvas.addEventListener("touchmove", draw, false); canvas.addEventListener("mousedown", start, false); canvas.addEventListener("mousemove", draw, false); function start(event) { is_drawing = true; context.beginPath(); context.moveTo(event.clientX = canvas.offsetLeft, event.clientY = canvas.offsetTop); event.preventDefault(); } function draw(event) { if (is_drawing) { context.beginPath(); context.moveTo(event.clientX = canvas.offsetLeft, event.clientY = canvas.offsetTop); context.strokeStyle = draw_color; context.lineWidth = draw_width; context.lineCap = "round"; context.lineJoin = "round"; context.stroke(); } }

Hice todo bien, pero muestra context.fillReact no es una función, debería haber dibujado una línea al mover el cursor, pero no está haciendo nada, solo muestra el error.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Hasta donde yo sé, el objeto de context del elemento canvas no tiene ningún método fillReact. ¿Quizás te refieres a fillRect ?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!