-
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
-
inside several procedures, which can be used for variety of button controls prog...
里边有几个程序,可以用来实现多姿多彩的按钮控件编程,很好用的-inside several procedures, which can be used for variety of button controls programming, the good
- 2023-05-04 06:30:03下载
- 积分:1
-
该类实现按钮的五种状态, 非常方便, 使用方法请见 Code.txt 文件, 该文件很清楚的写出了该类的使用方法!...
该类实现按钮的五种状态, 非常方便, 使用方法请见 Code.txt 文件, 该文件很清楚的写出了该类的使用方法!-Five button realize such a state, a very convenient, the use of methods, see Code.txt document clearly sets out the use of such methods!
- 2022-02-06 11:17:29下载
- 积分:1
-
(3) The use of static compile
(3)使用编译时静态分配存储空间 (4)整型数据类型32位,占4个字节;布尔型数据类型8位,占1个字节;内存(由列表虚拟)寻址10位,1KB (5)为了实现方便,父类必须在子类之前定义 (6)由于时间原因,编译器做了如下简化: (i)表达式只能处理加法、-(3) The use of static compile-time allocation of storage space (4) integer data type 32, or four bytes; Boolean data type 8, or a byte; Memory (from the list of virtual) Addressable 10, 1KB (5) in order to achieve convenience, like father like son to be defined before (6) With the time, so the compiler to simplify the following : (i) the expression can only handle Ghaffar,
- 2023-01-24 05:45:03下载
- 积分:1
-
普通的音量调节功能,大家可以下下来看一看.
普通的音量调节功能,大家可以下下来看一看.-Common regulatory function of the volume, we can take a look at the next down.
- 2022-03-20 02:16:04下载
- 积分:1
-
鼠标的右键功能,可以实现数据的增加行,删除行,修改行。...
鼠标的右键功能,可以实现数据的增加行,删除行,修改行。-a click on the right button for example
- 2022-01-25 22:16:38下载
- 积分:1
-
添加静态界面图标
添加静态界面图标-add static interface icon
- 2022-06-01 13:08:27下载
- 积分:1
-
自编的。net风格按钮,蓝绿两色,并且会变换颜色。解压密码无
自编的。net风格按钮,蓝绿两色,并且会变换颜色。解压密码无-The self. net-style button, two blue-green color, and will change color. Extract password-free
- 2022-02-15 01:50:55下载
- 积分:1
-
Arbitrary shape of the button settings in the dialog box to set up the buttons o...
任意形状的按钮设置,在对话框中设置任意形状的按钮-Arbitrary shape of the button settings in the dialog box to set up the buttons of arbitrary shape
- 2022-06-11 18:08:27下载
- 积分:1
-
A simple button changes the style of code, made a very nice button.
一个简单的修改button风格的代码,作出的按钮很漂亮。-A simple button changes the style of code, made a very nice button.
- 2022-12-19 12:10:03下载
- 积分:1