YSTest: YResource.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

YResource.h
浏览该文件的文档.
1 /*
2 © 2009-2013, 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 YSL_INC_Service_YResource_h_
29 #define YSL_INC_Service_YResource_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_Core_YStorage
33 #include YFM_YSLib_Service_YGDI
34
35 namespace YSLib
36 {
37
42 DeclI(YF_API, IResource)
43 EndDecl
44
45
46 //应用程序资源类型定义。
47
48 namespace Drawing
49 {
50
55 class YF_API Image : public CompactPixmap,
56 implements IResource
57 {
58 public:
62 explicit
63 Image(ConstBitmapPtr = {}, SDst = 0, SDst = 0);
65 Image(const CompactPixmap&);
67 Image(CompactPixmap&&);
69 DefDeCopyCtor(Image)
74 ~Image() override;
75
76 DefGetter(const ynothrow, BitmapPtr, ImagePtr, GetBufferPtr())
77 };
78
79
84 inline PDefH(Point, RotateCenter, const Image& img)
85 ImplRet(RotateCenter(img.GetSize()))
86
87 } // namespace Drawing;
88
89 } // namespace YSLib;
90
91 #endif
92
EndDecl
#define EndDecl
Definition: YBaseMacro.h:406
YSLib::Drawing::ImplRet
YB_ATTR_nodiscard YB_STATELESS yconstfn Rotation rot ImplRet(Rotation((size_t(rot)+1) % 4)) YB_ATTR_nodiscard YB_STATELESS yconstfn PDefH(Rotation
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::Drawing::PDefH
YB_ATTR_nodiscard YB_PURE yconstfn PDefH(Size, Transpose, const Size &s) ynothrow ImplRet(
转置。
Definition: YGDIBase.h:763
YSLib::Drawing::GBinaryGroup< SPos >
platform::SDst
std::uint16_t SDst
屏幕坐标距离。
Definition: Video.h:44
YSLib::Drawing::CompactPixmap
标准矩形像素图缓冲区。
Definition: YGDI.h:233
implements
#define implements
Definition: YBaseMacro.h:358
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YModules.h
YSLib 用户界面模块配置文件。
YSLib::Drawing::ynothrow
YB_ATTR_nodiscard yconstfn YB_PURE x x x Bottom YB_ATTR_nodiscard yconstfn YB_PURE x Right y x Top y x Bottom y Bottom YB_ATTR_nodiscard yconstfn YB_PURE x Right y x Top y x Bottom y Bottom YB_ATTR_nodiscard yconstfn YB_PURE const Padding & ynothrow
Definition: YGDI.h:132
DefDeCopyCtor
#define DefDeCopyCtor(_t)
Definition: YBaseMacro.h:162
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:241
YSLib::Drawing::ConstBitmapPtr
const Pixel * ConstBitmapPtr
Definition: YGraphics.h:44
YSLib::DeclI
DeclI(YF_API, IResource) EndDecl namespace Drawing
资源接口。
Definition: YResource.h:42
YSLib::Drawing::BitmapPtr
Pixel * BitmapPtr
Definition: YGraphics.h:42