流出darwstring免费闪烁 [英] outflow darwstring free flicker

查看:87
本文介绍了流出darwstring免费闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我想在屏幕上自由闪烁使用c#Drawstring()流出
使用计时器每2毫秒绘制一次
Thanks

解决方案

在更新到屏幕之前先绘制一个缓冲区.每2毫秒执行一次此操作将为您提供500fps的帧速率.人类无法识别超过60 fps的帧,并且大多数显示器都不会超过120 fps的帧.尝试每30毫秒绘制一次.


假设您正在使用Windows窗体...

覆盖OnPaint.从位图创建图形对象,然后调用 DrawString 方法就可以了.然后,将该图形对象绘制到控件的Graphics对象上.

如何绘制搅拌器并将其缓冲到屏幕上


Hello
i want to use c# Drawstring()outflow on the screen with free flicker
using a timer to draw every 2 ms
thanks

解决方案

Draw to a buffer before updating to the screen. Doing so every 2ms would give you a framerate of 500fps. Humans can''t recognize over 60fps, and most monitors won''t go over around 120 fps. Try drawing every 30ms.


Assuming you are working with Windows Forms...

Override OnPaint. Create a Graphics object from a Bitmap then call the DrawString method on it. Then, draw that graphics object to the control''s Graphics object.


how can i draw the stirng do a buffer & after it to the screen


这篇关于流出darwstring免费闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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