mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
added PictOp constant codes
This commit is contained in:
parent
63fbe2e671
commit
c5fb01edaa
1 changed files with 74 additions and 1 deletions
|
|
@ -198,7 +198,7 @@ exports.requireExt = function(display, callback)
|
||||||
if (filterParams.length != 0) {
|
if (filterParams.length != 0) {
|
||||||
throw 'Render.SetPictureFilter: "' + name + '" - unexpected parameters for filters';
|
throw 'Render.SetPictureFilter: "' + name + '" - unexpected parameters for filters';
|
||||||
}
|
}
|
||||||
} else if (name == 'convolution' || ) {
|
} else if (name == 'convolution') {
|
||||||
if (filterParams.length < 2 || filterParams[0]*filterParams[1] !== filterParams.length + 2) {
|
if (filterParams.length < 2 || filterParams[0]*filterParams[1] !== filterParams.length + 2) {
|
||||||
throw 'Render.SetPictureFilter: "convolution" - incorrect matrix dimensions. Must be flat array [ w, h, elem1, elem2, ... ]';
|
throw 'Render.SetPictureFilter: "convolution" - incorrect matrix dimensions. Must be flat array [ w, h, elem1, elem2, ... ]';
|
||||||
}
|
}
|
||||||
|
|
@ -600,5 +600,78 @@ exports.requireExt = function(display, callback)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ext.PictOp = {
|
||||||
|
Minimum: 0,
|
||||||
|
Clear: 0,
|
||||||
|
Src: 1,
|
||||||
|
Dst: 2,
|
||||||
|
Over: 3,
|
||||||
|
OverReverse: 4,
|
||||||
|
In: 5,
|
||||||
|
InReverse: 6,
|
||||||
|
Out: 7,
|
||||||
|
OutReverse: 8,
|
||||||
|
Atop: 9,
|
||||||
|
AtopReverse: 10,
|
||||||
|
Xor: 11,
|
||||||
|
Add: 12,
|
||||||
|
Saturate: 13,
|
||||||
|
Maximum: 13,
|
||||||
|
|
||||||
|
/*,
|
||||||
|
* Operators only available in version 0.2,
|
||||||
|
*/
|
||||||
|
DisjointMinimum: 0x10,
|
||||||
|
DisjointClear: 0x10,
|
||||||
|
DisjointSrc: 0x11,
|
||||||
|
DisjointDst: 0x12,
|
||||||
|
DisjointOver: 0x13,
|
||||||
|
DisjointOverReverse: 0x14,
|
||||||
|
DisjointIn: 0x15,
|
||||||
|
DisjointInReverse: 0x16,
|
||||||
|
DisjointOut: 0x17,
|
||||||
|
DisjointOutReverse: 0x18,
|
||||||
|
DisjointAtop: 0x19,
|
||||||
|
DisjointAtopReverse: 0x1a,
|
||||||
|
DisjointXor: 0x1b,
|
||||||
|
DisjointMaximum: 0x1b,
|
||||||
|
|
||||||
|
ConjointMinimum: 0x20,
|
||||||
|
ConjointClear: 0x20,
|
||||||
|
ConjointSrc: 0x21,
|
||||||
|
ConjointDst: 0x22,
|
||||||
|
ConjointOver: 0x23,
|
||||||
|
ConjointOverReverse: 0x24,
|
||||||
|
ConjointIn: 0x25,
|
||||||
|
ConjointInReverse: 0x26,
|
||||||
|
ConjointOut: 0x27,
|
||||||
|
ConjointOutReverse: 0x28,
|
||||||
|
ConjointAtop: 0x29,
|
||||||
|
ConjointAtopReverse: 0x2a,
|
||||||
|
ConjointXor: 0x2b,
|
||||||
|
ConjointMaximum: 0x2b,
|
||||||
|
|
||||||
|
/*,
|
||||||
|
* Operators only available in version 0.11,
|
||||||
|
*/
|
||||||
|
BlendMinimum: 0x30,
|
||||||
|
Multiply: 0x30,
|
||||||
|
Screen: 0x31,
|
||||||
|
Overlay: 0x32,
|
||||||
|
Darken: 0x33,
|
||||||
|
Lighten: 0x34,
|
||||||
|
ColorDodge: 0x35,
|
||||||
|
ColorBurn: 0x36,
|
||||||
|
HardLight: 0x37,
|
||||||
|
SoftLight: 0x38,
|
||||||
|
Difference: 0x39,
|
||||||
|
Exclusion: 0x3a,
|
||||||
|
HSLHue: 0x3b,
|
||||||
|
HSLSaturation: 0x3c,
|
||||||
|
HSLColor: 0x3d,
|
||||||
|
HSLLuminosity: 0x3e,
|
||||||
|
BlendMaximum: 0x3e
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue