Home » HTML » HTML Graphics » Question
  1. Which method must clear the pixels in the specified rectangle that also intersects the current clipping region to a fully transparent black, erasing any previous image?
    1. fillRect(x, y, w, h)
    2. removeRect(x,y,w,h)
    3. clearRect(x, y, w, h)
    4. strokeRect(x, y, w, h)
    5. None of these
Correct Option: C

StrokeRect(x, y, w, h) draws rectangle without filling it. The clearRect() method clears the specified pixels within a given rectangle. FillRect(x, y, w, h) method draws filled rectangle.



Your comments will be displayed only after manual approval.