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?(a) strokeRect(x, y, w, h)(b) clearRect(x, y, w, h)(c) fillRect(x, y, w, h)(d) removeRect(x,y,w,h)I have been asked this question in final exam.The query is from Client-Side Graphics with Canvas in portion HTML Markup, Forms, Video, Audio & Other Multimedia of HTML

Answer»

Correct option is (b) clearRect(x, y, W, h)

To EXPLAIN: 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.



Discussion

No Comment Found

Related InterviewSolutions