A
A
Anton_repr2019-03-31 07:38:37
C++ / C#
Anton_repr, 2019-03-31 07:38:37

Draw a pixel on a condition?

The textbox has a string consisting of 1's and 0's. The code should read the string. If 1, then a black pixel is drawn in the picturebox, otherwise a white one. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-03-31
@Anton_repr

You cycle through the string (as in an array). If the next character is equal to 1, then the next pixel is filled with black. Otherwise, white. What part is causing trouble? Where is your code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question