2019-01-03 16:51:30 +00:00
|
|
|
-- Copyright (C) 2019 Igara Studio S.A.
|
|
|
|
--
|
|
|
|
-- This file is released under the terms of the MIT license.
|
|
|
|
-- Read LICENSE.txt for more information.
|
|
|
|
|
2019-01-03 18:32:45 +00:00
|
|
|
local none = ColorSpace() -- None
|
|
|
|
local srgb = ColorSpace{ sRGB }
|
|
|
|
assert(none ~= srgb)
|
2019-01-03 16:52:13 +00:00
|
|
|
|
2019-01-03 18:32:45 +00:00
|
|
|
local spr = Sprite(32, 32)
|
|
|
|
local cs1 = spr.colorSpace
|
2019-01-03 16:52:13 +00:00
|
|
|
local cs2 = spr.spec.colorSpace
|
2019-01-03 18:32:45 +00:00
|
|
|
assert(cs1 == cs2)
|
|
|
|
assert(cs1 ~= none)
|
2019-01-03 22:37:51 +00:00
|
|
|
assert(cs1 == srgb) -- Default color profile: sRGB
|
2019-01-03 18:32:45 +00:00
|
|
|
|
|
|
|
local spr3 = Sprite(32, 32)
|
|
|
|
local cs3 = spr.spec.colorSpace
|
|
|
|
assert(cs1 == cs3)
|