@@ -927,27 +927,34 @@ 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 {
937
+ external factory _CkCubicFilterOptions ({double B , double C });
938
+ }
939
+
940
+ extension _CkCubicFilterOptionsExtension on _CkCubicFilterOptions {
935
941
external double get B ;
936
942
external double get C ;
937
-
938
- external factory _CkCubicFilterOptions ({double B , double C });
939
943
}
940
944
941
945
@JS ()
942
946
@anonymous
947
+ @staticInterop
943
948
class _CkTransformFilterOptions extends CkFilterOptions {
944
- external SkFilterMode get filter;
945
- external SkMipmapMode get mipmap;
946
-
947
949
external factory _CkTransformFilterOptions (
948
950
{SkFilterMode filter, SkMipmapMode mipmap});
949
951
}
950
952
953
+ extension _CkTransformFilterOptionsExtension on _CkTransformFilterOptions {
954
+ external SkFilterMode get filter;
955
+ external SkMipmapMode get mipmap;
956
+ }
957
+
951
958
final Map <ui.FilterQuality , CkFilterOptions > _filterOptions =
952
959
< ui.FilterQuality , CkFilterOptions > {
953
960
ui.FilterQuality .none: _CkTransformFilterOptions (
@@ -974,12 +981,18 @@ CkFilterOptions toSkFilterOptions(ui.FilterQuality filterQuality) {
974
981
975
982
@JS ()
976
983
@anonymous
977
- class SkMaskFilter {
984
+ @staticInterop
985
+ class SkMaskFilter {}
986
+
987
+ extension SkMaskFilterExtension on SkMaskFilter {
978
988
external void delete ();
979
989
}
980
990
981
991
@JS ()
982
- class SkColorFilterNamespace {
992
+ @staticInterop
993
+ class SkColorFilterNamespace {}
994
+
995
+ extension SkColorFilterNamespaceExtension on SkColorFilterNamespace {
983
996
external SkColorFilter ? MakeBlend (Float32List color, SkBlendMode blendMode);
984
997
external SkColorFilter MakeMatrix (
985
998
Float32List matrix, // 20-element matrix
@@ -991,12 +1004,18 @@ class SkColorFilterNamespace {
991
1004
992
1005
@JS ()
993
1006
@anonymous
994
- class SkColorFilter {
1007
+ @staticInterop
1008
+ class SkColorFilter {}
1009
+
1010
+ extension SkColorFilterExtension on SkColorFilter {
995
1011
external void delete ();
996
1012
}
997
1013
998
1014
@JS ()
999
- class SkImageFilterNamespace {
1015
+ @staticInterop
1016
+ class SkImageFilterNamespace {}
1017
+
1018
+ extension SkImageFilterNamespaceExtension on SkImageFilterNamespace {
1000
1019
external SkImageFilter MakeBlur (
1001
1020
double sigmaX,
1002
1021
double sigmaY,
@@ -1023,12 +1042,18 @@ class SkImageFilterNamespace {
1023
1042
1024
1043
@JS ()
1025
1044
@anonymous
1026
- class SkImageFilter {
1045
+ @staticInterop
1046
+ class SkImageFilter {}
1047
+
1048
+ extension SkImageFilterExtension on SkImageFilter {
1027
1049
external void delete ();
1028
1050
}
1029
1051
1030
1052
@JS ()
1031
- class SkPathNamespace {
1053
+ @staticInterop
1054
+ class SkPathNamespace {}
1055
+
1056
+ extension SkPathNamespaceExtension on SkPathNamespace {
1032
1057
/// Creates an [SkPath] using commands obtained from [SkPath.toCmds] .
1033
1058
external SkPath MakeFromCmds (List <dynamic > pathCommands);
1034
1059
@@ -1119,6 +1144,7 @@ Float32List toSkColorStops(List<double>? colorStops) {
1119
1144
external _NativeFloat32ArrayType get _nativeFloat32ArrayType;
1120
1145
1121
1146
@JS ()
1147
+ @staticInterop
1122
1148
class _NativeFloat32ArrayType {}
1123
1149
1124
1150
@JS ('window.flutterCanvasKit.Malloc' )
@@ -1149,7 +1175,10 @@ external void freeFloat32List(SkFloat32List list);
1149
1175
/// when WASM grows its memory. Call [toTypedArray] to get a new instance
1150
1176
/// that's attached to the current WASM memory block.
1151
1177
@JS ()
1152
- class SkFloat32List {
1178
+ @staticInterop
1179
+ class SkFloat32List {}
1180
+
1181
+ extension SkFloat32ListExtension on SkFloat32List {
1153
1182
/// Returns the [Float32List] object backed by WASM memory.
1154
1183
///
1155
1184
/// Do not reuse the returned list across multiple WASM function/method
@@ -1204,8 +1233,12 @@ Float32List toSharedSkColor3(ui.Color color) {
1204
1233
final SkFloat32List _sharedSkColor3 = mallocFloat32List (4 );
1205
1234
1206
1235
@JS ('window.flutterCanvasKit.Path' )
1236
+ @staticInterop
1207
1237
class SkPath {
1208
- external SkPath ([SkPath ? other]);
1238
+ external factory SkPath .create ([SkPath ? other]);
1239
+ }
1240
+
1241
+ extension SkPathExtension on SkPath {
1209
1242
external void setFillType (SkFillType fillType);
1210
1243
external void addArc (
1211
1244
Float32List oval,
0 commit comments