What is the difference between stroke and fill in canvas

Internet 2021-08-22 21:02:25 0 5,010

HTML5 divides graphics into two categories: the first is called stroke, which is outline, outline or line. In short, graphics are composed of lines; the second is called fill, which is filled area. There are two functions for drawing rectangles in the context object, which allows us to understand the difference between these two types of graphics: one is strokeRect, and the other is fillRect.

#fill##stroke#


Your opinion

Already have 0 Article answer