在运行时动画按钮效果还是动画图像? [英] Animated Button Effect at Run-time or Animated Image?

查看:70
本文介绍了在运行时动画按钮效果还是动画图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Heya只是个速成兵,

出于好奇,我想尝试为按钮添加某种发光效果.当用户将鼠标悬停在按钮上时,对角定位的发光效果将从左向右移动.我想给光源留下一个通过按钮的印象,我认为这是解释它的最佳方法.在运行时或使用导入到项目中的动画图像,是否可以更好地进行编码?我说的是性能.

谢谢.

Heya guys just a quickie,

Out of curiosity I want to try add some kind of shine/shimmer effect to a button. When the user mouse overs a button, a diagonally positioned shine effect will move from left to right. Giving the impression of a light source passing by the button I think is the best way to explain it. Would this be better coded at run-time or using an animated image imported to the project? I''m talking in terms of performance here.

Thanks.

推荐答案

我立即想到的是性能方面的差异很小.

任何影响图形性能(CPU,GPU等)的东西都会同等地影响这两种方法.

那些拥有更多经验/知识的人可能会更具权威性.

这是一篇您可能会觉得有用的文章. 使用GDI +的增强型GlassButton [
My immediate thought is that there would be little difference in performance terms.

Anything affecting graphics performance (CPU, GPU etc.) would affect both methodologies equally.

Those with more experience/knowledge might be able to be more definitive.

Here is an article that you might find useful. Enhanced GlassButton using GDI+[^]


这篇关于在运行时动画按钮效果还是动画图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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