@shopify/react-native-skia 1.11.4 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +0 -1
- package/cpp/api/JsiSkParagraph.h +1 -3
- package/cpp/api/recorder/Convertor.h +57 -9
- package/cpp/api/recorder/Drawings.h +11 -36
- package/cpp/jsi/ViewProperty.h +1 -3
- package/lib/commonjs/animation/functions/interpolateColors.d.ts +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +2 -2
- package/lib/commonjs/dom/types/NodeType.js +8 -0
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/external/reanimated/buffers.d.ts +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +1 -1
- package/lib/commonjs/skia/types/Image/ColorType.js +20 -2
- package/lib/commonjs/skia/types/Image/ColorType.js.map +1 -1
- package/lib/commonjs/skia/types/Image/ColorType.web.js +18 -2
- package/lib/commonjs/skia/types/Image/ColorType.web.js.map +1 -1
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js +14 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js +5 -2
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/BlendMode.js +31 -2
- package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js +14 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.js +4 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +2 -2
- package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkPoint.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkRRect.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkRect.d.ts +1 -1
- package/lib/commonjs/sksg/Container.d.ts +1 -0
- package/lib/commonjs/sksg/Container.js +8 -9
- package/lib/commonjs/sksg/Container.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Core.js +2 -0
- package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
- package/lib/commonjs/specs/NativeSkiaModule.web.d.ts +6 -0
- package/lib/commonjs/specs/NativeSkiaModule.web.js +33 -0
- package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -1
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.web.d.ts +9 -0
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.web.js +32 -0
- package/lib/commonjs/specs/SkiaPictureViewNativeComponent.web.js.map +1 -0
- package/lib/commonjs/views/types.d.ts +1 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/web/LoadSkiaWeb.js +1 -2
- package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.d.ts +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.d.ts +2 -2
- package/lib/module/dom/types/NodeType.js +8 -0
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/external/reanimated/buffers.d.ts +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +1 -1
- package/lib/module/skia/types/Image/ColorType.js +20 -2
- package/lib/module/skia/types/Image/ColorType.js.map +1 -1
- package/lib/module/skia/types/Image/ColorType.web.js +18 -2
- package/lib/module/skia/types/Image/ColorType.web.js.map +1 -1
- package/lib/module/skia/types/ImageFilter/ImageFilter.js +14 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js +5 -2
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Paint/BlendMode.js +31 -2
- package/lib/module/skia/types/Paint/BlendMode.js.map +1 -1
- package/lib/module/skia/types/Paragraph/ParagraphBuilder.js +14 -0
- package/lib/module/skia/types/Paragraph/ParagraphBuilder.js.map +1 -1
- package/lib/module/skia/types/Path/Path.js +4 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/module/skia/web/JsiSkImage.d.ts +2 -2
- package/lib/module/skia/web/JsiSkPaint.d.ts +1 -1
- package/lib/module/skia/web/JsiSkPicture.d.ts +1 -1
- package/lib/module/skia/web/JsiSkPoint.d.ts +1 -1
- package/lib/module/skia/web/JsiSkRRect.d.ts +1 -1
- package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/module/skia/web/JsiSkRect.d.ts +1 -1
- package/lib/module/sksg/Container.d.ts +1 -0
- package/lib/module/sksg/Container.js +8 -9
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/Recorder/Core.js +2 -0
- package/lib/module/sksg/Recorder/Core.js.map +1 -1
- package/lib/module/specs/NativeSkiaModule.web.d.ts +6 -0
- package/lib/module/specs/NativeSkiaModule.web.js +30 -1
- package/lib/module/specs/NativeSkiaModule.web.js.map +1 -1
- package/lib/module/specs/SkiaPictureViewNativeComponent.web.d.ts +9 -0
- package/lib/module/specs/SkiaPictureViewNativeComponent.web.js +26 -0
- package/lib/module/specs/SkiaPictureViewNativeComponent.web.js.map +1 -0
- package/lib/module/views/types.d.ts +1 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/lib/commonjs/animation/functions/interpolateColors.d.ts +1 -1
- package/lib/typescript/lib/commonjs/renderer/components/image/ImageShader.d.ts +1 -1
- package/lib/typescript/lib/commonjs/skia/web/JsiSkColor.d.ts +1 -1
- package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +1 -1
- package/lib/typescript/lib/commonjs/specs/NativeSkiaModule.web.d.ts +1 -0
- package/lib/typescript/lib/commonjs/specs/SkiaPictureViewNativeComponent.web.d.ts +10 -0
- package/lib/typescript/lib/module/animation/functions/interpolateColors.d.ts +1 -1
- package/lib/typescript/lib/module/mock/index.d.ts +2 -2
- package/lib/typescript/lib/module/renderer/components/image/ImageShader.d.ts +1 -1
- package/lib/typescript/lib/module/skia/Skia.web.d.ts +1 -1
- package/lib/typescript/lib/module/skia/web/JsiSkColor.d.ts +1 -1
- package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +1 -1
- package/lib/typescript/lib/module/specs/NativeSkiaModule.web.d.ts +1 -0
- package/lib/typescript/lib/module/specs/SkiaPictureViewNativeComponent.web.d.ts +9 -0
- package/lib/typescript/src/animation/functions/interpolateColors.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/datatypes/Gradient.d.ts +2 -2
- package/lib/typescript/src/external/reanimated/buffers.d.ts +1 -1
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +2 -2
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +1 -1
- package/lib/typescript/src/sksg/Container.d.ts +1 -0
- package/lib/typescript/src/specs/NativeSkiaModule.web.d.ts +6 -0
- package/lib/typescript/src/specs/SkiaPictureViewNativeComponent.web.d.ts +9 -0
- package/lib/typescript/src/views/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/sksg/Container.ts +8 -8
- package/src/specs/NativeSkiaModule.web.ts +38 -0
- package/src/specs/SkiaPictureViewNativeComponent.web.ts +39 -0
- package/src/views/types.ts +1 -0
- package/cpp/jsi/JsiValue.cpp +0 -345
- package/cpp/jsi/JsiValue.h +0 -222
- package/lib/commonjs/renderer/Canvas.web.d.ts +0 -10
- package/lib/commonjs/renderer/Canvas.web.js +0 -110
- package/lib/commonjs/renderer/Canvas.web.js.map +0 -1
- package/lib/module/renderer/Canvas.web.d.ts +0 -10
- package/lib/module/renderer/Canvas.web.js +0 -105
- package/lib/module/renderer/Canvas.web.js.map +0 -1
- package/lib/typescript/lib/commonjs/renderer/Canvas.web.d.ts +0 -3
- package/lib/typescript/lib/module/renderer/Canvas.web.d.ts +0 -1
- package/lib/typescript/src/renderer/Canvas.web.d.ts +0 -10
- package/src/renderer/Canvas.web.tsx +0 -134
package/android/CMakeLists.txt
CHANGED
|
@@ -80,7 +80,6 @@ add_library(
|
|
|
80
80
|
"${PROJECT_SOURCE_DIR}/cpp/rnskia-android/RNSkAndroidVideo.cpp"
|
|
81
81
|
|
|
82
82
|
"${PROJECT_SOURCE_DIR}/../cpp/jsi/JsiHostObject.cpp"
|
|
83
|
-
"${PROJECT_SOURCE_DIR}/../cpp/jsi/JsiValue.cpp"
|
|
84
83
|
"${PROJECT_SOURCE_DIR}/../cpp/jsi/RuntimeLifecycleMonitor.cpp"
|
|
85
84
|
"${PROJECT_SOURCE_DIR}/../cpp/jsi/RuntimeAwareCache.cpp"
|
|
86
85
|
"${PROJECT_SOURCE_DIR}/../cpp/jsi/JsiPromises.cpp"
|
package/cpp/api/JsiSkParagraph.h
CHANGED
|
@@ -31,8 +31,14 @@ struct Radius {
|
|
|
31
31
|
using ConversionFunction =
|
|
32
32
|
std::function<void(jsi::Runtime &runtime, const jsi::Object &object)>;
|
|
33
33
|
using Variables = std::map<std::string, std::vector<ConversionFunction>>;
|
|
34
|
+
|
|
34
35
|
using Patch = std::array<SkPoint, 12>;
|
|
35
36
|
|
|
37
|
+
struct GlyphData {
|
|
38
|
+
std::vector<SkGlyphID> glyphIds;
|
|
39
|
+
std::vector<SkPoint> positions;
|
|
40
|
+
};
|
|
41
|
+
|
|
36
42
|
bool isSharedValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
37
43
|
return value.isObject() &&
|
|
38
44
|
value.asObject(runtime).hasProperty(runtime,
|
|
@@ -378,6 +384,29 @@ SkFont getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
|
378
384
|
throw std::runtime_error("Invalid prop value for SkFont received");
|
|
379
385
|
}
|
|
380
386
|
|
|
387
|
+
template <>
|
|
388
|
+
GlyphData getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
389
|
+
GlyphData result;
|
|
390
|
+
if (value.isObject() && value.asObject(runtime).isArray(runtime)) {
|
|
391
|
+
auto array = value.asObject(runtime).asArray(runtime);
|
|
392
|
+
size_t size = array.size(runtime);
|
|
393
|
+
result.glyphIds.reserve(size);
|
|
394
|
+
result.positions.reserve(size);
|
|
395
|
+
|
|
396
|
+
for (size_t i = 0; i < size; i++) {
|
|
397
|
+
auto glyph = array.getValueAtIndex(runtime, i).asObject(runtime);
|
|
398
|
+
// Get the glyph id
|
|
399
|
+
result.glyphIds.push_back(
|
|
400
|
+
static_cast<SkGlyphID>(glyph.getProperty(runtime, "id").asNumber()));
|
|
401
|
+
// Get the position
|
|
402
|
+
result.positions.push_back(
|
|
403
|
+
processPoint(runtime, glyph.getProperty(runtime, "pos")));
|
|
404
|
+
}
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
407
|
+
throw std::runtime_error("Invalid prop value for GlyphData received");
|
|
408
|
+
}
|
|
409
|
+
|
|
381
410
|
template <>
|
|
382
411
|
SkRSXform getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
383
412
|
if (value.isObject()) {
|
|
@@ -389,6 +418,22 @@ SkRSXform getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
|
389
418
|
throw std::runtime_error("Invalid prop value for SkRSXform received");
|
|
390
419
|
}
|
|
391
420
|
|
|
421
|
+
template <>
|
|
422
|
+
sk_sp<SkSVGDOM> getPropertyValue(jsi::Runtime &runtime,
|
|
423
|
+
const jsi::Value &value) {
|
|
424
|
+
if (value.isObject() && value.asObject(runtime).isHostObject(runtime)) {
|
|
425
|
+
auto ptr = std::dynamic_pointer_cast<JsiSkSVG>(
|
|
426
|
+
value.asObject(runtime).asHostObject(runtime));
|
|
427
|
+
if (ptr != nullptr) {
|
|
428
|
+
return ptr->getObject();
|
|
429
|
+
}
|
|
430
|
+
} else if (value.isNull()) {
|
|
431
|
+
return nullptr;
|
|
432
|
+
}
|
|
433
|
+
throw std::runtime_error(
|
|
434
|
+
"Expected SkSvgDom object or null for the svg property.");
|
|
435
|
+
}
|
|
436
|
+
|
|
392
437
|
template <>
|
|
393
438
|
sk_sp<SkPicture> getPropertyValue(jsi::Runtime &runtime,
|
|
394
439
|
const jsi::Value &value) {
|
|
@@ -412,18 +457,21 @@ SkPaint getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
|
|
|
412
457
|
}
|
|
413
458
|
|
|
414
459
|
template <>
|
|
415
|
-
|
|
416
|
-
|
|
460
|
+
std::shared_ptr<JsiSkParagraph> getPropertyValue(jsi::Runtime &runtime,
|
|
461
|
+
const jsi::Value &value) {
|
|
417
462
|
if (value.isObject()) {
|
|
418
|
-
auto
|
|
419
|
-
|
|
420
|
-
|
|
463
|
+
auto hostObject = value.asObject(runtime).asHostObject(runtime);
|
|
464
|
+
if (!hostObject) {
|
|
465
|
+
return nullptr;
|
|
466
|
+
}
|
|
467
|
+
auto para = std::dynamic_pointer_cast<JsiSkParagraph>(hostObject);
|
|
468
|
+
if (!para) {
|
|
469
|
+
return nullptr;
|
|
470
|
+
}
|
|
471
|
+
// Return a shared_ptr instead of raw pointer
|
|
421
472
|
return para;
|
|
422
473
|
}
|
|
423
|
-
|
|
424
|
-
return nullptr;
|
|
425
|
-
}
|
|
426
|
-
throw std::runtime_error("Invalid prop value for Paragraph received");
|
|
474
|
+
return nullptr;
|
|
427
475
|
}
|
|
428
476
|
|
|
429
477
|
template <>
|
|
@@ -745,16 +745,11 @@ public:
|
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
747
|
|
|
748
|
-
struct GlyphData {
|
|
749
|
-
std::vector<SkGlyphID> glyphIds;
|
|
750
|
-
std::vector<SkPoint> positions;
|
|
751
|
-
};
|
|
752
|
-
|
|
753
748
|
struct GlyphsCmdProps {
|
|
754
749
|
std::optional<SkFont> font;
|
|
755
750
|
float x;
|
|
756
751
|
float y;
|
|
757
|
-
|
|
752
|
+
GlyphData glyphs;
|
|
758
753
|
};
|
|
759
754
|
|
|
760
755
|
class GlyphsCmd : public Command {
|
|
@@ -768,22 +763,15 @@ public:
|
|
|
768
763
|
convertProperty(runtime, object, "font", props.font, variables);
|
|
769
764
|
convertProperty(runtime, object, "x", props.x, variables);
|
|
770
765
|
convertProperty(runtime, object, "y", props.y, variables);
|
|
771
|
-
|
|
766
|
+
convertProperty(runtime, object, "glyphs", props.glyphs, variables);
|
|
772
767
|
}
|
|
773
768
|
|
|
774
769
|
void draw(DrawingCtx *ctx) {
|
|
775
770
|
if (props.font.has_value()) {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
// positions.push_back(pos);
|
|
781
|
-
// }
|
|
782
|
-
// ctx->canvas->drawGlyphs(
|
|
783
|
-
// static_cast<int>(props.glyphs.glyphIds.size()),
|
|
784
|
-
// props.glyphs.glyphIds.data(), props.glyphs.positions.data(),
|
|
785
|
-
// SkPoint::Make(props.x, props.y), props.font.value(),
|
|
786
|
-
// ctx->getPaint());
|
|
771
|
+
ctx->canvas->drawGlyphs(
|
|
772
|
+
static_cast<int>(props.glyphs.glyphIds.size()),
|
|
773
|
+
props.glyphs.glyphIds.data(), props.glyphs.positions.data(),
|
|
774
|
+
SkPoint::Make(props.x, props.y), props.font.value(), ctx->getPaint());
|
|
787
775
|
}
|
|
788
776
|
}
|
|
789
777
|
};
|
|
@@ -823,21 +811,8 @@ public:
|
|
|
823
811
|
ImageSVGCmd(jsi::Runtime &runtime, const jsi::Object &object,
|
|
824
812
|
Variables &variables)
|
|
825
813
|
: Command(CommandType::DrawImageSVG) {
|
|
826
|
-
// Convert SVG property - expect a host object of JsiSkSVG type
|
|
827
|
-
auto svgValue = object.getProperty(runtime, "svg");
|
|
828
|
-
if (svgValue.isObject() &&
|
|
829
|
-
svgValue.asObject(runtime).isHostObject(runtime)) {
|
|
830
|
-
auto ptr = std::dynamic_pointer_cast<JsiSkSVG>(
|
|
831
|
-
svgValue.asObject(runtime).asHostObject(runtime));
|
|
832
|
-
if (ptr != nullptr) {
|
|
833
|
-
props.svg = ptr->getObject();
|
|
834
|
-
} else {
|
|
835
|
-
throw std::runtime_error(
|
|
836
|
-
"Expected SkSvgDom object for the svg property.");
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
814
|
// Convert other properties
|
|
815
|
+
convertProperty(runtime, object, "svg", props.svg, variables);
|
|
841
816
|
convertProperty(runtime, object, "x", props.x, variables);
|
|
842
817
|
convertProperty(runtime, object, "y", props.y, variables);
|
|
843
818
|
convertProperty(runtime, object, "width", props.width, variables);
|
|
@@ -878,7 +853,7 @@ public:
|
|
|
878
853
|
};
|
|
879
854
|
|
|
880
855
|
struct ParagraphCmdProps {
|
|
881
|
-
|
|
856
|
+
std::shared_ptr<JsiSkParagraph> paragraph;
|
|
882
857
|
float x;
|
|
883
858
|
float y;
|
|
884
859
|
float width;
|
|
@@ -899,9 +874,9 @@ public:
|
|
|
899
874
|
}
|
|
900
875
|
|
|
901
876
|
void draw(DrawingCtx *ctx) {
|
|
902
|
-
if (props.paragraph) {
|
|
903
|
-
props.paragraph->layout(props.width);
|
|
904
|
-
props.paragraph->paint(ctx->canvas, props.x, props.y);
|
|
877
|
+
if (props.paragraph && props.paragraph->_paragraph) {
|
|
878
|
+
props.paragraph->_paragraph->layout(props.width);
|
|
879
|
+
props.paragraph->_paragraph->paint(ctx->canvas, props.x, props.y);
|
|
905
880
|
}
|
|
906
881
|
}
|
|
907
882
|
};
|
package/cpp/jsi/ViewProperty.h
CHANGED
|
@@ -28,11 +28,9 @@ public:
|
|
|
28
28
|
|
|
29
29
|
bool isNull() { return std::holds_alternative<nullptr_t>(_value); }
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
sk_sp<SkPicture> getPicture() { return std::get<sk_sp<SkPicture>>(_value); }
|
|
33
32
|
|
|
34
33
|
private:
|
|
35
|
-
std::variant<nullptr_t, sk_sp<SkPicture>>
|
|
36
|
-
_value = nullptr;
|
|
34
|
+
std::variant<nullptr_t, sk_sp<SkPicture>> _value = nullptr;
|
|
37
35
|
};
|
|
38
36
|
} // namespace RNJsi
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Color } from "../../skia";
|
|
2
2
|
export declare const interpolateColors: (value: number, inputRange: number[], _outputRange: Color[]) => number[];
|
|
3
|
-
export declare const mixColors: (value: number, x: Color, y: Color) => Float32Array
|
|
3
|
+
export declare const mixColors: (value: number, x: Color, y: Color) => Float32Array<ArrayBuffer>;
|
|
@@ -242,9 +242,9 @@ export declare const transformOrigin: (origin: Vector, transform: Transforms3d)
|
|
|
242
242
|
rotateY: number;
|
|
243
243
|
matrix: import("../../../skia/types").Matrix4;
|
|
244
244
|
}, "matrix">)[];
|
|
245
|
-
export declare const processColor: (Skia: Skia, color: number | string | Float32Array | number[]) =>
|
|
245
|
+
export declare const processColor: (Skia: Skia, color: number | string | Float32Array | number[]) => import("../../../skia/types").SkColor;
|
|
246
246
|
export declare const processGradientProps: (Skia: Skia, { colors, positions, mode, flags, ...transform }: GradientProps) => {
|
|
247
|
-
colors:
|
|
247
|
+
colors: import("../../../skia/types").SkColor[];
|
|
248
248
|
positions: number[] | null;
|
|
249
249
|
mode: TileMode;
|
|
250
250
|
flags: number | undefined;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.NodeType = void 0;
|
|
7
7
|
let NodeType = exports.NodeType = /*#__PURE__*/function (NodeType) {
|
|
8
|
+
// Shaders
|
|
8
9
|
NodeType["Layer"] = "skLayer";
|
|
9
10
|
NodeType["Shader"] = "skShader";
|
|
10
11
|
NodeType["ImageShader"] = "skImageShader";
|
|
@@ -15,7 +16,9 @@ let NodeType = exports.NodeType = /*#__PURE__*/function (NodeType) {
|
|
|
15
16
|
NodeType["RadialGradient"] = "skRadialGradient";
|
|
16
17
|
NodeType["SweepGradient"] = "skSweepGradient";
|
|
17
18
|
NodeType["TwoPointConicalGradient"] = "skTwoPointConicalGradient";
|
|
19
|
+
// Mask Filters
|
|
18
20
|
NodeType["BlurMaskFilter"] = "skBlurMaskFilter";
|
|
21
|
+
// Path Effects
|
|
19
22
|
NodeType["DiscretePathEffect"] = "skDiscretePathEffect";
|
|
20
23
|
NodeType["DashPathEffect"] = "skDashPathEffect";
|
|
21
24
|
NodeType["Path1DPathEffect"] = "skPath1DPathEffect";
|
|
@@ -23,12 +26,14 @@ let NodeType = exports.NodeType = /*#__PURE__*/function (NodeType) {
|
|
|
23
26
|
NodeType["CornerPathEffect"] = "skCornerPathEffect";
|
|
24
27
|
NodeType["SumPathEffect"] = "skSumPathEffect";
|
|
25
28
|
NodeType["Line2DPathEffect"] = "skLine2DPathEffect";
|
|
29
|
+
// Color Filters
|
|
26
30
|
NodeType["MatrixColorFilter"] = "skMatrixColorFilter";
|
|
27
31
|
NodeType["BlendColorFilter"] = "skBlendColorFilter";
|
|
28
32
|
NodeType["LinearToSRGBGammaColorFilter"] = "skLinearToSRGBGammaColorFilter";
|
|
29
33
|
NodeType["SRGBToLinearGammaColorFilter"] = "skSRGBToLinearGammaColorFilter";
|
|
30
34
|
NodeType["LumaColorFilter"] = "skLumaColorFilter";
|
|
31
35
|
NodeType["LerpColorFilter"] = "skLerpColorFilter";
|
|
36
|
+
// Image Filters
|
|
32
37
|
NodeType["OffsetImageFilter"] = "skOffsetImageFilter";
|
|
33
38
|
NodeType["DisplacementMapImageFilter"] = "skDisplacementMapImageFilter";
|
|
34
39
|
NodeType["BlurImageFilter"] = "skBlurImageFilter";
|
|
@@ -36,10 +41,12 @@ let NodeType = exports.NodeType = /*#__PURE__*/function (NodeType) {
|
|
|
36
41
|
NodeType["MorphologyImageFilter"] = "skMorphologyImageFilter";
|
|
37
42
|
NodeType["BlendImageFilter"] = "skBlendImageFilter";
|
|
38
43
|
NodeType["RuntimeShaderImageFilter"] = "skRuntimeShaderImageFilter";
|
|
44
|
+
// Mixed
|
|
39
45
|
NodeType["Blend"] = "skBlend";
|
|
40
46
|
NodeType["BackdropFilter"] = "skBackdropFilter";
|
|
41
47
|
NodeType["Box"] = "skBox";
|
|
42
48
|
NodeType["BoxShadow"] = "skBoxShadow";
|
|
49
|
+
// Drawings
|
|
43
50
|
NodeType["Group"] = "skGroup";
|
|
44
51
|
NodeType["Paint"] = "skPaint";
|
|
45
52
|
NodeType["Circle"] = "skCircle";
|
|
@@ -61,6 +68,7 @@ let NodeType = exports.NodeType = /*#__PURE__*/function (NodeType) {
|
|
|
61
68
|
NodeType["Picture"] = "skPicture";
|
|
62
69
|
NodeType["ImageSVG"] = "skImageSVG";
|
|
63
70
|
NodeType["Atlas"] = "skAtlas";
|
|
71
|
+
// Paragraph
|
|
64
72
|
NodeType["Paragraph"] = "skParagraph";
|
|
65
73
|
return NodeType;
|
|
66
74
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NodeType","exports"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Layer = \"skLayer\",\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n Atlas = \"skAtlas\",\n\n // Paragraph\n Paragraph = \"skParagraph\",\n}\n"],"mappings":";;;;;;IAAkBA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;
|
|
1
|
+
{"version":3,"names":["NodeType","exports"],"sources":["NodeType.ts"],"sourcesContent":["export const enum NodeType {\n // Shaders\n Layer = \"skLayer\",\n Shader = \"skShader\",\n ImageShader = \"skImageShader\",\n ColorShader = \"skColorShader\",\n Turbulence = \"skTurbulence\",\n FractalNoise = \"skFractalNoise\",\n LinearGradient = \"skLinearGradient\",\n RadialGradient = \"skRadialGradient\",\n SweepGradient = \"skSweepGradient\",\n TwoPointConicalGradient = \"skTwoPointConicalGradient\",\n\n // Mask Filters\n BlurMaskFilter = \"skBlurMaskFilter\",\n\n // Path Effects\n DiscretePathEffect = \"skDiscretePathEffect\",\n DashPathEffect = \"skDashPathEffect\",\n Path1DPathEffect = \"skPath1DPathEffect\",\n Path2DPathEffect = \"skPath2DPathEffect\",\n CornerPathEffect = \"skCornerPathEffect\",\n SumPathEffect = \"skSumPathEffect\",\n Line2DPathEffect = \"skLine2DPathEffect\",\n\n // Color Filters\n MatrixColorFilter = \"skMatrixColorFilter\",\n BlendColorFilter = \"skBlendColorFilter\",\n LinearToSRGBGammaColorFilter = \"skLinearToSRGBGammaColorFilter\",\n SRGBToLinearGammaColorFilter = \"skSRGBToLinearGammaColorFilter\",\n LumaColorFilter = \"skLumaColorFilter\",\n LerpColorFilter = \"skLerpColorFilter\",\n\n // Image Filters\n OffsetImageFilter = \"skOffsetImageFilter\",\n DisplacementMapImageFilter = \"skDisplacementMapImageFilter\",\n BlurImageFilter = \"skBlurImageFilter\",\n DropShadowImageFilter = \"skDropShadowImageFilter\",\n MorphologyImageFilter = \"skMorphologyImageFilter\",\n BlendImageFilter = \"skBlendImageFilter\",\n RuntimeShaderImageFilter = \"skRuntimeShaderImageFilter\",\n\n // Mixed\n Blend = \"skBlend\",\n BackdropFilter = \"skBackdropFilter\",\n Box = \"skBox\",\n BoxShadow = \"skBoxShadow\",\n\n // Drawings\n Group = \"skGroup\",\n Paint = \"skPaint\",\n Circle = \"skCircle\",\n Fill = \"skFill\",\n Image = \"skImage\",\n Points = \"skPoints\",\n Path = \"skPath\",\n Rect = \"skRect\",\n RRect = \"skRRect\",\n Oval = \"skOval\",\n Line = \"skLine\",\n Patch = \"skPatch\",\n Vertices = \"skVertices\",\n DiffRect = \"skDiffRect\",\n Text = \"skText\",\n TextPath = \"skTextPath\",\n TextBlob = \"skTextBlob\",\n Glyphs = \"skGlyphs\",\n Picture = \"skPicture\",\n ImageSVG = \"skImageSVG\",\n Atlas = \"skAtlas\",\n\n // Paragraph\n Paragraph = \"skParagraph\",\n}\n"],"mappings":";;;;;;IAAkBA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EACxB;EADgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAaxB;EAbgBA,QAAQ;EAgBxB;EAhBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAyBxB;EAzBgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAiCxB;EAjCgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EA0CxB;EA1CgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAgDxB;EAhDgBA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAuExB;EAvEgBA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
|
@@ -3,5 +3,5 @@ type Modifier<T> = (input: T, index: number) => void;
|
|
|
3
3
|
export declare const useRectBuffer: (size: number, modifier: Modifier<SkHostRect>) => import("react-native-reanimated/lib/typescript/commonTypes").Mutable<SkHostRect[]>;
|
|
4
4
|
export declare const useRSXformBuffer: (size: number, modifier: Modifier<SkRSXform>) => import("react-native-reanimated/lib/typescript/commonTypes").Mutable<SkRSXform[]>;
|
|
5
5
|
export declare const usePointBuffer: (size: number, modifier: Modifier<SkPoint>) => import("react-native-reanimated/lib/typescript/commonTypes").Mutable<SkPoint[]>;
|
|
6
|
-
export declare const useColorBuffer: (size: number, modifier: Modifier<SkColor>) => import("react-native-reanimated/lib/typescript/commonTypes").Mutable<
|
|
6
|
+
export declare const useColorBuffer: (size: number, modifier: Modifier<SkColor>) => import("react-native-reanimated/lib/typescript/commonTypes").Mutable<SkColor[]>;
|
|
7
7
|
export {};
|
|
@@ -24,7 +24,7 @@ export declare let fonts: {
|
|
|
24
24
|
DinMedium: SkFont;
|
|
25
25
|
};
|
|
26
26
|
export declare const wait: (ms: number) => Promise<unknown>;
|
|
27
|
-
export declare const resolveFile: (uri: string) => Buffer
|
|
27
|
+
export declare const resolveFile: (uri: string) => Buffer<ArrayBufferLike>;
|
|
28
28
|
export declare const resolveFont: (uri: string) => number[];
|
|
29
29
|
export declare const testingFonts: {
|
|
30
30
|
Roboto: number[][];
|
|
@@ -6,24 +6,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ColorType = void 0;
|
|
7
7
|
let ColorType = exports.ColorType = /*#__PURE__*/function (ColorType) {
|
|
8
8
|
ColorType[ColorType["Unknown"] = 0] = "Unknown";
|
|
9
|
+
// uninitialized
|
|
9
10
|
ColorType[ColorType["Alpha_8"] = 1] = "Alpha_8";
|
|
11
|
+
// pixel with alpha in 8-bit byte
|
|
10
12
|
ColorType[ColorType["RGB_565"] = 2] = "RGB_565";
|
|
13
|
+
// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
|
|
11
14
|
ColorType[ColorType["ARGB_4444"] = 3] = "ARGB_4444";
|
|
15
|
+
// pixel with 4 bits for alpha, red, green, blue; in 16-bit word
|
|
12
16
|
ColorType[ColorType["RGBA_8888"] = 4] = "RGBA_8888";
|
|
17
|
+
// pixel with 8 bits for red, green, blue, alpha; in 32-bit word
|
|
13
18
|
ColorType[ColorType["RGB_888x"] = 5] = "RGB_888x";
|
|
19
|
+
// pixel with 8 bits each for red, green, blue; in 32-bit word
|
|
14
20
|
ColorType[ColorType["BGRA_8888"] = 6] = "BGRA_8888";
|
|
21
|
+
// pixel with 8 bits for blue, green, red, alpha; in 32-bit word
|
|
15
22
|
ColorType[ColorType["RGBA_1010102"] = 7] = "RGBA_1010102";
|
|
23
|
+
// 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
|
|
16
24
|
ColorType[ColorType["BGRA_1010102"] = 8] = "BGRA_1010102";
|
|
25
|
+
// 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
|
17
26
|
ColorType[ColorType["RGB_101010x"] = 9] = "RGB_101010x";
|
|
27
|
+
// pixel with 10 bits each for red, green, blue; in 32-bit word
|
|
18
28
|
ColorType[ColorType["BGR_101010x"] = 10] = "BGR_101010x";
|
|
29
|
+
// pixel with 10 bits each for blue, green, red; in 32-bit word
|
|
19
30
|
ColorType[ColorType["BGR_101010x_XR"] = 11] = "BGR_101010x_XR";
|
|
31
|
+
// pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
|
20
32
|
ColorType[ColorType["BGRA_10101010_XR"] = 12] = "BGRA_10101010_XR";
|
|
33
|
+
// pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
|
|
21
34
|
ColorType[ColorType["RGBA_10x6"] = 13] = "RGBA_10x6";
|
|
35
|
+
// pixel with 10 used bits (most significant) followed by 6 unused
|
|
22
36
|
ColorType[ColorType["Gray_8"] = 14] = "Gray_8";
|
|
37
|
+
// pixel with grayscale level in 8-bit byte
|
|
23
38
|
ColorType[ColorType["RGBA_F16Norm"] = 15] = "RGBA_F16Norm";
|
|
39
|
+
// pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word
|
|
24
40
|
ColorType[ColorType["RGBA_F16"] = 16] = "RGBA_F16";
|
|
41
|
+
// pixel with half floats for red, green, blue, alpha; in 64-bit word
|
|
25
42
|
ColorType[ColorType["RGB_F16F16F16x"] = 17] = "RGB_F16F16F16x";
|
|
26
|
-
|
|
43
|
+
// pixel with half floats for red, green, blue; in 64-bit word
|
|
44
|
+
ColorType[ColorType["RGBA_F32"] = 18] = "RGBA_F32"; // pixel using C float for red, green, blue, alpha; in 128-bit word
|
|
27
45
|
return ColorType;
|
|
28
|
-
}({});
|
|
46
|
+
}({});
|
|
29
47
|
//# sourceMappingURL=ColorType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ColorType","exports"],"sources":["ColorType.ts"],"sourcesContent":["export enum ColorType {\n Unknown, // uninitialized\n Alpha_8, // pixel with alpha in 8-bit byte\n RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word\n BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range\n BGRA_10101010_XR, // pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range\n RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused\n Gray_8, // pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word\n RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word\n RGB_F16F16F16x, // pixel with half floats for red, green, blue; in 64-bit word\n RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word\n}\n"],"mappings":";;;;;;IAAYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;
|
|
1
|
+
{"version":3,"names":["ColorType","exports"],"sources":["ColorType.ts"],"sourcesContent":["export enum ColorType {\n Unknown, // uninitialized\n Alpha_8, // pixel with alpha in 8-bit byte\n RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word\n BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range\n BGRA_10101010_XR, // pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range\n RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused\n Gray_8, // pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word\n RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word\n RGB_F16F16F16x, // pixel with half floats for red, green, blue; in 64-bit word\n RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word\n}\n"],"mappings":";;;;;;IAAYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EACV;EADCA,SAAS,CAATA,SAAS;EAEV;EAFCA,SAAS,CAATA,SAAS;EAGV;EAHCA,SAAS,CAATA,SAAS;EAIR;EAJDA,SAAS,CAATA,SAAS;EAKR;EALDA,SAAS,CAATA,SAAS;EAMT;EANAA,SAAS,CAATA,SAAS;EAOR;EAPDA,SAAS,CAATA,SAAS;EAQL;EARJA,SAAS,CAATA,SAAS;EASL;EATJA,SAAS,CAATA,SAAS;EAUN;EAVHA,SAAS,CAATA,SAAS;EAWN;EAXHA,SAAS,CAATA,SAAS;EAYH;EAZNA,SAAS,CAATA,SAAS;EAaD;EAbRA,SAAS,CAATA,SAAS;EAcR;EAdDA,SAAS,CAATA,SAAS;EAeX;EAfEA,SAAS,CAATA,SAAS;EAgBL;EAhBJA,SAAS,CAATA,SAAS;EAiBT;EAjBAA,SAAS,CAATA,SAAS;EAkBH;EAlBNA,SAAS,CAATA,SAAS,iCAmBT;EAAA,OAnBAA,SAAS;AAAA","ignoreList":[]}
|
|
@@ -6,22 +6,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ColorTypeCanvasKit = void 0;
|
|
7
7
|
let ColorTypeCanvasKit = exports.ColorTypeCanvasKit = /*#__PURE__*/function (ColorTypeCanvasKit) {
|
|
8
8
|
ColorTypeCanvasKit[ColorTypeCanvasKit["Unknown"] = 0] = "Unknown";
|
|
9
|
+
// uninitialized
|
|
9
10
|
ColorTypeCanvasKit[ColorTypeCanvasKit["Alpha_8"] = 1] = "Alpha_8";
|
|
11
|
+
// pixel with alpha in 8-bit byte
|
|
10
12
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_565"] = 2] = "RGB_565";
|
|
13
|
+
// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
|
|
11
14
|
ColorTypeCanvasKit[ColorTypeCanvasKit["ARGB_4444"] = 3] = "ARGB_4444";
|
|
15
|
+
// pixel with 4 bits for alpha, red, green, blue; in 16-bit word
|
|
12
16
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_8888"] = 4] = "RGBA_8888";
|
|
17
|
+
// pixel with 8 bits for red, green, blue, alpha; in 32-bit word
|
|
13
18
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_888x"] = 5] = "RGB_888x";
|
|
19
|
+
// pixel with 8 bits each for red, green, blue; in 32-bit word
|
|
14
20
|
ColorTypeCanvasKit[ColorTypeCanvasKit["BGRA_8888"] = 6] = "BGRA_8888";
|
|
21
|
+
// pixel with 8 bits for blue, green, red, alpha; in 32-bit word
|
|
15
22
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_1010102"] = 7] = "RGBA_1010102";
|
|
23
|
+
// 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
|
|
16
24
|
ColorTypeCanvasKit[ColorTypeCanvasKit["BGRA_1010102"] = 8] = "BGRA_1010102";
|
|
25
|
+
// 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
|
17
26
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_101010x"] = 9] = "RGB_101010x";
|
|
27
|
+
// pixel with 10 bits each for red, green, blue; in 32-bit word
|
|
18
28
|
ColorTypeCanvasKit[ColorTypeCanvasKit["BGR_101010x"] = 10] = "BGR_101010x";
|
|
29
|
+
// pixel with 10 bits each for blue, green, red; in 32-bit word
|
|
19
30
|
ColorTypeCanvasKit[ColorTypeCanvasKit["BGR_101010x_XR"] = 11] = "BGR_101010x_XR";
|
|
31
|
+
// pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
|
20
32
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_10x6"] = 12] = "RGBA_10x6";
|
|
33
|
+
// pixel with 10 used bits (most significant) followed by 6 unused
|
|
21
34
|
ColorTypeCanvasKit[ColorTypeCanvasKit["Gray_8"] = 13] = "Gray_8";
|
|
35
|
+
// pixel with grayscale level in 8-bit byte
|
|
22
36
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F16Norm"] = 14] = "RGBA_F16Norm";
|
|
37
|
+
// pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word
|
|
23
38
|
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F16"] = 15] = "RGBA_F16";
|
|
24
|
-
|
|
39
|
+
// pixel with half floats for red, green, blue, alpha; in 64-bit word
|
|
40
|
+
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F32"] = 16] = "RGBA_F32"; // pixel using C float for red, green, blue, alpha; in 128-bit word
|
|
25
41
|
return ColorTypeCanvasKit;
|
|
26
|
-
}({});
|
|
42
|
+
}({});
|
|
27
43
|
//# sourceMappingURL=ColorType.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ColorTypeCanvasKit","exports"],"sources":["ColorType.web.ts"],"sourcesContent":["export enum ColorTypeCanvasKit {\n Unknown, // uninitialized\n Alpha_8, // pixel with alpha in 8-bit byte\n RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word\n BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range\n RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused\n Gray_8, // pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word\n RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word\n RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word\n}\n"],"mappings":";;;;;;IAAYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;
|
|
1
|
+
{"version":3,"names":["ColorTypeCanvasKit","exports"],"sources":["ColorType.web.ts"],"sourcesContent":["export enum ColorTypeCanvasKit {\n Unknown, // uninitialized\n Alpha_8, // pixel with alpha in 8-bit byte\n RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word\n BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range\n RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused\n Gray_8, // pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word\n RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word\n RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word\n}\n"],"mappings":";;;;;;IAAYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EACnB;EADCA,kBAAkB,CAAlBA,kBAAkB;EAEnB;EAFCA,kBAAkB,CAAlBA,kBAAkB;EAGnB;EAHCA,kBAAkB,CAAlBA,kBAAkB;EAIjB;EAJDA,kBAAkB,CAAlBA,kBAAkB;EAKjB;EALDA,kBAAkB,CAAlBA,kBAAkB;EAMlB;EANAA,kBAAkB,CAAlBA,kBAAkB;EAOjB;EAPDA,kBAAkB,CAAlBA,kBAAkB;EAQd;EARJA,kBAAkB,CAAlBA,kBAAkB;EASd;EATJA,kBAAkB,CAAlBA,kBAAkB;EAUf;EAVHA,kBAAkB,CAAlBA,kBAAkB;EAWf;EAXHA,kBAAkB,CAAlBA,kBAAkB;EAYZ;EAZNA,kBAAkB,CAAlBA,kBAAkB;EAajB;EAbDA,kBAAkB,CAAlBA,kBAAkB;EAcpB;EAdEA,kBAAkB,CAAlBA,kBAAkB;EAed;EAfJA,kBAAkB,CAAlBA,kBAAkB;EAgBlB;EAhBAA,kBAAkB,CAAlBA,kBAAkB,iCAiBlB;EAAA,OAjBAA,kBAAkB;AAAA","ignoreList":[]}
|
|
@@ -5,9 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isImageFilter = exports.TileMode = void 0;
|
|
7
7
|
let TileMode = exports.TileMode = /*#__PURE__*/function (TileMode) {
|
|
8
|
+
/**
|
|
9
|
+
* Replicate the edge color if the shader draws outside of its
|
|
10
|
+
* original bounds.
|
|
11
|
+
*/
|
|
8
12
|
TileMode[TileMode["Clamp"] = 0] = "Clamp";
|
|
13
|
+
/**
|
|
14
|
+
* Repeat the shader's image horizontally and vertically.
|
|
15
|
+
*/
|
|
9
16
|
TileMode[TileMode["Repeat"] = 1] = "Repeat";
|
|
17
|
+
/**
|
|
18
|
+
* Repeat the shader's image horizontally and vertically, alternating
|
|
19
|
+
* mirror images so that adjacent images always seam.
|
|
20
|
+
*/
|
|
10
21
|
TileMode[TileMode["Mirror"] = 2] = "Mirror";
|
|
22
|
+
/**
|
|
23
|
+
* Only draw within the original domain, return transparent-black everywhere else.
|
|
24
|
+
*/
|
|
11
25
|
TileMode[TileMode["Decal"] = 3] = "Decal";
|
|
12
26
|
return TileMode;
|
|
13
27
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TileMode","exports","isImageFilter","obj","__typename__"],"sources":["ImageFilter.ts"],"sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\n\nexport enum TileMode {\n /**\n * Replicate the edge color if the shader draws outside of its\n * original bounds.\n */\n Clamp,\n\n /**\n * Repeat the shader's image horizontally and vertically.\n */\n Repeat,\n\n /**\n * Repeat the shader's image horizontally and vertically, alternating\n * mirror images so that adjacent images always seam.\n */\n Mirror,\n\n /**\n * Only draw within the original domain, return transparent-black everywhere else.\n */\n Decal,\n}\n\nexport const isImageFilter = (\n obj: SkJSIInstance<string> | null\n): obj is SkImageFilter => obj !== null && obj.__typename__ === \"ImageFilter\";\n\nexport type SkImageFilter = SkJSIInstance<\"ImageFilter\">;\n"],"mappings":";;;;;;IAEYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;
|
|
1
|
+
{"version":3,"names":["TileMode","exports","isImageFilter","obj","__typename__"],"sources":["ImageFilter.ts"],"sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\n\nexport enum TileMode {\n /**\n * Replicate the edge color if the shader draws outside of its\n * original bounds.\n */\n Clamp,\n\n /**\n * Repeat the shader's image horizontally and vertically.\n */\n Repeat,\n\n /**\n * Repeat the shader's image horizontally and vertically, alternating\n * mirror images so that adjacent images always seam.\n */\n Mirror,\n\n /**\n * Only draw within the original domain, return transparent-black everywhere else.\n */\n Decal,\n}\n\nexport const isImageFilter = (\n obj: SkJSIInstance<string> | null\n): obj is SkImageFilter => obj !== null && obj.__typename__ === \"ImageFilter\";\n\nexport type SkImageFilter = SkJSIInstance<\"ImageFilter\">;\n"],"mappings":";;;;;;IAEYA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAClB;AACF;AACA;AACA;EAJYA,QAAQ,CAARA,QAAQ;EAOlB;AACF;AACA;EATYA,QAAQ,CAARA,QAAQ;EAYlB;AACF;AACA;AACA;EAfYA,QAAQ,CAARA,QAAQ;EAkBlB;AACF;AACA;EApBYA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAwBb,MAAME,aAAa,GACxBC,GAAiC,IACRA,GAAG,KAAK,IAAI,IAAIA,GAAG,CAACC,YAAY,KAAK,aAAa;AAACH,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -6,11 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isMaskFilter = exports.BlurStyle = void 0;
|
|
7
7
|
let BlurStyle = exports.BlurStyle = /*#__PURE__*/function (BlurStyle) {
|
|
8
8
|
BlurStyle[BlurStyle["Normal"] = 0] = "Normal";
|
|
9
|
+
//!< fuzzy inside and outside
|
|
9
10
|
BlurStyle[BlurStyle["Solid"] = 1] = "Solid";
|
|
11
|
+
//!< solid inside, fuzzy outside
|
|
10
12
|
BlurStyle[BlurStyle["Outer"] = 2] = "Outer";
|
|
11
|
-
|
|
13
|
+
//!< nothing inside, fuzzy outside
|
|
14
|
+
BlurStyle[BlurStyle["Inner"] = 3] = "Inner"; //!< fuzzy inside, nothing outside
|
|
12
15
|
return BlurStyle;
|
|
13
|
-
}({});
|
|
16
|
+
}({});
|
|
14
17
|
const isMaskFilter = obj => obj !== null && obj.__typename__ === "MaskFilter";
|
|
15
18
|
|
|
16
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlurStyle","exports","isMaskFilter","obj","__typename__"],"sources":["MaskFilter.ts"],"sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\n\nexport enum BlurStyle {\n Normal, //!< fuzzy inside and outside\n Solid, //!< solid inside, fuzzy outside\n Outer, //!< nothing inside, fuzzy outside\n Inner, //!< fuzzy inside, nothing outside\n}\n\nexport const isMaskFilter = (\n obj: SkJSIInstance<string> | null\n): obj is SkMaskFilter => obj !== null && obj.__typename__ === \"MaskFilter\";\n\nexport type SkMaskFilter = SkJSIInstance<\"MaskFilter\">;\n\n/**\n * See SkMaskFilter.h for more details.\n */\nexport interface MaskFilterFactory {\n /**\n * Create a blur maskfilter\n * @param style\n * @param sigma - Standard deviation of the Gaussian blur to apply. Must be > 0.\n * @param respectCTM - if true the blur's sigma is modified by the CTM.\n */\n MakeBlur(style: BlurStyle, sigma: number, respectCTM: boolean): SkMaskFilter;\n}\n"],"mappings":";;;;;;IAEYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;
|
|
1
|
+
{"version":3,"names":["BlurStyle","exports","isMaskFilter","obj","__typename__"],"sources":["MaskFilter.ts"],"sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\n\nexport enum BlurStyle {\n Normal, //!< fuzzy inside and outside\n Solid, //!< solid inside, fuzzy outside\n Outer, //!< nothing inside, fuzzy outside\n Inner, //!< fuzzy inside, nothing outside\n}\n\nexport const isMaskFilter = (\n obj: SkJSIInstance<string> | null\n): obj is SkMaskFilter => obj !== null && obj.__typename__ === \"MaskFilter\";\n\nexport type SkMaskFilter = SkJSIInstance<\"MaskFilter\">;\n\n/**\n * See SkMaskFilter.h for more details.\n */\nexport interface MaskFilterFactory {\n /**\n * Create a blur maskfilter\n * @param style\n * @param sigma - Standard deviation of the Gaussian blur to apply. Must be > 0.\n * @param respectCTM - if true the blur's sigma is modified by the CTM.\n */\n MakeBlur(style: BlurStyle, sigma: number, respectCTM: boolean): SkMaskFilter;\n}\n"],"mappings":";;;;;;IAEYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EACX;EADEA,SAAS,CAATA,SAAS;EAEZ;EAFGA,SAAS,CAATA,SAAS;EAGZ;EAHGA,SAAS,CAATA,SAAS,0BAIZ;EAAA,OAJGA,SAAS;AAAA;AAOd,MAAME,YAAY,GACvBC,GAAiC,IACTA,GAAG,KAAK,IAAI,IAAIA,GAAG,CAACC,YAAY,KAAK,YAAY;;AAI3E;AACA;AACA;AAFAH,OAAA,CAAAC,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -33,34 +33,63 @@ exports.BlendMode = void 0;
|
|
|
33
33
|
*/
|
|
34
34
|
let BlendMode = exports.BlendMode = /*#__PURE__*/function (BlendMode) {
|
|
35
35
|
BlendMode[BlendMode["Clear"] = 0] = "Clear";
|
|
36
|
+
//!< r = 0
|
|
36
37
|
BlendMode[BlendMode["Src"] = 1] = "Src";
|
|
38
|
+
//!< r = s
|
|
37
39
|
BlendMode[BlendMode["Dst"] = 2] = "Dst";
|
|
40
|
+
//!< r = d
|
|
38
41
|
BlendMode[BlendMode["SrcOver"] = 3] = "SrcOver";
|
|
42
|
+
//!< r = s + (1-sa)*d
|
|
39
43
|
BlendMode[BlendMode["DstOver"] = 4] = "DstOver";
|
|
44
|
+
//!< r = d + (1-da)*s
|
|
40
45
|
BlendMode[BlendMode["SrcIn"] = 5] = "SrcIn";
|
|
46
|
+
//!< r = s * da
|
|
41
47
|
BlendMode[BlendMode["DstIn"] = 6] = "DstIn";
|
|
48
|
+
//!< r = d * sa
|
|
42
49
|
BlendMode[BlendMode["SrcOut"] = 7] = "SrcOut";
|
|
50
|
+
//!< r = s * (1-da)
|
|
43
51
|
BlendMode[BlendMode["DstOut"] = 8] = "DstOut";
|
|
52
|
+
//!< r = d * (1-sa)
|
|
44
53
|
BlendMode[BlendMode["SrcATop"] = 9] = "SrcATop";
|
|
54
|
+
//!< r = s*da + d*(1-sa)
|
|
45
55
|
BlendMode[BlendMode["DstATop"] = 10] = "DstATop";
|
|
56
|
+
//!< r = d*sa + s*(1-da)
|
|
46
57
|
BlendMode[BlendMode["Xor"] = 11] = "Xor";
|
|
58
|
+
//!< r = s*(1-da) + d*(1-sa)
|
|
47
59
|
BlendMode[BlendMode["Plus"] = 12] = "Plus";
|
|
60
|
+
//!< r = min(s + d, 1)
|
|
48
61
|
BlendMode[BlendMode["Modulate"] = 13] = "Modulate";
|
|
62
|
+
//!< r = s*d
|
|
49
63
|
BlendMode[BlendMode["Screen"] = 14] = "Screen";
|
|
64
|
+
//!< r = s + d - s*d
|
|
50
65
|
BlendMode[BlendMode["Overlay"] = 15] = "Overlay";
|
|
66
|
+
//!< multiply or screen, depending on destination
|
|
51
67
|
BlendMode[BlendMode["Darken"] = 16] = "Darken";
|
|
68
|
+
//!< rc = s + d - max(s*da, d*sa), ra = kSrcOver
|
|
52
69
|
BlendMode[BlendMode["Lighten"] = 17] = "Lighten";
|
|
70
|
+
//!< rc = s + d - min(s*da, d*sa), ra = kSrcOver
|
|
53
71
|
BlendMode[BlendMode["ColorDodge"] = 18] = "ColorDodge";
|
|
72
|
+
//!< brighten destination to reflect source
|
|
54
73
|
BlendMode[BlendMode["ColorBurn"] = 19] = "ColorBurn";
|
|
74
|
+
//!< darken destination to reflect source
|
|
55
75
|
BlendMode[BlendMode["HardLight"] = 20] = "HardLight";
|
|
76
|
+
//!< multiply or screen, depending on source
|
|
56
77
|
BlendMode[BlendMode["SoftLight"] = 21] = "SoftLight";
|
|
78
|
+
//!< lighten or darken, depending on source
|
|
57
79
|
BlendMode[BlendMode["Difference"] = 22] = "Difference";
|
|
80
|
+
//!< rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
|
|
58
81
|
BlendMode[BlendMode["Exclusion"] = 23] = "Exclusion";
|
|
82
|
+
//!< rc = s + d - two(s*d), ra = kSrcOver
|
|
59
83
|
BlendMode[BlendMode["Multiply"] = 24] = "Multiply";
|
|
84
|
+
//!< r = s*(1-da) + d*(1-sa) + s*d
|
|
60
85
|
BlendMode[BlendMode["Hue"] = 25] = "Hue";
|
|
86
|
+
//!< hue of source with saturation and luminosity of destination
|
|
61
87
|
BlendMode[BlendMode["Saturation"] = 26] = "Saturation";
|
|
88
|
+
//!< saturation of source with hue and luminosity of
|
|
89
|
+
//!< destination
|
|
62
90
|
BlendMode[BlendMode["Color"] = 27] = "Color";
|
|
63
|
-
|
|
91
|
+
//!< hue and saturation of source with luminosity of destination
|
|
92
|
+
BlendMode[BlendMode["Luminosity"] = 28] = "Luminosity"; //!< luminosity of source with hue and saturation of
|
|
64
93
|
return BlendMode;
|
|
65
|
-
}({});
|
|
94
|
+
}({});
|
|
66
95
|
//# sourceMappingURL=BlendMode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlendMode","exports"],"sources":["BlendMode.ts"],"sourcesContent":["/**\n * Blends are operators that take in two colors (source, destination) and\n * return a new color. Many of these operate the same on all 4 components: red,\n * green, blue, alpha. For these, we just document what happens to one\n * component, rather than naming each one separately.\n *\n * Different SkColorTypes have different representations for color components:\n * 8-bit: 0..255\n * 6-bit: 0..63\n * 5-bit: 0..31\n * 4-bit: 0..15\n * floats: 0...1\n *\n * The documentation is expressed as if the component values are always 0..1\n * (floats).\n *\n * For brevity, the documentation uses the following abbreviations\n * s : source\n * d : destination\n * sa : source alpha\n * da : destination alpha\n *\n * Results are abbreviated\n * r : if all 4 components are computed in the same manner\n * ra : result alpha component\n * rc : result \"color\": red, green, blue components\n */\nexport enum BlendMode {\n Clear, //!< r = 0\n Src, //!< r = s\n Dst, //!< r = d\n SrcOver, //!< r = s + (1-sa)*d\n DstOver, //!< r = d + (1-da)*s\n SrcIn, //!< r = s * da\n DstIn, //!< r = d * sa\n SrcOut, //!< r = s * (1-da)\n DstOut, //!< r = d * (1-sa)\n SrcATop, //!< r = s*da + d*(1-sa)\n DstATop, //!< r = d*sa + s*(1-da)\n Xor, //!< r = s*(1-da) + d*(1-sa)\n Plus, //!< r = min(s + d, 1)\n Modulate, //!< r = s*d\n Screen, //!< r = s + d - s*d\n\n Overlay, //!< multiply or screen, depending on destination\n Darken, //!< rc = s + d - max(s*da, d*sa), ra = kSrcOver\n Lighten, //!< rc = s + d - min(s*da, d*sa), ra = kSrcOver\n ColorDodge, //!< brighten destination to reflect source\n ColorBurn, //!< darken destination to reflect source\n HardLight, //!< multiply or screen, depending on source\n SoftLight, //!< lighten or darken, depending on source\n Difference, //!< rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver\n Exclusion, //!< rc = s + d - two(s*d), ra = kSrcOver\n Multiply, //!< r = s*(1-da) + d*(1-sa) + s*d\n\n Hue, //!< hue of source with saturation and luminosity of destination\n Saturation, //!< saturation of source with hue and luminosity of\n //!< destination\n Color, //!< hue and saturation of source with luminosity of destination\n Luminosity, //!< luminosity of source with hue and saturation of\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA,IA2BYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;
|
|
1
|
+
{"version":3,"names":["BlendMode","exports"],"sources":["BlendMode.ts"],"sourcesContent":["/**\n * Blends are operators that take in two colors (source, destination) and\n * return a new color. Many of these operate the same on all 4 components: red,\n * green, blue, alpha. For these, we just document what happens to one\n * component, rather than naming each one separately.\n *\n * Different SkColorTypes have different representations for color components:\n * 8-bit: 0..255\n * 6-bit: 0..63\n * 5-bit: 0..31\n * 4-bit: 0..15\n * floats: 0...1\n *\n * The documentation is expressed as if the component values are always 0..1\n * (floats).\n *\n * For brevity, the documentation uses the following abbreviations\n * s : source\n * d : destination\n * sa : source alpha\n * da : destination alpha\n *\n * Results are abbreviated\n * r : if all 4 components are computed in the same manner\n * ra : result alpha component\n * rc : result \"color\": red, green, blue components\n */\nexport enum BlendMode {\n Clear, //!< r = 0\n Src, //!< r = s\n Dst, //!< r = d\n SrcOver, //!< r = s + (1-sa)*d\n DstOver, //!< r = d + (1-da)*s\n SrcIn, //!< r = s * da\n DstIn, //!< r = d * sa\n SrcOut, //!< r = s * (1-da)\n DstOut, //!< r = d * (1-sa)\n SrcATop, //!< r = s*da + d*(1-sa)\n DstATop, //!< r = d*sa + s*(1-da)\n Xor, //!< r = s*(1-da) + d*(1-sa)\n Plus, //!< r = min(s + d, 1)\n Modulate, //!< r = s*d\n Screen, //!< r = s + d - s*d\n\n Overlay, //!< multiply or screen, depending on destination\n Darken, //!< rc = s + d - max(s*da, d*sa), ra = kSrcOver\n Lighten, //!< rc = s + d - min(s*da, d*sa), ra = kSrcOver\n ColorDodge, //!< brighten destination to reflect source\n ColorBurn, //!< darken destination to reflect source\n HardLight, //!< multiply or screen, depending on source\n SoftLight, //!< lighten or darken, depending on source\n Difference, //!< rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver\n Exclusion, //!< rc = s + d - two(s*d), ra = kSrcOver\n Multiply, //!< r = s*(1-da) + d*(1-sa) + s*d\n\n Hue, //!< hue of source with saturation and luminosity of destination\n Saturation, //!< saturation of source with hue and luminosity of\n //!< destination\n Color, //!< hue and saturation of source with luminosity of destination\n Luminosity, //!< luminosity of source with hue and saturation of\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA,IA2BYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EACZ;EADGA,SAAS,CAATA,SAAS;EAEd;EAFKA,SAAS,CAATA,SAAS;EAGd;EAHKA,SAAS,CAATA,SAAS;EAIV;EAJCA,SAAS,CAATA,SAAS;EAKV;EALCA,SAAS,CAATA,SAAS;EAMZ;EANGA,SAAS,CAATA,SAAS;EAOZ;EAPGA,SAAS,CAATA,SAAS;EAQX;EAREA,SAAS,CAATA,SAAS;EASX;EATEA,SAAS,CAATA,SAAS;EAUV;EAVCA,SAAS,CAATA,SAAS;EAWV;EAXCA,SAAS,CAATA,SAAS;EAYd;EAZKA,SAAS,CAATA,SAAS;EAab;EAbIA,SAAS,CAATA,SAAS;EAcT;EAdAA,SAAS,CAATA,SAAS;EAeX;EAfEA,SAAS,CAATA,SAAS;EAiBV;EAjBCA,SAAS,CAATA,SAAS;EAkBX;EAlBEA,SAAS,CAATA,SAAS;EAmBV;EAnBCA,SAAS,CAATA,SAAS;EAoBP;EApBFA,SAAS,CAATA,SAAS;EAqBR;EArBDA,SAAS,CAATA,SAAS;EAsBR;EAtBDA,SAAS,CAATA,SAAS;EAuBR;EAvBDA,SAAS,CAATA,SAAS;EAwBP;EAxBFA,SAAS,CAATA,SAAS;EAyBR;EAzBDA,SAAS,CAATA,SAAS;EA0BT;EA1BAA,SAAS,CAATA,SAAS;EA4Bd;EA5BKA,SAAS,CAATA,SAAS;EA6BP;EACZ;EA9BUA,SAAS,CAATA,SAAS;EA+BZ;EA/BGA,SAAS,CAATA,SAAS,qCAgCP;EAAA,OAhCFA,SAAS;AAAA","ignoreList":[]}
|
|
@@ -5,11 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PlaceholderAlignment = void 0;
|
|
7
7
|
let PlaceholderAlignment = exports.PlaceholderAlignment = /*#__PURE__*/function (PlaceholderAlignment) {
|
|
8
|
+
/// Match the baseline of the placeholder with the baseline.
|
|
8
9
|
PlaceholderAlignment[PlaceholderAlignment["Baseline"] = 0] = "Baseline";
|
|
10
|
+
/// Align the bottom edge of the placeholder with the baseline such that the
|
|
11
|
+
/// placeholder sits on top of the baseline.
|
|
9
12
|
PlaceholderAlignment[PlaceholderAlignment["AboveBaseline"] = 1] = "AboveBaseline";
|
|
13
|
+
/// Align the top edge of the placeholder with the baseline specified in
|
|
14
|
+
/// such that the placeholder hangs below the baseline.
|
|
10
15
|
PlaceholderAlignment[PlaceholderAlignment["BelowBaseline"] = 2] = "BelowBaseline";
|
|
16
|
+
/// Align the top edge of the placeholder with the top edge of the font.
|
|
17
|
+
/// When the placeholder is very tall, the extra space will hang from
|
|
18
|
+
/// the top and extend through the bottom of the line.
|
|
11
19
|
PlaceholderAlignment[PlaceholderAlignment["Top"] = 3] = "Top";
|
|
20
|
+
/// Align the bottom edge of the placeholder with the top edge of the font.
|
|
21
|
+
/// When the placeholder is very tall, the extra space will rise from
|
|
22
|
+
/// the bottom and extend through the top of the line.
|
|
12
23
|
PlaceholderAlignment[PlaceholderAlignment["Bottom"] = 4] = "Bottom";
|
|
24
|
+
/// Align the middle of the placeholder with the middle of the text. When the
|
|
25
|
+
/// placeholder is very tall, the extra space will grow equally from
|
|
26
|
+
/// the top and bottom of the line.
|
|
13
27
|
PlaceholderAlignment[PlaceholderAlignment["Middle"] = 5] = "Middle";
|
|
14
28
|
return PlaceholderAlignment;
|
|
15
29
|
}({});
|