Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
DCIToXYZD50.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (DCIToXYZD50, 512, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( DCIToXYZD50  ,
512  ,
256  ,
true  ,
 
)

Definition at line 4 of file DCIToXYZD50.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 // DCI-P3 Primaries from https://en.wikipedia.org/wiki/DCI-P3
8 p.fRX = 0.680f; p.fRY = 0.320f;
9 p.fGX = 0.265f; p.fGY = 0.690f;
10 p.fBX = 0.150f; p.fBY = 0.060f;
11
12 // DCI-P3 D65
13 p.fWX = 0.3127f; p.fWY = 0.3290f;
14
15 // DCI-P3 Theater
16 // p.fWX = 0.314; p.fWY = 0.351;
17
18 skcms_Matrix3x3 toXYZ;
19 p.toXYZD50(&toXYZ);
20
21 for (int i = 0; i < 3; ++i) {
22 SkDebugf("%f %f %f\n", toXYZ.vals[i][0], toXYZ.vals[i][1], toXYZ.vals[i][2]);
23 }
24}
25} // END FIDDLE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
float vals[3][3]