在C#中绘制像素 [英] Drawing pixel in c#

查看:209
本文介绍了在C#中绘制像素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想了解一些有关C#中像素绘制的信息
我已经在表单上绘制了一个像素,但是它看起来太小了以至于看不到,所以我的要求是我希望将该像素变大以便可以清晰地查看

好的,我已经理解了,您能给我一个小例子吗,我们将向我展示这个例子.

Hello here i want to know some about pixel drawing in c#
I had already drawn single pixel on the form but it look so tiny that cannot be seen so my requirement is that i want to make that pixel big so that it can be viewed clearly

ok i had understand this can u give me any small example for that which we will demonstrate me as i am beginner

推荐答案

您应该购买一本基础书籍并阅读,但是Graphics对象上具有绘制各种物体的方法.
You should probably buy a basic book and read it, but the Graphics object has methods on it to draw all sorts of things.


如果您想要更大的像素,则为每个像素绘制4个像素,而不是一个像素.本质上,像素是一种尺寸.
您可以绘制到位图,然后将位图绘制到窗体,将其拉伸以使其显得更大.如果绘图很复杂,则可以在需要时重新绘制到位图,然后从画图上的位图更新窗体,这样可能会更快. Bitblt非常快.
If you want bigger pixels, draw 4 for each, instead of one. By nature, pixels are one size.
You could draw to a bitmap, and then draw the bitmap to the form, stretching it so they appear bigger. If the the drawing is complex, it could be faster to just redraw to the bitmap when you need to, and update the form from the bitmap on paint. Bitblt is pretty fast.


这篇关于在C#中绘制像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆