Skip to content

Commit d48ca2b

Browse files
authored
chore(📚): Remove references of the opaque property in the documentation (#3157)
1 parent bed348e commit d48ca2b

File tree

9 files changed

+9
-10
lines changed

9 files changed

+9
-10
lines changed

‎apps/docs/docs/canvas/canvas.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Behind the scenes, it is using its own React renderer.
1313
|:-----|:---------|:-----------------|
1414
| style? | `ViewStyle` | View style |
1515
| ref? | `Ref<SkiaView>` | Reference to the `SkiaView` object |
16-
| opaque? | `boolean` | By default, the canvas is transparent but on Android, you can make it opaque to improve performance. |
1716
| onSize? | `SharedValue<Size>` | Reanimated value to which the canvas size will be assigned (see [canvas size](/docs/animations/hooks#canvas-size)) |
1817
| onLayout? | `NativeEvent<LayoutEvent>` | Invoked on mount and on layout changes (see [onLayout](https://reactnative.dev/docs/view#onlayout)) |
1918

‎apps/example/src/Examples/Breathe/Breathe.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const Breathe = () => {
6868

6969
return (
7070
<View style={{ flex: 1 }}>
71-
<Canvas style={styles.container} testID="breathe-canvas" opaque>
71+
<Canvas style={styles.container} testID="breathe-canvas">
7272
<Fill color="rgb(36,43,56)" />
7373
<Group origin={center} transform={transform} blendMode="screen">
7474
<BlurMask style="solid" blur={40} />

‎apps/example/src/Examples/Breathe/TestReconciller.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const Breathe = () => {
7979
<Button onPress={add} title="add" />
8080
<Button onPress={remove} title="remove" />
8181
</View>
82-
<Canvas style={styles.container} opaque>
82+
<Canvas style={styles.container}>
8383
<Fill color="rgb(36,43,56)" />
8484
<Group origin={center} transform={transform} blendMode="screen">
8585
<BlurMask style="solid" blur={40} />

‎apps/example/src/Examples/Chat/ChatScreen/ChatScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useCallback, useEffect, useLayoutEffect, useMemo } from "react";
2-
import { Platform, StyleSheet, View } from "react-native";
2+
import { StyleSheet, View } from "react-native";
33
import Animated, {
44
runOnUI,
55
useAnimatedScrollHandler,
@@ -170,7 +170,7 @@ function OffscreenCanvas({ render }: CanvasProps) {
170170
const [texture] = useOffscreenCanvas(render);
171171

172172
return (
173-
<Canvas opaque={Platform.OS === "android"} style={StyleSheet.absoluteFill}>
173+
<Canvas style={StyleSheet.absoluteFill}>
174174
<Image image={texture} width={WINDOW_WIDTH} height={WINDOW_HEIGHT} />
175175
</Canvas>
176176
);

‎apps/example/src/Examples/Glassmorphism/Glassmorphism.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const Glassmorphism = () => {
4040
);
4141

4242
return (
43-
<Canvas style={{ flex: 1 }} opaque>
43+
<Canvas style={{ flex: 1 }}>
4444
<Fill color="black" />
4545
<Circle c={c} r={radius}>
4646
<LinearGradient

‎apps/example/src/Examples/Matrix/Matrix.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Matrix = () => {
4141
}
4242
const symbols = font.getGlyphIDs("abcdefghijklmnopqrstuvwxyz");
4343
return (
44-
<Canvas style={{ flex: 1 }} opaque>
44+
<Canvas style={{ flex: 1 }}>
4545
<Fill color="black" />
4646
<Group>
4747
<BlurMask blur={4} style="solid" />

‎apps/example/src/Examples/Severance/Severance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const Severance = () => {
2929
return (
3030
<View style={{ flex: 1 }}>
3131
<GestureDetector gesture={gesture}>
32-
<Canvas style={{ flex: 1 }} opaque>
32+
<Canvas style={{ flex: 1 }}>
3333
<CRT>
3434
<Group>
3535
<Fill color={BG} />

‎apps/example/src/Examples/Stickers/Stickers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const Stickers = () => {
2424
}
2525
return (
2626
<View>
27-
<Canvas style={{ width, height }} opaque>
27+
<Canvas style={{ width, height }}>
2828
<Picture matrix={pictureMatrix} image={image} />
2929
<HelloSticker matrix={helloMatrix} />
3030
<LocationSticker font={font} matrix={locationMatrix} />

‎apps/example/src/Examples/Video/Video.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const Video = () => {
3737
style={{ flex: 1 }}
3838
onPress={() => (paused.value = !paused.value)}
3939
>
40-
<Canvas style={{ flex: 1 }} opaque>
40+
<Canvas style={{ flex: 1 }}>
4141
<Fill>
4242
<ImageShader
4343
image={currentFrame}

0 commit comments

Comments
 (0)