-
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
-
查找 删除 进程 采用 delphi 可以有效 杀死进程 不错 可以用
查找 删除 进程 采用 delphi 可以有效 杀死进程 不错 可以用-find delete process
- 2022-02-21 05:56:01下载
- 积分:1
-
只能输入数字的Swing文档模型。
28.
29. * 可以设置可以保存的数字的最大值和最小值...
只能输入数字的Swing文档模型。
28.
29. * 可以设置可以保存的数字的最大值和最小值
-can only import figures Swing document model. 28. 29.* Can be set to keep the figures of the maximum and minimum
- 2023-06-19 04:10:03下载
- 积分:1
-
Control List 5 upgrades Control List 5 upgrades Control List 5 upgrades Control...
List控件第5升级版 List控件第5升级版 List控件第5升级版 List控件第5升级版 List控件第5升级版 List控件第5升级版-Control List 5 upgrades Control List 5 upgrades Control List 5 upgrades Control List 5 upgrades 5 List Control List upgrades or controls 5 version Control List-5 upgrades Control List 5 upgrades Control List 5 upgrades Control List 5 upgrades Control List 5 upgrades
- 2022-08-21 12:44:07下载
- 积分:1
-
You need to round buttons? This class has been doing a good job for you, and it...
你需要圆形的按钮吗?这个类已经替你做好了,它可是有正常、平面、下推几种风格的,快使用它吧-You need to round buttons? This class has been doing a good job for you, and it is but a normal, flat, push-down of several styles, and quick to use it bar
- 2023-06-21 13:15:03下载
- 积分:1
-
realize how refresh DialogBar Bar and the background color controls
实现如何重绘DialogBar和Bar上的控件 背景色-realize how refresh DialogBar Bar and the background color controls
- 2022-03-12 01:22:42下载
- 积分:1
-
网上摘抄,若有版权问题,上传者不负任何责任.
网上摘抄,若有版权问题,上传者不负任何责任.-online excerpt, if copyright issues, uploads who bore no responsibility.
- 2022-07-25 01:46:29下载
- 积分:1
-
一种带子针的模拟仪表,可以改变刻度值得大小和单位,原色等...
一种带子针的模拟仪表,可以改变刻度值得大小和单位,原色等-a belt pin analog instrumentation, calibration should be changed size and units, primary colors, etc.
- 2022-06-12 23:11:09下载
- 积分:1
-
bgrid实例下拉菜单
bgrid实例下拉菜单-bgrid examples of the drop-down menu
- 2023-08-26 00:50:03下载
- 积分:1
-
WinAPI Sample, including CerateWIndow. REgister WIndows Class, Dispatch message
WinAPI Sample, including CerateWIndow. REgister WIndows Class, Dispatch message-WinAPI Sample, including CerateWIndow. REgister WIndows Implants ss, Dispatch message
- 2022-01-31 15:26:34下载
- 积分:1