简体   繁体   中英

How to set pixels to “Console Windows” by passing “String Pointer” in C?

I know how to set pixels to "Console Windows" by using "SetPixel()"

http://msdn.microsoft.com/en-us/library/windows/desktop/dd145078(v=vs.85).aspx

But it wastes a lot of time to call this function and draw every pixels to it.

Is there any feasible way to set every pixels by passing string (pointer), and call function one time, but set every pixels?

Not sure what you mean by "Console Windows" or "String", and what they have to do with SetPixel().

However it is true that modifying bitmaps using repeated calls to SetPixel() is very inefficient because it has high overhead. Instead, copy out the bitmap data to a buffer using GetDIBits() , modify the buffer, and once you're done copy them back into the bitmap using SetDIBits().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM