-
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
-
因为偷dkwe DHT编码skdfks DFS
for steing dht code dkwe skdfks dfs
- 2022-06-28 17:35:32下载
- 积分:1
-
用于绘图的小控件,可以绘出XY坐标,控件应用见包
用于绘图的小控件,可以绘出XY坐标,控件应用见包-drawings for a small control that charted XY coordinates, and controls application packet see
- 2022-07-15 04:26:29下载
- 积分:1
-
本人热中与vb开发小软件 因为我只是一个学生哦,现在仍在锻炼中,有什么问题一定指教...
本人热中与vb开发小软件 因为我只是一个学生哦,现在仍在锻炼中,有什么问题一定指教-enthusiastic vb small software development because I am just a student, oh, it is still being tempered, what will enlighten
- 2023-02-18 04:40:03下载
- 积分:1
-
A very practical type of button controls, you can achieve various of effects bu...
一个很实用的按钮控件类,可以实现各种按钮特效,里面包含了实例和其中的按钮类。对于希望能够做特色按钮的朋友们非常有用-A very practical type of button controls, you can achieve various of effects buttons.It contains examples and source code of effect buttons. It s quite useful for the friends who wish to make effect button feature.
- 2022-01-25 14:04:01下载
- 积分:1
-
路的儿子到当地的玉石展品对早期的路径上的当地家庭两光滑。
卢地方地子一玉上上早早展览品峰回路转阖地地方地二屯卢是蜗了解到-Lu son to a local jade exhibits on early on the path to local families to two Tuen Lu is aware Worm
- 2022-07-02 02:33:20下载
- 积分:1
-
在按钮控件上实现图标,从而美化图标的外观。
在按钮控件上实现图标,从而美化图标的外观。-To achieve control on the button icon, which beautify the appearance of the icon.
- 2022-07-22 10:49:18下载
- 积分:1
-
DOS 下Borlandc 里立体Button的实现,
包括按钮label,
DOS 下Borlandc 里立体Button的实现,
包括按钮label,-DOS under Borlandc in the realization of three-dimensional Button, including the button label,
- 2022-01-26 05:52:36下载
- 积分:1
-
动态引用DLL中的类函数,很好的
动态引用DLL中的类函数,很好的-dynamic invoke DLL function of the type, good
- 2022-06-21 06:32:31下载
- 积分:1
-
基本的椭圆形按钮
基本的椭圆形按钮-basic eclipse round button
- 2022-08-15 01:38:37下载
- 积分:1