Skip to content

Conversation

@wcandillon
Copy link

No description provided.

Comment on lines +25 to +28
const c1 = Skia.Color("cyan");
const c2 = Skia.Color([0, 1, 1, 1]);
const c3 = Skia.Color(0xff00ffff);
const c4 = Skia.Color(Float32Array.of(0, 1, 1, 1));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks! I should have added these myself.

I assumed from #2113 that number[] expected 0-255 (and so coded it that way on the C++ side). Should I change it to 0-1 to match Float32Array?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually not sure I need to check 🙈 also a good test to add would be to use the drawOffscreen API to make sure they all generate the same image (cyan).
I tried to write more info at https://github.com/Shopify/react-native-skia/pull/2145/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

@louix louix merged commit efc970f into louix:main Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants