Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 8e39900

Browse files
author
Yuncong Zhang
committed
Change FilterMode.Point to Bilinear.
1 parent b69baab commit 8e39900

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Runtime/painting/decoration_image.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public static void paintImage(
209209
Rect centerSlice = null,
210210
ImageRepeat repeat = ImageRepeat.noRepeat,
211211
bool invertColors = false,
212-
FilterMode filterMode = FilterMode.Point
212+
FilterMode filterMode = FilterMode.Bilinear
213213
) {
214214
D.assert(canvas != null);
215215
D.assert(rect != null);

Runtime/rendering/image.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public RenderImage(
1919
ImageRepeat repeat = ImageRepeat.noRepeat,
2020
Rect centerSlice = null,
2121
bool invertColors = false,
22-
FilterMode filterMode = FilterMode.Point
22+
FilterMode filterMode = FilterMode.Bilinear
2323
) {
2424
this._image = image;
2525
this._width = width;

Runtime/ui/painting/canvas_impl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ internal class RenderLayer {
951951
public int rtID;
952952
public int width;
953953
public int height;
954-
public FilterMode filterMode = FilterMode.Point;
954+
public FilterMode filterMode = FilterMode.Bilinear;
955955
public bool noMSAA = false;
956956
public Rect layerBounds;
957957
public Paint layerPaint;

Runtime/ui/painting/painting.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public static ImageFilter blur(float sigmaX = 0.0f, float sigmaY = 0.0f) {
329329
return new _BlurImageFilter(sigmaX, sigmaY);
330330
}
331331

332-
public static ImageFilter matrix(Matrix3 transform, FilterMode filterMode = FilterMode.Point) {
332+
public static ImageFilter matrix(Matrix3 transform, FilterMode filterMode = FilterMode.Bilinear) {
333333
return new _MatrixImageFilter(transform, filterMode);
334334
}
335335
}
@@ -372,7 +372,7 @@ public class Paint {
372372

373373
public float strokeMiterLimit = 4.0f;
374374

375-
public FilterMode filterMode = FilterMode.Point;
375+
public FilterMode filterMode = FilterMode.Bilinear;
376376

377377
public ColorFilter colorFilter = null;
378378

Runtime/widgets/basic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ public RawImage(
18551855
ImageRepeat repeat = ImageRepeat.noRepeat,
18561856
Rect centerSlice = null,
18571857
bool invertColors = false,
1858-
FilterMode filterMode = FilterMode.Point
1858+
FilterMode filterMode = FilterMode.Bilinear
18591859
) : base(key) {
18601860
this.image = image;
18611861
this.width = width;

Runtime/widgets/image.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public Image(
6969
ImageRepeat repeat = ImageRepeat.noRepeat,
7070
Rect centerSlice = null,
7171
bool gaplessPlayback = false,
72-
FilterMode filterMode = FilterMode.Point
72+
FilterMode filterMode = FilterMode.Bilinear
7373
) : base(key) {
7474
D.assert(image != null);
7575
this.image = image;
@@ -98,7 +98,7 @@ public static Image network(
9898
ImageRepeat repeat = ImageRepeat.noRepeat,
9999
Rect centerSlice = null,
100100
bool gaplessPlayback = false,
101-
FilterMode filterMode = FilterMode.Point,
101+
FilterMode filterMode = FilterMode.Bilinear,
102102
IDictionary<string, string> headers = null
103103
) {
104104
var networkImage = new NetworkImage(src, scale, headers);
@@ -131,7 +131,7 @@ public static Image file(
131131
ImageRepeat repeat = ImageRepeat.noRepeat,
132132
Rect centerSlice = null,
133133
bool gaplessPlayback = false,
134-
FilterMode filterMode = FilterMode.Point
134+
FilterMode filterMode = FilterMode.Bilinear
135135
) {
136136
var fileImage = new FileImage(file, scale);
137137
return new Image(
@@ -164,7 +164,7 @@ public static Image asset(
164164
ImageRepeat repeat = ImageRepeat.noRepeat,
165165
Rect centerSlice = null,
166166
bool gaplessPlayback = false,
167-
FilterMode filterMode = FilterMode.Point
167+
FilterMode filterMode = FilterMode.Bilinear
168168
) {
169169
var image = scale != null
170170
? (AssetBundleImageProvider) new ExactAssetImage(name, bundle: bundle, scale: scale.Value)
@@ -199,7 +199,7 @@ public static Image memory(
199199
ImageRepeat repeat = ImageRepeat.noRepeat,
200200
Rect centerSlice = null,
201201
bool gaplessPlayback = false,
202-
FilterMode filterMode = FilterMode.Point
202+
FilterMode filterMode = FilterMode.Bilinear
203203
) {
204204
var memoryImage = new MemoryImage(bytes, scale);
205205
return new Image(

0 commit comments

Comments
 (0)