|
本帖最后由 zmrghy 于 2022-4-13 02:59 编辑
C# winForm 中的代码,
- System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.DarkRed, 1.2f, true);
复制代码
程序在C#中运行正常。。。。
C++CLR winForm 中的代码,
-
- Drawing2D::LinearGradientBrush^ brush = gcnew Drawing2D::LinearGradientBrush(gcnew Rectangle(0, 0, image->Width,image->Height), Color::Blue, Color::DarkRed, 1.2f, true);
复制代码
错误提示:
error C2664: “System::Drawing::Drawing2D::LinearGradientBrush::LinearGradientBrush(System::Drawing::RectangleF,System::Drawing::Color,System::Drawing::Color,float,bool)”: 不能将参数 1 从“System::Drawing::Rectangle ^”转换为“System::Drawing::RectangleF”
程序移到 C++CLR 出的错误提示,不明白什么意思。。。
不知道如何解决。。。 |
上一篇: 为什么调试不了啊下一篇: 一个算法题, 规定机器人在一个区间内行动一定步数来到某个位置,使用递归算法解决
|