-
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
-
使用WORD作为VB的报表工具,很好用的,请大家快快下载。
使用WORD作为VB的报表工具,很好用的,请大家快快下载。-use Word as VB reporting tools, the good, everyone can download.
- 2022-08-16 00:48:51下载
- 积分:1
-
一种带子针的模拟仪表,可以改变刻度值得大小和单位,原色等...
一种带子针的模拟仪表,可以改变刻度值得大小和单位,原色等-a belt pin analog instrumentation, calibration should be changed size and units, primary colors, etc.
- 2022-06-12 23:11:09下载
- 积分:1
-
CXPButton是一个XP风格的按钮类,外观非常好看,能给你耳目一新的感觉。...
CXPButton是一个XP风格的按钮类,外观非常好看,能给你耳目一新的感觉。-CXPButton is an XP-style button-type, appearance is very good-looking, would give you a fresh experience.
- 2022-07-20 11:11:04下载
- 积分:1
-
XP style button variable color programming source code
XP风格可变颜色的按钮编程源代码-XP style button variable color programming source code
- 2022-01-26 04:47:51下载
- 积分:1
-
一个flash按钮效果,运用遮照效果````的原文件
一个flash按钮效果,运用遮照效果````的原文件-a flash button effects, use of `` `` Zhezhao effect of the original document
- 2023-05-19 19:05:04下载
- 积分: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
-
为按钮增加色彩,相当于某些换皮肤软件的功能
为按钮增加色彩,相当于某些换皮肤软件的功能-button to increase the color of the skin for the equivalent of some software functions
- 2023-02-11 21:25:03下载
- 积分:1
-
几个经典的按钮(非原创)
几个经典的按钮(非原创)-several classic button (non-original)
- 2023-01-28 07:00:03下载
- 积分:1
-
一个XP风格的按钮控件
一个XP风格的按钮控件-an XP style button controls
- 2023-02-11 03:20:03下载
- 积分:1