YSTest: Video.h 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

Video.h
浏览该文件的文档.
1 /*
2 © 2011-2015 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YCL_INC_Video_h_
29 #define YCL_INC_Video_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YCLib_YCommon
33 #include <ystdex/cstdint.hpp>
34
35 namespace platform
36 {
37
38 #if YCL_Win32
39 using SPos = long;
40 using SDst = unsigned long;
41 #else
42 using SPos = std::int16_t;
43 using SDst = std::uint16_t;
44 #endif
45
47
48 static_assert(std::is_signed<SPos>(),
49 "Only signed integer is supported for screen position measurement.");
50 static_assert(std::is_unsigned<SDst>(),
51 "Only unsigned integer is supported for screen destination measurement.");
52 static_assert(ystdex::integer_width<SDst>() >= ystdex::integer_width<SPos>(),
53 "Max value of screen destination shall be grater than max value of screen"
54 " position.");
56
63 template<size_t _vX, size_t _vY, size_t _vZ, size_t _vA>
64 struct XYZATrait
65 {
66 static yconstexpr const size_t ABitsN = _vA;
67 static yconstexpr const size_t XBitsN = _vX;
68 static yconstexpr const size_t YBitsN = _vY;
69 static yconstexpr const size_t ZBitsN = _vZ;
70 static yconstexpr const size_t XYBitsN = XBitsN + YBitsN;
71 static yconstexpr const size_t XYZBitsN = XBitsN + YBitsN + ZBitsN;
72 static yconstexpr const size_t BitsN = XBitsN + YBitsN + ZBitsN + ABitsN;
73 static yconstexpr const size_t BytesN = (BitsN + CHAR_BIT - 1) / CHAR_BIT;
74
75 using AType = typename ystdex::make_width_int<ABitsN>::unsigned_least_type;
76 using BType = typename ystdex::make_width_int<XBitsN>::unsigned_least_type;
77 using GType = typename ystdex::make_width_int<YBitsN>::unsigned_least_type;
78 using RType = typename ystdex::make_width_int<ZBitsN>::unsigned_least_type;
79 using IntegerType
80 = typename ystdex::make_width_int<BitsN>::unsigned_least_type;
81 using ArrayType = byte[BytesN];
82
83 static_assert(BitsN <= 64, "Width larger than 64 unimplemented");
84 };
85
86
91 template<size_t _vX, size_t _vY, size_t _vZ, size_t _vA>
92 struct XYZAMaskTrait
93 {
94 using IntegerType = typename XYZATrait<_vX, _vY, _vZ, _vA>::IntegerType;
95
96 static yconstexpr const IntegerType XMaskN = _vX;
97 static yconstexpr const IntegerType XYMaskN = XMaskN + _vY;
98 static yconstexpr const IntegerType XYZMaskN = XYMaskN + _vZ;
99 static yconstexpr const IntegerType AMask = ((1U << _vA) - 1) << XYZMaskN;
100 static yconstexpr const IntegerType XMask = (1U << _vX) - 1;
101 static yconstexpr const IntegerType YMask = ((1U << _vY) - 1) << XMaskN;
102 static yconstexpr const IntegerType ZMask = ((1U << _vZ) - 1) << XYMaskN;
103 };
104
105
110 template<size_t _vA, size_t _vX, size_t _vY, size_t _vZ>
111 struct AXYZMaskTrait
112 {
113 using IntegerType = typename XYZATrait<_vX, _vY, _vZ, _vA>::IntegerType;
114
115 static yconstexpr const IntegerType AMaskN = _vA;
116 static yconstexpr const IntegerType AXMaskN = AMaskN + _vX;
117 static yconstexpr const IntegerType AXYMaskN = AXMaskN + _vY;
118 static yconstexpr const IntegerType AMask = (1U << _vA) - 1;
119 static yconstexpr const IntegerType XMask = ((1U << _vX) - 1) << AMaskN;
120 static yconstexpr const IntegerType YMask = ((1U << _vY) - 1) << AXMaskN;
121 static yconstexpr const IntegerType ZMask = ((1U << _vZ) - 1) << AXYMaskN;
122 };
123
124
133 template<size_t _vB, size_t _vG, size_t _vR, size_t _vA>
134 union YB_ATTR(packed) YB_ATTR(
135 aligned(yalignof(typename XYZATrait<_vB, _vG, _vR, _vA>::IntegerType))) BGRA
136 {
137 using Trait = XYZATrait<_vB, _vG, _vR, _vA>;
139 using MaskTrait = XYZAMaskTrait<_vB, _vG, _vR, _vA>;
141 using ArrayType = typename Trait::ArrayType;
143 using IntegerType = typename Trait::IntegerType;
144
145 ArrayType Bytes;
146 IntegerType Integer;
147
148 //#if !LITTLE_ENDIAN
149 //# error Unsupported integer endianness found.
150 //#endif
151
152 DefDeCtor(BGRA)
153 yconstfn
154 BGRA(typename Trait::IntegerType i)
155 : Integer(i)
156 {}
157 yconstfn
158 BGRA(typename Trait::BType b, typename Trait::GType g,
159 typename Trait::RType r, typename Trait::AType a)
160 : Integer(IntegerType(b) | IntegerType(g) << MaskTrait::XMaskN
161 | IntegerType(r) << MaskTrait::XYMaskN
162 | IntegerType(a) << MaskTrait::XYZMaskN)
163 {}
164
166 yconstfn DefCvt(const ynothrow, typename Trait::IntegerType, Integer)
167
168
169 yconstfn DefGetter(const ynothrow, typename Trait::AType, A,
170 (Integer & MaskTrait::AMask) >> MaskTrait::XYZMaskN)
171 yconstfn DefGetter(const ynothrow, typename Trait::BType, B,
172 Integer & MaskTrait::XMask)
174 yconstfn DefGetter(const ynothrow, typename Trait::GType, G,
175 (Integer & MaskTrait::YMask) >> MaskTrait::XMaskN)
177 yconstfn DefGetter(const ynothrow, typename Trait::RType, R,
178 (Integer & MaskTrait::ZMask) >> MaskTrait::XYMaskN)
179 };
180
181
190 template<size_t _vR, size_t _vG, size_t _vB, size_t _vA>
191 union YB_ATTR(packed) YB_ATTR(
192 aligned(yalignof(typename XYZATrait<_vB, _vG, _vR, _vA>::IntegerType))) RGBA
193 {
194 using Trait = XYZATrait<_vR, _vG, _vB, _vA>;
196 using MaskTrait = XYZAMaskTrait<_vB, _vG, _vR, _vA>;
198 using ArrayType = typename Trait::ArrayType;
200 using IntegerType = typename Trait::IntegerType;
201
202 ArrayType Bytes;
203 IntegerType Integer;
204
205 //#if !LITTLE_ENDIAN
206 //# error Unsupported integer endianness found.
207 //#endif
208
209 DefDeCtor(RGBA)
210 yconstfn
211 RGBA(typename Trait::IntegerType i)
212 : Integer(i)
213 {}
214 yconstfn
215 RGBA(typename Trait::BType r, typename Trait::GType g,
216 typename Trait::RType b, typename Trait::AType a)
217 : Integer(IntegerType(r) | IntegerType(g) << MaskTrait::XMaskN
218 | IntegerType(b) << MaskTrait::XYMaskN
219 | IntegerType(a) << MaskTrait::XYZMaskN)
220 {}
221
223 yconstfn DefCvt(const ynothrow, typename Trait::IntegerType, Integer)
224
225
226 yconstfn DefGetter(const ynothrow, typename Trait::AType, A,
227 (Integer & MaskTrait::AMask) >> MaskTrait::XYZMaskN)
228 yconstfn DefGetter(const ynothrow, typename Trait::BType, B,
229 (Integer & MaskTrait::ZMask) >> MaskTrait::XYMaskN)
231 yconstfn DefGetter(const ynothrow, typename Trait::GType, G,
232 (Integer & MaskTrait::YMask) >> MaskTrait::XMaskN)
234 yconstfn DefGetter(const ynothrow, typename Trait::RType, R,
235 Integer & MaskTrait::XMask)
236 };
237
238
247 template<size_t _vA, size_t _vR, size_t _vG, size_t _vB>
248 union YB_ATTR(packed) YB_ATTR(
249 aligned(yalignof(typename XYZATrait<_vB, _vG, _vR, _vA>::IntegerType))) ARGB
250 {
251 using Trait = XYZATrait<_vB, _vG, _vR, _vA>;
252 using MaskTrait = AXYZMaskTrait<_vA, _vR, _vG, _vB>;
253
254 typename Trait::ArrayType Bytes;
255 typename Trait::IntegerType Integer;
256
257 //#if !LITTLE_ENDIAN
258 //# error Unsupported integer endianness found.
259 //#endif
260
261 DefDeCtor(ARGB)
262 yconstfn
263 ARGB(typename Trait::IntegerType i)
264 : Integer(i)
265 {}
266 yconstfn
267 ARGB(typename Trait::BType a, typename Trait::GType r,
268 typename Trait::RType g, typename Trait::AType b)
269 : Integer(a | r << MaskTrait::AMaskN | g << MaskTrait::AXMaskN
270 | b << MaskTrait::AXYMaskN)
271 {}
272
273 yconstfn DefCvt(const ynothrow, typename Trait::IntegerType, Integer)
274
275 yconstfn DefGetter(const ynothrow, typename Trait::AType, A,
276 Integer & MaskTrait::AMask)
277 yconstfn DefGetter(const ynothrow, typename Trait::BType, B,
278 (Integer & MaskTrait::ZMask) >> MaskTrait::AXYMaskN)
279 yconstfn DefGetter(const ynothrow, typename Trait::GType, G,
280 (Integer & MaskTrait::YMask) >> MaskTrait::AXMaskN)
281 yconstfn DefGetter(const ynothrow, typename Trait::RType, R,
282 (Integer & MaskTrait::XMask) >> MaskTrait::AMaskN)
283 };
284
285
287
288 using MonoType = octet;
289 using AlphaType = octet;
291
292 #if YCL_DS
293
298 # define YCL_PIXEL_FORMAT_XYZ555 0xAABBCCDD
299
305 using Pixel = RGBA<5, 5, 5, 1>;
311 yconstfn PDefH(AlphaType, FetchAlpha, Pixel px) ynothrow
312 ImplRet(px.GetA() != 0 ? 0xFF : 0)
313
319 yconstfn PDefH(Pixel, FetchOpaque, Pixel px) ynothrow
320 ImplRet(px.Integer | 1 << 15)
321
322
326 yconstfn PDefH(std::uint16_t, FetchPixel, MonoType r, MonoType g, MonoType b)
327 ynothrow
328 ImplRet(r >> 3 | std::uint16_t(g >> 3) << 5 | std::uint16_t(b >> 3) << 10)
329
330 # define DefColorH_(hex, name) name = \
331 (FetchPixel(((hex) >> 16) & 0xFF, ((hex) >> 8) & 0xFF, (hex) & 0xFF) \
332 | 1 << 15)
333 #elif YCL_Win32 || YCL_Android || YCL_Linux || YCL_OS_X
334 // TODO: Real implementation for X11.
335 # if YCL_Win32
336
341 # define YCL_PIXEL_FORMAT_XYZ888 0xAADDCCBB
342
352 using Pixel = BGRA<8, 8, 8, 8>;
353 # else
354
359 # define YCL_PIXEL_FORMAT_XYZ888 0xAABBCCDD
360
366 using Pixel = RGBA<8, 8, 8, 8>;
367 # endif
368
373 yconstfn PDefH(AlphaType, FetchAlpha, Pixel px) ynothrow
374 ImplRet(px.GetA())
375
381 yconstfn PDefH(Pixel, FetchOpaque, Pixel px) ynothrow
382 # if YCL_Win32
383 ImplRet({px.GetB(), px.GetG(), px.GetR(), 0xFF})
384 # else
385 ImplRet({px.GetB(), px.GetG(), px.GetR(), 0xFF})
386 # endif
387
393 yconstfn PDefH(std::uint32_t, FetchPixel,
394 AlphaType r, AlphaType g, AlphaType b) ynothrow
395 ImplRet(std::uint32_t(r) | std::uint32_t(g) << 8 | std::uint32_t(b) << 16)
396
397
404 # define DefColorH_(hex, name) \
405 name = (FetchPixel(((hex) >> 16) & 0xFF, \
406 ((hex) >> 8) & 0xFF, (hex) & 0xFF) << 8 | 0xFF)
407 #else
408 # error "Unsupported platform found."
409 #endif
410
411
413 namespace ColorSpace
414 {
415 // #define DefColorA(r, g, b, name) name = ARGB16(1, r, g, b),
416 #define HexAdd0x(hex) 0x##hex
417 #define DefColorH(hex_, name) DefColorH_(HexAdd0x(hex_), name)
418
424 enum ColorSet : Pixel::Trait::IntegerType
425 {
426 DefColorH(00FFFF, Aqua),
427 DefColorH(000000, Black),
428 DefColorH(0000FF, Blue),
429 DefColorH(FF00FF, Fuchsia),
430 DefColorH(808080, Gray),
431 DefColorH(008000, Green),
432 DefColorH(00FF00, Lime),
433 DefColorH(800000, Maroon),
434 DefColorH(000080, Navy),
435 DefColorH(808000, Olive),
436 DefColorH(800080, Purple),
437 DefColorH(FF0000, Red),
438 DefColorH(C0C0C0, Silver),
439 DefColorH(008080, Teal),
440 DefColorH(FFFFFF, White),
441 DefColorH(FFFF00, Yellow)
442 };
443
444 #undef DefColorH
445 #undef DefColorH_
446 #undef HexAdd0x
447 } // namespace ColorSpace;
448
449
451 class YF_API Color
452 {
453 public:
454 using ColorSet = ColorSpace::ColorSet;
455
456 private:
461 MonoType r = 0, g = 0, b = 0;
466 AlphaType a = 0;
467
468 public:
473 yconstfn
474 Color() = default;
479 yconstfn
480 Color(Pixel px) ynothrow
481 #if YCL_DS
482 : r(px.GetR() << 3), g(px.GetG() << 3), b(px.GetB() << 3),
483 a(FetchAlpha(px) ? 0xFF : 0x00)
484 #elif YCL_Win32 || YCL_Linux || YCL_OS_X
485 : r(px.GetR()), g(px.GetG()), b(px.GetB()), a(px.GetA())
486 #endif
487 {}
492 yconstfn
493 Color(ColorSet cs) ynothrow
494 #if YCL_DS
495 : Color(Pixel(cs))
496 #elif YCL_Win32 || YCL_Android || YCL_Linux || YCL_OS_X
497 : r((cs & 0xFF00) >> 8), g((cs & 0xFF0000) >> 16),
498 b((cs & 0xFF000000) >> 24), a(0xFF)
499 #endif
500 {}
505 yconstfn
506 Color(MonoType r_, MonoType g_, MonoType b_, AlphaType a_ = 0xFF) ynothrow
507 : r(r_), g(g_), b(b_), a(a_)
508 {}
514 template<typename _tScalar>
515 yconstfn
516 Color(_tScalar r_, _tScalar g_, _tScalar b_, AlphaType a_ = 0xFF) ynothrow
517 : Color(MonoType(r_), MonoType(g_), MonoType(b_), a_)
518 {}
519
524 yconstfn
525 operator Pixel() const ynothrow
526 {
527 #if YCL_DS
528 return int(a != 0) << 15 | FetchPixel(r, g, b);
529 #elif YCL_Win32
530 return {b, g, r, a};
531 #elif YCL_Android || YCL_Linux || YCL_OS_X
532 return {r, g, b, a};
533 #endif
534 }
535
540 yconstfn DefGetter(const ynothrow, MonoType, A, a)
545 yconstfn DefGetter(const ynothrow, MonoType, B, b)
550 yconstfn DefGetter(const ynothrow, MonoType, G, g)
555 yconstfn DefGetter(const ynothrow, MonoType, R, r)
556 };
557
558
563 YF_API bool
564 InitVideo();
565
566 } // namespace platform;
567
568 #endif
569
platform::A
yconstfn A
Definition: Video.h:169
platform::IntegerType
typename Trait::IntegerType IntegerType
Definition: Video.h:143
YSLib::Consoles::Blue
Definition: YConsole.h:62
yconstexpr
#define yconstexpr
指定编译时常量表达式。
Definition: ydef.h:653
platform::Integer
IntegerType Integer
Definition: Video.h:146
YSLib::Consoles::Green
Definition: YConsole.h:63
platform::AXYZMaskTrait::XMask
static yconstexpr const IntegerType XMask
Definition: Video.h:119
platform::InitVideo
YF_API bool InitVideo()
初始化视频输出。
Definition: Video.cpp:43
platform::AXYZMaskTrait::IntegerType
typename XYZATrait< _vX, _vY, _vZ, _vA >::IntegerType IntegerType
Definition: Video.h:113
YSLib::Consoles::Black
Definition: YConsole.h:53
platform::XYZAMaskTrait::XMaskN
static yconstexpr const IntegerType XMaskN
Definition: Video.h:96
YSLib::Consoles::Gray
Definition: YConsole.h:60
platform::DefCvt
yconstfn DefCvt(const ynothrow, typename Trait::IntegerType, Integer) yconstfn DefGetter(const ynothrow
platform::AXYZMaskTrait::AMaskN
static yconstexpr const IntegerType AMaskN
Definition: Video.h:115
platform::G
yconstfn Integer &MaskTrait::AMask MaskTrait::XYZMaskN yconstfn G
Definition: Video.h:174
YSLib::Consoles::Yellow
Definition: YConsole.h:67
platform::Color
颜色。
Definition: Video.h:451
platform::XYZATrait::ZBitsN
static yconstexpr const size_t ZBitsN
Definition: Video.h:69
DefColorH
#define DefColorH(hex_, name)
Definition: Video.h:417
platform::AXYZMaskTrait::AMask
static yconstexpr const IntegerType AMask
Definition: Video.h:118
platform::RGBA
union _vA::IntegerType RGBA
Definition: Video.h:193
platform::AlphaType
octet AlphaType
Definition: Video.h:289
ystdex::integer_width
取指定整数类型的位宽度。
Definition: cstdint.hpp:100
platform::KeyCodes::DS::R
Definition: Keys.h:226
platform::XYZAMaskTrait::XYZMaskN
static yconstexpr const IntegerType XYZMaskN
Definition: Video.h:98
platform::AXYZMaskTrait::AXYMaskN
static yconstexpr const IntegerType AXYMaskN
Definition: Video.h:117
platform::XYZATrait::BytesN
static yconstexpr const size_t BytesN
Definition: Video.h:73
Color
Pixel Color
Definition: CharRenderer.cpp:58
platform::XYZAMaskTrait::YMask
static yconstexpr const IntegerType YMask
Definition: Video.h:101
ystdex::make_width_int::unsigned_least_type
typename make_width_int<(_vWidth<=8U?8U:(_vWidth<=16U?16U:(_vWidth<=32U?32U:64U)))>::unsigned_least_type unsigned_least_type
Definition: cstdint.hpp:145
platform::XYZATrait::GType
typename ystdex::make_width_int< YBitsN >::unsigned_least_type GType
Definition: Video.h:77
platform::XYZAMaskTrait::ZMask
static yconstexpr const IntegerType ZMask
Definition: Video.h:102
platform::AXYZMaskTrait::ZMask
static yconstexpr const IntegerType ZMask
Definition: Video.h:121
ystdex::octet
void octet
Definition: ydef.h:818
platform::XYZATrait::YBitsN
static yconstexpr const size_t YBitsN
Definition: Video.h:68
platform::XYZATrait::ABitsN
static yconstexpr const size_t ABitsN
Definition: Video.h:66
platform::YB_ATTR
union YB_ATTR(packed) YB_ATTR(aligned(yalignof(typename XYZATrait< _vB
BGRA 四元组。
platform::XYZATrait
XYZA 特征。
Definition: Video.h:64
platform
默认平台命名空间。
Definition: Container.h:47
platform::XYZATrait::BType
typename ystdex::make_width_int< XBitsN >::unsigned_least_type BType
Definition: Video.h:76
std
Definition: memory.hpp:1100
platform::XYZATrait::XBitsN
static yconstexpr const size_t XBitsN
Definition: Video.h:67
platform::SPos
std::int16_t SPos
屏幕坐标度量。
Definition: Video.h:42
platform::ynothrow
const _tString &path ynothrow
Definition: YCLib/FileSystem.h:303
platform::XYZATrait::RType
typename ystdex::make_width_int< ZBitsN >::unsigned_least_type RType
Definition: Video.h:78
platform::XYZATrait::BitsN
static yconstexpr const size_t BitsN
Definition: Video.h:72
platform::ARGB
union _vA::IntegerType ARGB
Definition: Video.h:250
platform::XYZATrait::XYZBitsN
static yconstexpr const size_t XYZBitsN
Definition: Video.h:71
platform::Color::Color
yconstfn Color(Pixel px) ynothrow
构造：使用本机颜色对象。
Definition: Video.h:480
platform::AXYZMaskTrait
AXYZ 掩码特征。
Definition: Video.h:111
platform::DefDeCtor
DefDeCtor(BGRA) yconstfn BGRA(typename Trait
Definition: Video.h:152
platform::AXYZMaskTrait::AXMaskN
static yconstexpr const IntegerType AXMaskN
Definition: Video.h:116
platform::XYZATrait::AType
typename ystdex::make_width_int< ABitsN >::unsigned_least_type AType
Definition: Video.h:75
platform::XYZAMaskTrait::XMask
static yconstexpr const IntegerType XMask
Definition: Video.h:100
YSLib::Drawing::r
The boundary is out of the const Graphics const Rect const Point const Point Color c const Rect const Rect & r
Definition: YDraw.h:174
YSLib::Consoles::White
Definition: YConsole.h:68
platform::BGRA
union _vA::IntegerType BGRA
Definition: Video.h:136
platform::XYZAMaskTrait::IntegerType
typename XYZATrait< _vX, _vY, _vZ, _vA >::IntegerType IntegerType
Definition: Video.h:94
YModules.h
YSLib::IO::int
YF_API int
Definition: File.h:49
YSLib::i
return i
Definition: YCoreUtilities.h:176
cstdint.hpp
ISO C 标准整数类型和相关扩展操作。
platform::Color::Color
yconstfn Color(MonoType r_, MonoType g_, MonoType b_, AlphaType a_=0xFF) ynothrow
构造：使用 RGB 值和 alpha 位。
Definition: Video.h:506
ystdex::byte
unsigned char byte
字节类型。
Definition: ydef.h:808
platform::ImplRet
const string &s ImplRet(s) YF_API string MakePathString(const char16_t *)
platform::KeyCodes::DS::B
Definition: Keys.h:216
platform::AXYZMaskTrait::YMask
static yconstexpr const IntegerType YMask
Definition: Video.h:120
yconstfn
#define yconstfn
指定编译时常量函数。
Definition: ydef.h:654
ColorSpace
YSLib::a
YB_PURE const _type * a
Definition: YCoreUtilities.h:167
platform::MonoType
octet MonoType
Definition: Video.h:288
platform::XYZATrait::XYBitsN
static yconstexpr const size_t XYBitsN
Definition: Video.h:70
platform::Color::Color
yconstfn Color(ColorSet cs) ynothrow
构造：使用默认颜色。
Definition: Video.h:493
platform::Color::ColorSet
ColorSpace::ColorSet ColorSet
Definition: Video.h:454
platform::XYZATrait::ArrayType
byte[BytesN] ArrayType
Definition: Video.h:81
platform::Color::Color
yconstfn Color(_tScalar r_, _tScalar g_, _tScalar b_, AlphaType a_=0xFF) ynothrow
构造：使用相同类型转换为单色的 RGB 值和 alpha位。
Definition: Video.h:516
YF_API
#define YF_API
Definition: Platform.h:56
platform::XYZAMaskTrait::AMask
static yconstexpr const IntegerType AMask
Definition: Video.h:99
platform::MaskTrait
XYZAMaskTrait< _vB, _vG, _vR, _vA > MaskTrait
Definition: Video.h:139
YSLib::Drawing::g
The boundary is out of the const Graphics & g
Definition: YDraw.h:161
platform::ArrayType
typename Trait::ArrayType ArrayType
Definition: Video.h:141
platform::Bytes
ArrayType Bytes
Definition: Video.h:145
platform::XYZATrait::IntegerType
typename ystdex::make_width_int< BitsN >::unsigned_least_type IntegerType
Definition: Video.h:80
platform::ColorSpace::ColorSet
ColorSet
默认颜色集。
Definition: Video.h:424
platform::XYZAMaskTrait
XYZA 掩码特征。
Definition: Video.h:92
platform::DefGetter
yconstfn Integer &MaskTrait::AMask MaskTrait::XYZMaskN yconstfn DefGetter(const ynothrow, typename Trait::BType, B, Integer &MaskTrait::XMask) yconstfn DefGetter(const ynothrow
yalignof
#define yalignof(_type)
指定特定类型的对齐。
Definition: ydef.h:634
platform::XYZAMaskTrait::XYMaskN
static yconstexpr const IntegerType XYMaskN
Definition: Video.h:97
platform::PDefH
PDefH(string, MakePathString, const char *s) ImplRet(Nonnull(s)) inline PDefH(const string &
构造适合表示路径的字符串。
platform::SDst
std::uint16_t SDst
屏幕坐标距离。
Definition: Video.h:43
YSLib::Consoles::Red
Definition: YConsole.h:65