Skip to content

Commit 888fca1

Browse files
authored
Merge pull request #1476 from mortend/net6-drawing
Fuse.Drawing.Surface: update assembly references for .NET 6.0 (beta-3.0)
2 parents d981a22 + 371e5bb commit 888fca1

File tree

8 files changed

+15
-20
lines changed

8 files changed

+15
-20
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<Extensions Backend="CIL">
2-
<Require Assembly="System.Drawing" />
3-
<Require Assembly="System.Windows.Forms" />
4-
</Extensions>
2+
<Require Assembly="System.Drawing.Common/lib/net6.0/System.Drawing.Common.dll" />
3+
<Require Condition="HOST_WINDOWS" Assembly="System.Windows.Forms" />
4+
</Extensions>

Source/Fuse.Drawing.Surface/DotNetSurface.uno

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ namespace Fuse.Drawing
121121
}
122122
}
123123

124-
[Require("Assembly", "System.Drawing")]
125-
[extern(DOTNET) Require("Source.Include","XliPlatform/GL.h")]
124+
[extern(DOTNET) Require("Source.Include", "XliPlatform/GL.h")]
126125
extern(DOTNET)
127126
internal class DotNetSurface : Surface
128127
{
@@ -996,7 +995,6 @@ namespace Fuse.Drawing
996995

997996
namespace DotNetNative
998997
{
999-
1000998
[DotNetType("System.Drawing.Imaging.ImageFormat")]
1001999
extern(DOTNET) internal class ImageFormat
10021000
{
@@ -1072,7 +1070,6 @@ namespace Fuse.Drawing
10721070
public override extern void Dispose();
10731071
}
10741072

1075-
10761073
[DotNetType("System.Drawing.Drawing2D.LinearGradientBrush")]
10771074
extern(DOTNET) internal class LinearGradientBrush : DotNetBrush
10781075
{
@@ -1098,7 +1095,6 @@ namespace Fuse.Drawing
10981095
public override extern void Dispose();
10991096
}
11001097

1101-
11021098
[DotNetType("System.Drawing.SolidBrush")]
11031099
extern(DOTNET) internal class SolidBrush : DotNetBrush
11041100
{
@@ -1137,7 +1133,6 @@ namespace Fuse.Drawing
11371133
// constructors
11381134
public extern BitmapData();
11391135

1140-
11411136
// properties
11421137
public extern int Height { get; set; }
11431138
public extern PixelFormat PixelFormat { get; set; }
@@ -1146,7 +1141,6 @@ namespace Fuse.Drawing
11461141
public extern int Width { get; set; }
11471142
}
11481143

1149-
11501144
[DotNetType("System.Drawing.Graphics")]
11511145
extern(DOTNET) internal class DotNetGraphics
11521146
{
@@ -1258,7 +1252,6 @@ namespace Fuse.Drawing
12581252
public extern byte G { get; }
12591253
public extern byte B { get; }
12601254

1261-
12621255
public static extern Color Blue { get; }
12631256
public static extern Color Black { get; }
12641257
public static extern Color Orange { get; }
@@ -1296,7 +1289,6 @@ namespace Fuse.Drawing
12961289
// constructors
12971290
public extern PointF(float x, float y);
12981291

1299-
13001292
// properties
13011293
public extern bool IsEmpty { get; }
13021294
public extern float X { get; set; }
@@ -1344,7 +1336,6 @@ namespace Fuse.Drawing
13441336
public extern Pen(Color c);
13451337
public extern Pen(Color c, float width);
13461338

1347-
13481339
// properties
13491340
public extern DotNetBrush Brush { get; set; }
13501341
public extern Color Color { get; set; }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if CIL {
2+
System.Drawing.Common: "https://www.nuget.org/api/v2/package/System.Drawing.Common/6.0.0"
3+
}

Source/Fuse.ImageTools/DotNet.uxl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<Extensions Backend="CIL">
2-
<Require Assembly="System.Drawing" />
2+
<Require Assembly="System.Drawing.Common/lib/net6.0/System.Drawing.Common.dll" />
33
</Extensions>

Source/Fuse.ImageTools/DotNetImageUtils.uno

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ namespace Fuse.ImageTools
4343

4444
namespace DotNetNative
4545
{
46-
[Require("Assembly", "System.Drawing")]
4746
[DotNetType("System.Drawing.Image")]
4847
extern(DOTNET) internal class DotNetImage
4948
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if CIL {
2+
System.Drawing.Common: "https://www.nuget.org/api/v2/package/System.Drawing.Common/6.0.0"
3+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Extensions Backend="CIL">
22
<Define FUSELIBS_DEBUG_DRAW_RECTS />
3-
4-
<Require Assembly="System.Windows.Forms" />
3+
<Require Condition="HOST_WINDOWS" Assembly="System.Windows.Forms" />
54
</Extensions>

Source/Fuse.Nodes/Tests/DrawRectsTest/DrawRects.Test.uno

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,15 @@ namespace DrawRectsTest
336336
}
337337
}
338338

339-
extern(DOTNET) static class MessagePumper
339+
extern(DOTNET && HOST_WINDOWS) static class MessagePumper
340340
{
341341
public static void PumpMessages()
342342
{
343343
DotNetNative.Application.DoEvents();
344344
}
345345
}
346346

347-
extern(!DOTNET) static class MessagePumper
347+
extern(!DOTNET || !HOST_WINDOWS) static class MessagePumper
348348
{
349349
public static void PumpMessages()
350350
{
@@ -499,7 +499,7 @@ namespace DrawRectsTest
499499
namespace DotNetNative
500500
{
501501
[DotNetType("System.Windows.Forms.Application")]
502-
extern(DOTNET) public class Application
502+
extern(DOTNET && HOST_WINDOWS) public class Application
503503
{
504504
public extern static void DoEvents();
505505
}

0 commit comments

Comments
 (0)