-
GlowButton - 发光的按钮控件
翻译 maninwest@Codeforge 作者:John Underhill @ Codeproject最近我在查看 KMP Player 软件上的一些图形元素(如果你想看看好的图形设计,我建议你也查看一下)。我在项目中需要的是一个简单的发光按钮控件,用于玩家控制的,这不是什么太神奇的东西,只是在鼠标悬停时能够改变颜色。让图像更改颜色很简单,只需修改 ImageAttribute 的颜色矩阵:private void DrawColoredImage(Graphics g, Image img, Rectangle bounds, Color clr)
{
using (ImageAttributes ia = new ImageAttributes())
{
ColorMatrix cm = new ColorMatrix();
// convert and refactor color palette
cm.Matrix00 = ParseColor(clr.R);
cm.Matrix11 = ParseColor(clr.G);
cm.Matrix22 = ParseColor(clr.B);
cm.Matrix33 = ParseColor(clr.A);
cm.Matrix44 = 1f;
// set matrix
ia.SetColorMatrix(cm);
// draw
g.DrawImage(img, bounds, 0, 0, img.Width,
img.Height, GraphicsUnit.Pixel, ia);
}
}示例代码中的 ParseColor 会将位转化为浮点值。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2023-07-25 02:55:04下载
- 积分:1
-
VC做界面比较难,这里很多很多关于美化VC中按钮.对话框的界面类,并且有DEMO程序,是你优化界面的好...
VC做界面比较难,这里很多很多关于美化VC中按钮.对话框的界面类,并且有DEMO程序,是你优化界面的好-VC interface more difficult to do, where many in the VC button on the landscaping. Dialog interface type, and have DEMO procedures, optimizing the interface is your good
- 2022-08-24 14:52:28下载
- 积分:1
-
一段很好的三态树代码,有需要的朋友可以下载看看哦
一段很好的三态树代码,有需要的朋友可以下载看看哦 -For some good tri-state tree code, there is a need to see if friends can download Oh
- 2022-01-26 19:44:49下载
- 积分:1
-
颜色选择按钮的变成和调用,就是windows画图板。word等到处都能看见可以自己选颜色的那个对话框。...
颜色选择按钮的变成和调用,就是windows画图板。word等到处都能看见可以自己选颜色的那个对话框。-color selection button into, and use of windows is drawing boards. Word such as one can see for themselves that the election color dialog.
- 2023-07-09 18:00:02下载
- 积分:1
-
本程序是是一个进度条编程的的VC源代码,已经编译通过。
本程序是是一个进度条编程的的VC源代码,已经编译通过。-this is a process of progress in the VC program source code, compile.
- 2022-10-06 19:15:03下载
- 积分:1
-
XP风格的定位
有XP风格和位置形按钮,还有其它按从cbutton继承的单先按钮,复选按钮!-XP style and location-shaped buttons, and other on-cbutton inherited from the single-button first, check button!
- 2022-06-13 19:11:27下载
- 积分:1
-
This is a network using XML in the preparation of tree leaves above the keys wit...
这是一个用XML在网叶上面编写树型控键的实例代码 包括HTML文件.-This is a network using XML in the preparation of tree leaves above the keys with code examples, including HTML files.
- 2022-07-22 18:08:24下载
- 积分:1
-
多视图的切分,解决单一视图的信息的缺乏,能给你呈现更多的内容。...
多视图的切分,解决单一视图的信息的缺乏,能给你呈现更多的内容。-Multi-View Cut, single view to solve the lack of information, you can show more content.
- 2023-05-15 23:30:02下载
- 积分:1
-
简单介绍了上下控件的使用方法,对于初学者,有一定的帮助。...
简单介绍了上下控件的使用方法,对于初学者,有一定的帮助。-Briefly introduced the use of upper and lower control method, for beginners, there are certainly helpful to them.
- 2022-01-31 03:21:26下载
- 积分:1
-
Rebar控件的使用Demo,演示了如何在Rebar控件中加入子窗口控件以及Rebar的位置拖动...
Rebar控件的使用Demo,演示了如何在Rebar控件中加入子窗口控件以及Rebar的位置拖动-Rebar control the use Demo, demonstrated how to add controls Rebar-window controls and the location of Rebar Drive
- 2022-03-22 08:00:34下载
- 积分:1