Skip to content

Commit 9ea8b41

Browse files
committed
3.1.0
1 parent 06ecd05 commit 9ea8b41

File tree

7 files changed

+25
-38
lines changed

7 files changed

+25
-38
lines changed

appveyor.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ deploy:
4040
- provider: GitHub
4141
artifact: /.*\.nupkg/ # upload all NuGet packages to release assets
4242
draft: false
43-
prerelease: true
43+
prerelease: false
4444
description: |
45-
# 3.1.0-beta.2
45+
# 3.1.0
46+
47+
本バージョンから .NET 6 が必須となります。
4648
4749
## 追加
4850
* `DFMouse` にイベントを追加
@@ -55,25 +57,24 @@ deploy:
5557
* Vector型に、指定した矩形領域に接しているかを計算する `In()` メソッドを追加
5658
5759
## 変更
60+
* **バックエンドをOpenTK/OpenGL 1ベースからSilk.NET/OpenGL 3に変更**
61+
* ⚠ DotFeatherだけでなくOpenTKのAPIも併用していた場合、ソースコード互換性は失われます。
5862
* Disposeされたテクスチャを描画しようと試みた場合、警告を発生させるように
5963
* `DF.Window.FollowsDpi` プロパティを非推奨に
6064
* `DF.Window.ActualSize`, `ActualWidth`, `ActualHeight` プロパティへの設定を非推奨に
65+
* `Ellipse` および `Polygon` の描画(Graphic, Shape) を非推奨に
66+
* 既に動作しなくなっています
6167
62-
## 3.1.0-beta.1 からの改善・修正された不具合
63-
* 高解像度ディスプレイでの挙動を改善
64-
* Graphic: `ShapeType.Rect` を描画できない問題を修正
65-
* `DF.Window.IsFocused` が機能していない問題を修正
66-
67-
## 3.0.0 から修正された不具合
68+
## 不具合修正
69+
* Windows 11およびmacOS Montereyで動作しない問題を修正
6870
* コンソールが見切れる不具合を修正
6971
7072
## 既知の不具合
7173
* Texture: 特定の状況で大量のテクスチャを読み込んだ際に、途中でテクスチャを正常に読み込めなくなる
72-
* Graphic: ShapeType.Polygon を描画できない
7374
* Audio: 停止にラグがある
7475
* Input: macOSで日本語入力をすると、入力文字列よりも前に改行が挿入される
7576
7677
auth_token:
77-
secure: FUlGF4CyRZNM6jaGz2wlmsOIwZt4av2Cxn4lHbi5wU5lim3FixH9ZIhLGDRZftOx
78+
secure: Cl90a4N9L02nmN2e45TxbRCOGAPa1SnO4A0IF6StuIZvUGz4gFvP+5TlPU70JlPp
7879
on:
7980
APPVEYOR_REPO_TAG: true # deploy on tag push only

examples/Demo/Scenes/Examples/graphics/Container.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override void OnStart(Dictionary<string, object> args)
2525
Parallel.For(0, 120, (_) =>
2626
{
2727
var (v1, v2, v3) = (Rnd(), Rnd(), Rnd());
28-
switch (random.Next(6))
28+
switch (random.Next(4))
2929
{
3030
case 0:
3131
canvas.Line(v1, v2, random.NextColor());
@@ -34,18 +34,11 @@ public override void OnStart(Dictionary<string, object> args)
3434
canvas.Rect(v1, v2, random.NextColor(), random.Next(4), random.NextColor());
3535
break;
3636
case 2:
37-
canvas.Ellipse(v1, v2, random.NextColor(), random.Next(4), random.NextColor());
38-
break;
39-
case 3:
4037
canvas.Pixel(v1, random.NextColor());
4138
break;
42-
case 4:
39+
case 3:
4340
canvas.Triangle(v1, v2, v3, random.NextColor(), random.Next(4), random.NextColor());
4441
break;
45-
case 5:
46-
var v = Enumerable.Repeat(5, 15).Select(_ => Rnd()).ToArray();
47-
canvas.Polygon(random.NextColor(), random.Next(4), random.NextColor(), v);
48-
break;
4942
}
5043
});
5144

examples/Demo/Scenes/Examples/graphics/Graphic.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public override void OnUpdate()
3030
if (DFKeyboard.Down) canvas.Scale -= Vector.One * Time.DeltaTime;
3131
if (DFKeyboard.C.IsKeyDown)
3232
{
33-
mode = (mode + 1) % 6;
33+
mode = (mode + 1) % 4;
3434
}
3535
canvas.Location += DFMouse.Scroll * (-1, 1);
3636
if (DFMouse.IsLeftDown)
@@ -47,18 +47,11 @@ public override void OnUpdate()
4747
canvas.Rect(v1, v2, random.NextColor(), lineWidth, random.NextColor());
4848
break;
4949
case 2:
50-
canvas.Ellipse(v1, v2, random.NextColor(), lineWidth, random.NextColor());
51-
break;
52-
case 3:
5350
canvas.Pixel(v1, random.NextColor());
5451
break;
55-
case 4:
52+
case 3:
5653
canvas.Triangle(v1, v2, v3, random.NextColor(), lineWidth, random.NextColor());
5754
break;
58-
case 5:
59-
var v = Enumerable.Repeat(5, 15).Select(_ => random.NextVectorInt(DF.Window.Width, DF.Window.Height)).ToArray();
60-
canvas.Polygon(random.NextColor(), lineWidth, random.NextColor(), v);
61-
break;
6255
}
6356
}
6457
if (DFMouse.IsRightDown)

examples/Demo/Scenes/Examples/graphics/Screenshot.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,11 @@ IEnumerator DrawAll()
7272
canvas.Rect(v1, v2, random.NextColor(), random.Next(4), random.NextColor());
7373
break;
7474
case 2:
75-
canvas.Ellipse(v1, v2, random.NextColor(), random.Next(4), random.NextColor());
76-
break;
77-
case 3:
7875
canvas.Pixel(v1, random.NextColor());
7976
break;
80-
case 4:
77+
case 3:
8178
canvas.Triangle(v1, v2, v3, random.NextColor(), random.Next(4), random.NextColor());
8279
break;
83-
case 5:
84-
var v = Enumerable.Repeat(5, 15).Select(_ => Rnd()).ToArray();
85-
canvas.Polygon(random.NextColor(), random.Next(4), random.NextColor(), v);
86-
break;
8780
}
8881
if (i % 8 == 0)
8982
yield return null;

src/DotFeather.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>DotFeather</id>
5-
<version>3.1.0-beta.2</version>
5+
<version>3.1.0</version>
66
<title>DotFeather</title>
77
<authors>Xeltica</authors>
88
<owners>Xeltica</owners>
@@ -13,7 +13,7 @@
1313
<tags>GameEngine</tags>
1414
<license type="expression">MIT</license>
1515
<releaseNotes>
16-
See https://github.com/Xeltica/DotFeather/releases/tag/3.1.0-beta.1
16+
See https://github.com/Xeltica/DotFeather/releases/tag/3.1.0
1717
</releaseNotes>
1818
<dependencies>
1919
<group targetFramework="net6.0">

src/Elements/Graphic.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using System.Drawing;
34

@@ -47,15 +48,18 @@ public Graphic Triangle(VectorInt v1, VectorInt v2, VectorInt v3, Color color, i
4748
public Graphic Triangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color, int lineWidth = 0, Color? lineColor = null)
4849
=> Triangle((x1, y1), (x2, y2), (x3, y3), color, lineWidth, lineColor);
4950

51+
[Obsolete("will be deleted in 4.0.0")]
5052
public Graphic Ellipse(VectorInt v1, VectorInt v2, Color color, int lineWidth = 0, Color? lineColor = null)
5153
=> Ellipse(v1.X, v1.Y, v2.X, v2.Y, color, lineWidth, lineColor);
5254

55+
[Obsolete("will be deleted in 4.0.0")]
5356
public Graphic Ellipse(int x1, int y1, int x2, int y2, Color color, int lineWidth = 0, Color? lineColor = null)
5457
{
5558
Add(Shape.CreateEllipse(x1, y1, x2, y2, color, lineWidth, lineColor));
5659
return this;
5760
}
5861

62+
[Obsolete("will be deleted in 4.0.0")]
5963
public Graphic Polygon(Color color, int lineWidth = 0, Color? lineColor = null, params VectorInt[] vertices)
6064
{
6165
Add(Shape.CreatePolygon(color, lineWidth, lineColor, vertices));

src/Elements/Shape.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ public static Shape CreateTriangle(VectorInt v1, VectorInt v2, VectorInt v3, Col
4949
public static Shape CreateTriangle(int x1, int y1, int x2, int y2, int x3, int y3, Color color, int lineWidth = 0, Color? lineColor = null)
5050
=> CreateTriangle((x1, y1), (x2, y2), (x3, y3), color, lineWidth, lineColor);
5151

52+
[Obsolete("will be deleted in 4.0.0")]
5253
public static Shape CreateEllipse(VectorInt v1, VectorInt v2, Color color, int lineWidth = 0, Color? lineColor = null)
5354
=> CreateEllipse(v1.X, v1.Y, v2.X, v2.Y, color, lineWidth, lineColor);
5455

56+
[Obsolete("will be deleted in 4.0.0")]
5557
public static Shape CreateEllipse(int x1, int y1, int x2, int y2, Color color, int lineWidth = 0, Color? lineColor = null)
5658
{
5759
if (x1 > x2) Swap(ref x1, ref x2);
@@ -71,6 +73,7 @@ public static Shape CreateEllipse(int x1, int y1, int x2, int y2, Color color, i
7173
return new Shape(color, ShapeType.Polygon, lineWidth, lineColor, vertices);
7274
}
7375

76+
[Obsolete("will be deleted in 4.0.0")]
7477
public static Shape CreatePolygon(Color color, int lineWidth = 0, Color? lineColor = null, params VectorInt[] vertices)
7578
=> new(color, ShapeType.Polygon, lineWidth, lineColor, vertices);
7679

0 commit comments

Comments
 (0)