-
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
-
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
-
按钮挺漂亮的,控件的属于很多!可以任意设置和调整!
按钮挺漂亮的,控件的属于很多!可以任意设置和调整!-button quite beautiful, many belonging to the controls! Can arbitrary settings and adjustments!
- 2023-01-06 07:40:03下载
- 积分:1
-
圆形按钮
圆形按钮-Circular Button
- 2023-07-07 08:45:02下载
- 积分:1
-
JAVA图形用户界面设计与实例,可以轻松掌握JAVA C/S 编程
JAVA图形用户界面设计与实例,可以轻松掌握JAVA C/S 编程-Java graphical user interface design and examples can easily grasp Java C/S Programming
- 2022-02-25 04:10:32下载
- 积分:1
-
可以自定义颜色和形状的按钮,添加了多功能
可以自定义颜色和形状的按钮,添加了多功能-can customize the color and shape of the button, add a multi-purpose
- 2022-06-01 11:34:45下载
- 积分:1
-
用于绘图的小控件,可以绘出XY坐标,控件应用见包
用于绘图的小控件,可以绘出XY坐标,控件应用见包-drawings for a small control that charted XY coordinates, and controls application packet see
- 2022-07-15 04:26:29下载
- 积分:1
-
在lcd12864上画线,控制器用的是arm,调试环境是iar
在lcd12864上画线,控制器用的是arm,调试环境是iar-in lcd12864 painted lines, the controller is used arm, debugging environment is Advocacy
- 2022-03-19 23:42:12下载
- 积分:1
-
XP Style CBitmapButton (CHoverBitmapButton) Style and theme aware bitmaps, give...
XP Style CBitmapButton (CHoverBitmapButton) Style and theme aware bitmaps, give your old apps a new look under Windows XP.
- 2022-03-01 11:08:02下载
- 积分:1
-
演示各种自绘按钮,如控制颜色,形状为圆形,滚动文字,图形按钮等...
演示各种自绘按钮,如控制颜色,形状为圆形,滚动文字,图形按钮等- Demonstrates each kind from to draw the button, like the
control color, the shape is a circular, rolls the writing, the graph
button and so on
- 2022-10-20 00:30:04下载
- 积分:1