@@ -927,23 +927,20 @@ class SkPaint {
927
927
928
928
@JS ()
929
929
@anonymous
930
+ @staticInterop
930
931
abstract class CkFilterOptions {}
931
932
932
933
@JS ()
933
934
@anonymous
935
+ @staticInterop
934
936
class _CkCubicFilterOptions extends CkFilterOptions {
935
- external double get B ;
936
- external double get C ;
937
-
938
937
external factory _CkCubicFilterOptions ({double B , double C });
939
938
}
940
939
941
940
@JS ()
942
941
@anonymous
942
+ @staticInterop
943
943
class _CkTransformFilterOptions extends CkFilterOptions {
944
- external SkFilterMode get filter;
945
- external SkMipmapMode get mipmap;
946
-
947
944
external factory _CkTransformFilterOptions (
948
945
{SkFilterMode filter, SkMipmapMode mipmap});
949
946
}
@@ -974,12 +971,18 @@ CkFilterOptions toSkFilterOptions(ui.FilterQuality filterQuality) {
974
971
975
972
@JS ()
976
973
@anonymous
977
- class SkMaskFilter {
974
+ @staticInterop
975
+ class SkMaskFilter {}
976
+
977
+ extension SkMaskFilterExtension on SkMaskFilter {
978
978
external void delete ();
979
979
}
980
980
981
981
@JS ()
982
- class SkColorFilterNamespace {
982
+ @staticInterop
983
+ class SkColorFilterNamespace {}
984
+
985
+ extension SkColorFilterNamespaceExtension on SkColorFilterNamespace {
983
986
external SkColorFilter ? MakeBlend (Float32List color, SkBlendMode blendMode);
984
987
external SkColorFilter MakeMatrix (
985
988
Float32List matrix, // 20-element matrix
@@ -991,12 +994,18 @@ class SkColorFilterNamespace {
991
994
992
995
@JS ()
993
996
@anonymous
994
- class SkColorFilter {
997
+ @staticInterop
998
+ class SkColorFilter {}
999
+
1000
+ extension SkColorFilterExtension on SkColorFilter {
995
1001
external void delete ();
996
1002
}
997
1003
998
1004
@JS ()
999
- class SkImageFilterNamespace {
1005
+ @staticInterop
1006
+ class SkImageFilterNamespace {}
1007
+
1008
+ extension SkImageFilterNamespaceExtension on SkImageFilterNamespace {
1000
1009
external SkImageFilter MakeBlur (
1001
1010
double sigmaX,
1002
1011
double sigmaY,
@@ -1023,12 +1032,18 @@ class SkImageFilterNamespace {
1023
1032
1024
1033
@JS ()
1025
1034
@anonymous
1026
- class SkImageFilter {
1035
+ @staticInterop
1036
+ class SkImageFilter {}
1037
+
1038
+ extension SkImageFilterExtension on SkImageFilter {
1027
1039
external void delete ();
1028
1040
}
1029
1041
1030
1042
@JS ()
1031
- class SkPathNamespace {
1043
+ @staticInterop
1044
+ class SkPathNamespace {}
1045
+
1046
+ extension SkPathNamespaceExtension on SkPathNamespace {
1032
1047
/// Creates an [SkPath] using commands obtained from [SkPath.toCmds] .
1033
1048
external SkPath MakeFromCmds (List <dynamic > pathCommands);
1034
1049
@@ -1119,6 +1134,7 @@ Float32List toSkColorStops(List<double>? colorStops) {
1119
1134
external _NativeFloat32ArrayType get _nativeFloat32ArrayType;
1120
1135
1121
1136
@JS ()
1137
+ @staticInterop
1122
1138
class _NativeFloat32ArrayType {}
1123
1139
1124
1140
@JS ('window.flutterCanvasKit.Malloc' )
@@ -1149,7 +1165,10 @@ external void freeFloat32List(SkFloat32List list);
1149
1165
/// when WASM grows its memory. Call [toTypedArray] to get a new instance
1150
1166
/// that's attached to the current WASM memory block.
1151
1167
@JS ()
1152
- class SkFloat32List {
1168
+ @staticInterop
1169
+ class SkFloat32List {}
1170
+
1171
+ extension SkFloat32ListExtension on SkFloat32List {
1153
1172
/// Returns the [Float32List] object backed by WASM memory.
1154
1173
///
1155
1174
/// Do not reuse the returned list across multiple WASM function/method
@@ -1204,8 +1223,12 @@ Float32List toSharedSkColor3(ui.Color color) {
1204
1223
final SkFloat32List _sharedSkColor3 = mallocFloat32List (4 );
1205
1224
1206
1225
@JS ('window.flutterCanvasKit.Path' )
1226
+ @staticInterop
1207
1227
class SkPath {
1208
- external SkPath ([SkPath ? other]);
1228
+ external factory SkPath ([SkPath ? other]);
1229
+ }
1230
+
1231
+ extension SkPathExtension on SkPath {
1209
1232
external void setFillType (SkFillType fillType);
1210
1233
external void addArc (
1211
1234
Float32List oval,
0 commit comments