V
V
Vitaly Yakovenko2013-04-08 18:19:19
Algorithms
Vitaly Yakovenko, 2013-04-08 18:19:19

Screening lines of non-unit thickness?

Please advise where to look. I read Chirikov's manual on graphics, and then a question arose by itself that went beyond the scope of the things described there.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
KilgortTraut, 2013-04-09
@KilgortTraut

Have you watched Bresenham's algorithm yet?

J
jcmvbkbc, 2013-04-10
@jcmvbkbc

I would draw a center line with a Bresenham, and from it I would fill vertically (if the line is longer in x than in y) or horizontally (otherwise) a number of pixels equal to the length of the vertical/horizontal axis section of the thick line. This approach has problems at the ends of the segment (but there, in any case, you have to think about what to do). And the accuracy is not very high.

K
KEKSOV, 2013-04-10
@KEKSOV

Since there are no special details in the question, I will offer a couple of ready-made solutions www.crossgl.com/aggpas/ and graphics32.org/wiki//Main/Graphics32

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question