feat: expose colorSpace to display object (#17405)
* feat: expose colorSpace to display object * update doc * add a spec
This commit is contained in:
parent
4c51fa93f5
commit
1d93bc76cd
3 changed files with 3 additions and 0 deletions
|
@ -147,6 +147,7 @@ v8::Local<v8::Value> Converter<display::Display>::ToV8(
|
|||
dict.Set("accelerometerSupport", val.accelerometer_support());
|
||||
dict.Set("monochrome", val.is_monochrome());
|
||||
dict.Set("colorDepth", val.color_depth());
|
||||
dict.Set("colorSpace", val.color_space().ToString());
|
||||
dict.Set("depthPerComponent", val.depth_per_component());
|
||||
dict.Set("size", val.size());
|
||||
dict.Set("workAreaSize", val.work_area_size());
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* `touchSupport` String - Can be `available`, `unavailable`, `unknown`.
|
||||
* `monochrome` Boolean - Whether or not the display is a monochrome display.
|
||||
* `accelerometerSupport` String - Can be `available`, `unavailable`, `unknown`.
|
||||
* `colorSpace` String - represent a color space (three-dimensional object which contains all realizable color combinations) for the purpose of color conversions
|
||||
* `colorDepth` Number - The number of bits per pixel.
|
||||
* `depthPerComponent` Number - The number of bits per color component.
|
||||
* `bounds` [Rectangle](rectangle.md)
|
||||
|
|
|
@ -29,6 +29,7 @@ describe('screen module', () => {
|
|||
expect(display).to.have.a.property('monochrome').that.is.a('boolean')
|
||||
expect(display).to.have.a.property('depthPerComponent').that.is.a('number')
|
||||
expect(display).to.have.a.property('colorDepth').that.is.a('number')
|
||||
expect(display).to.have.a.property('colorSpace').that.is.a('string')
|
||||
})
|
||||
|
||||
it('has a size object property', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue