I am wondering how to draw a line with specific width on screen. What I could imagine now is to regard a wide line as two boundary lines with no width (one is the left boundary and one is the right boundary). Then we can separately deal with these lines, and then fill all the pixels between them as black (or other desired colors). Not sure if it is what modern GPUs do on our screen.
@yongchi1 That's not far from what happens in a modern rasterizer: wide lines get drawn as rectangles, though really, these rectangles (and anything you send to the GPU) actually get split up into a pair of triangles. You then have super optimized hardware for drawing triangles, which provides a high-quality estimate of what fraction of each pixel is covered (via sampling). We'll definitely be talking about this in our rasterization lectures.