DxLibEx
texture2d.hpp
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2015-2017 DxLibEx project
3  https://github.com/Nagarei/DxLibEx/
4 
5  Distributed under the Boost Software License, Version 1.0.
6  (See http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #ifndef DXLE_INC_TEXTURE_TEXTURE2D_HPP_
9 #define DXLE_INC_TEXTURE_TEXTURE2D_HPP_
10 
12 #if defined(__c2__) && __clang_major__ == 3 && __clang_minor__ == 8
13 //To avoid compile error
14 //C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229,21): error : unknown type name 'IUnknown'
15 // static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
16 struct IUnknown;
17 #endif
18 #include "DxLib.h"
19 #include <mutex>
20 #include <array>
21 #include <utility>
22 #include <algorithm>
23 #include <vector>
24 #include <cstdint>
25 #include "dxlibex/config/defines.h"
28 #include "dxlibex/basic_types.hpp"
29 #include "dxlibex/thread.hpp"
30 
31 
32 //----------2Dグラフィック----------//
33 
34 namespace dxle
35 {
37  namespace graph2d
38  {
41  class screen_mutex_c final
42  {
43  public:
44 #ifdef DX_THREAD_SAFE
45  static std::recursive_mutex mtx;
46 #endif
47  };
48 
54  enum class bright_clip_mode : int {
55  LESS,
56  GREATER
57  };
58 
59  //--------------------クラス--------------------//
60 
61  class texture2d /*final*/
62  {
63  public:
66  texture2d(const texture2d& other) = delete;
67  texture2d& operator=(const texture2d& other) = delete;
69  texture2d(texture2d&& other) DXLE_NOEXCEPT_OR_NOTHROW : handle_manager(std::move(other.handle_manager)){}
70  texture2d& operator=(texture2d&& other) DXLE_NOEXCEPT_OR_NOTHROW { handle_manager = (std::move(other.handle_manager)); return *this; }
71 
74  inline void delete_this(bool LogOutFlag = false) { DxLib::DeleteGraph(GetHandle(), LogOutFlag); }
75 
77  inline sizei size()const DXLE_NOEXCEPT_OR_NOTHROW{ return GetGraphSize(); }
78 
80  virtual std::unique_ptr<texture2d> clone()const;
81 
83 
84  public:
85  //生成用コンストラクタ
86 
89  //inline texture2d(int SizeX, int SizeY, bool NotUse3DFlag = false): texture2d(DxLib::MakeGraph(SizeX, SizeY, NotUse3DFlag), NotUse3DFlag){}
90 
93  inline texture2d(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode = DX_MOVIESURFACE_NORMAL) : texture2d(DxLib::LoadBmpToGraph(FileName, TextureFlag, ReverseFlag, SurfaceMode), false){}
96  inline texture2d(const TCHAR *FileName, bool NotUse3DFlag = false) : texture2d(DxLib::LoadGraph(FileName, NotUse3DFlag), NotUse3DFlag){}
97 
98 
99  //生成用static関数
100 
101  // グラフィック作成関係関数
102 
105  static inline texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag = false){ return texture2d(DxLib::MakeGraph(SizeX, SizeY, NotUse3DFlag), NotUse3DFlag); }
108  static inline texture2d MakeGraph(const sizei& size, bool NotUse3DFlag = false){ return texture2d(DxLib::MakeGraph(size.width, size.height, NotUse3DFlag), NotUse3DFlag); }
110  static inline texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d& SrcGraphHandle){ return texture2d(DxLib::DerivationGraph(SrcX, SrcY, Width, Height, SrcGraphHandle.GetHandle()), false); }
112  static inline texture2d DerivationGraph(const pointi& src, const sizei& size, const texture2d& SrcGraphHandle){ return texture2d(DxLib::DerivationGraph(src.x, src.y, size.width, size.height, SrcGraphHandle.GetHandle()), false); }
113 
114  // 画像からグラフィックを作成する関数
115 
118  static inline texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode = DX_MOVIESURFACE_NORMAL){ return texture2d(DxLib::LoadBmpToGraph(FileName, TextureFlag, ReverseFlag, SurfaceMode), false); }
121  static inline texture2d LoadBmpToGraph(const dxle::tstring& FileName, int TextureFlag, int ReverseFlag, int SurfaceMode = DX_MOVIESURFACE_NORMAL){ return texture2d(DxLib::LoadBmpToGraph(FileName.c_str(), TextureFlag, ReverseFlag, SurfaceMode), false); }
124  static inline texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag = false){ return texture2d(DxLib::LoadGraph(FileName, NotUse3DFlag), NotUse3DFlag); }
127  static inline texture2d LoadGraph(const dxle::tstring& FileName, bool NotUse3DFlag = false){ return texture2d(DxLib::LoadGraph(FileName.c_str(), NotUse3DFlag), NotUse3DFlag); }
130  static inline texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag = false){ return texture2d(DxLib::LoadReverseGraph(FileName, NotUse3DFlag), NotUse3DFlag); }
133  static inline texture2d LoadReverseGraph(const dxle::tstring& FileName, bool NotUse3DFlag = false){ return texture2d(DxLib::LoadReverseGraph(FileName.c_str(), NotUse3DFlag), NotUse3DFlag); }
134 
135 
138  static inline texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage = nullptr, int AlphaFileImageSize = 0, bool TextureFlag = true, bool ReverseFlag = false){ return texture2d(DxLib::CreateGraphFromMem(RGBFileImage, RGBFileImageSize, AlphaFileImage, AlphaFileImageSize, TextureFlag, ReverseFlag), false); }
141  static inline int ReCreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, texture2d& GrHandle, const void *AlphaFileImage = nullptr, int AlphaFileImageSize = 0, bool TextureFlag = true, bool ReverseFlag = false){ return DxLib::ReCreateGraphFromMem(RGBFileImage, RGBFileImageSize, GrHandle.GetHandle(), AlphaFileImage, AlphaFileImageSize, TextureFlag, ReverseFlag); }
142 
145  static inline texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag){ return texture2d(DxLib::CreateDXGraph(RgbBaseImage, AlphaBaseImage, TextureFlag), false); }
148  static inline texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag = true, bool ReverseFlag = false){ return texture2d(DxLib::CreateGraphFromGraphImage(RgbBaseImage, TextureFlag, ReverseFlag), false); }
151  static inline texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag = true, bool ReverseFlag = false){ return texture2d(DxLib::CreateGraphFromGraphImage(RgbBaseImage, AlphaBaseImage, TextureFlag, ReverseFlag), false); }
154  static inline int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d& GrHandle, bool TextureFlag = true, bool ReverseFlag = false){ return DxLib::ReCreateGraphFromGraphImage(RgbBaseImage, GrHandle.GetHandle(), TextureFlag, ReverseFlag); }
157  static inline int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d& GrHandle, bool TextureFlag = true, bool ReverseFlag = false){ return DxLib::ReCreateGraphFromGraphImage(RgbBaseImage, AlphaBaseImage, GrHandle.GetHandle(), TextureFlag, ReverseFlag); }
158 
161  static inline texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage = nullptr, const texture2d& GrHandle = texture2d()){ return texture2d(DxLib::CreateGraph(Width, Height, Pitch, RGBImage, AlphaImage, GrHandle.GetHandle()), false); }
164  static inline texture2d CreateGraph(const sizei& size, int Pitch, const void *RGBImage, const void *AlphaImage = nullptr, const texture2d& GrHandle = texture2d()){ return texture2d(DxLib::CreateGraph(size.width, size.height, Pitch, RGBImage, AlphaImage, GrHandle.GetHandle()), false); }
167  static inline int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d& GrHandle, const void *AlphaImage = nullptr){ return DxLib::ReCreateGraph(Width, Height, Pitch, RGBImage, GrHandle.GetHandle(), AlphaImage); }
170  static inline int ReCreateGraph(const sizei& size, int Pitch, const void *RGBImage, texture2d& GrHandle, const void *AlphaImage = nullptr){ return DxLib::ReCreateGraph(size.width, size.height, Pitch, RGBImage, GrHandle.GetHandle(), AlphaImage); }
171 #ifndef DX_NON_SOFTIMAGE
172  //extern int CreateBlendGraphFromSoftImage(int SIHandle); // ソフトウエアで扱うイメージからブレンド用画像グラフィックハンドルを作成する( -1:エラー -1以外:ブレンド用グラフィックハンドル )
173  //extern int CreateGraphFromSoftImage(int SIHandle); // ソフトウエアで扱うイメージからグラフィックハンドルを作成する( -1:エラー -1以外:グラフィックハンドル )
174  //extern int CreateGraphFromRectSoftImage(int SIHandle, int x, int y, int SizeX, int SizeY); // ソフトウエアで扱うイメージの指定の領域を使ってグラフィックハンドルを作成する( -1:エラー -1以外:グラフィックハンドル )
175  //extern int ReCreateGraphFromSoftImage(int SIHandle, int GrHandle); // ソフトウエアで扱うイメージから既存のグラフィックハンドルに画像データを転送する
176  //extern int ReCreateGraphFromRectSoftImage(int SIHandle, int x, int y, int SizeX, int SizeY, int GrHandle); // ソフトウエアで扱うイメージから既存のグラフィックハンドルに画像データを転送する
177  //extern int CreateDivGraphFromSoftImage(int SIHandle, int AllNum, int XNum, int YNum, int SizeX, int SizeY, int *HandleBuf); // ソフトウエアで扱うイメージから分割グラフィックハンドルを作成する
178 #endif // DX_NON_SOFTIMAGE
179  static inline texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage){ return texture2d(DxLib::CreateGraphFromBaseImage(BaseImage), false); }
184  static inline texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY){ return texture2d(DxLib::CreateGraphFromRectBaseImage(BaseImage, x, y, SizeX, SizeY), false); }
186  static inline texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi& pos, const sizei& size){ return texture2d(DxLib::CreateGraphFromRectBaseImage(BaseImage, pos.x, pos.y, size.width, size.height), false); }
188  static inline int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d& GrHandle){ return DxLib::ReCreateGraphFromBaseImage(BaseImage, GrHandle.GetHandle()); }
190  static inline int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d& GrHandle){ return DxLib::ReCreateGraphFromRectBaseImage(BaseImage, x, y, SizeX, SizeY, GrHandle.GetHandle()); }
192  static inline int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi& pos, const sizei& size, texture2d& GrHandle){ return DxLib::ReCreateGraphFromRectBaseImage(BaseImage, pos.x, pos.y, size.width, size.height, GrHandle.GetHandle()); }
194  static inline int ReloadGraph(const TCHAR *FileName, texture2d& GrHandle, bool ReverseFlag = false){ return DxLib::ReloadGraph(FileName, GrHandle.GetHandle(), ReverseFlag); }
196  static inline int ReloadGraph(const dxle::tstring& FileName, texture2d& GrHandle, bool ReverseFlag = false){ return DxLib::ReloadGraph(FileName.c_str(), GrHandle.GetHandle(), ReverseFlag); }
198  static inline int ReloadReverseGraph(const TCHAR *FileName, texture2d& GrHandle){ return DxLib::ReloadReverseGraph(FileName, GrHandle.GetHandle()); }
200  static inline int ReloadReverseGraph(const dxle::tstring& FileName, texture2d& GrHandle){ return DxLib::ReloadReverseGraph(FileName.c_str(), GrHandle.GetHandle()); }
201 
202 
203  //メンバ関数
204 
205  inline texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height)const { return texture2d(DxLib::DerivationGraph(SrcX, SrcY, Width, Height, GetHandle()), false); }
207  inline texture2d DerivationGraph(const pointi& src, const sizei& size)const { return texture2d(DxLib::DerivationGraph(src.x, src.y, size.width, size.height, GetHandle()), false); }
208 
209 
211  //inline const unsigned int* GetFullColorImage()const { return DxLib::GetFullColorImage(GetHandle()); }
212 
214  inline int GraphLock(int *PitchBuf, void **DataPointBuf, DxLib::COLORDATA **ColorDataPP = nullptr, bool WriteOnly = false){ return DxLib::GraphLock(GetHandle(), PitchBuf, DataPointBuf, ColorDataPP, WriteOnly); }
216  inline int GraphUnLock(){ return DxLib::GraphUnLock(GetHandle()); }
218  inline int SetDeviceLostDeleteGraphFlag(bool DeleteFlag){ return DxLib::SetDeviceLostDeleteGraphFlag(GetHandle(), DeleteFlag); }
220  inline int GetGraphSize(int *SizeXBuf, int *SizeYBuf)const { return DxLib::GetGraphSize(GetHandle(), SizeXBuf, SizeYBuf); }
222  inline sizei GetGraphSize()const { int x, y; GetGraphSize(&x, &y); return{ x, y }; }
224  inline int GetGraphTextureSize(int *SizeXBuf, int *SizeYBuf)const { return DxLib::GetGraphTextureSize(GetHandle(), SizeXBuf, SizeYBuf); }
226  inline sizei GetGraphTextureSize()const { int x, y; GetGraphTextureSize(&x, &y); return{ x, y }; }
228  inline int GetGraphMipmapCount()const { return DxLib::GetGraphMipmapCount(GetHandle()); }
230  inline int GetGraphFilePath(TCHAR FilePathBuffer[])const { return DxLib::GetGraphFilePath(GetHandle(), FilePathBuffer); }
232  inline tstring GetGraphFilePath()const;
233 
235  inline int DrawGraph(int x, int y, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawGraph(x, y, GetHandle(), TransFlag); }
237  inline int DrawGraph(const pointi& p, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawGraph(p.x, p.y, GetHandle(), TransFlag); }
239  inline int DrawExtendGraph(int x1, int y1, int x2, int y2, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraph(x1, y1, x2, y2, GetHandle(), TransFlag); }
241  inline int DrawExtendGraph(const pointi& lu, const pointi& rb, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraph(lu.x, lu.y, rb.x, rb.y, GetHandle(), TransFlag); }
243  inline int DrawRotaGraph(int x, int y, double ExRate, double Angle, bool TransFlag, bool TurnFlag = false)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph(x, y, ExRate, Angle, GetHandle(), TransFlag, TurnFlag); }
245  inline int DrawRotaGraph(const pointi& p, double ExRate, double Angle, bool TransFlag, bool TurnFlag = false)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph(p.x, p.y, ExRate, Angle, GetHandle(), TransFlag, TurnFlag); }
247  inline int DrawRotaGraph2(int x, int y, int cx, int cy, double ExtRate, double Angle, bool TransFlag, bool TurnFlag = false)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph2(x, y, cx, cy, ExtRate, Angle, GetHandle(), TransFlag, TurnFlag); }
249  inline int DrawRotaGraph2(const pointi& p, const pointi& c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag = false)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph2(p.x, p.y, c.x, c.y, ExtRate, Angle, GetHandle(), TransFlag, TurnFlag); }
251  inline int DrawRotaGraph3(int x, int y, int cx, int cy, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph3(x, y, cx, cy, ExtRateX, ExtRateY, Angle, GetHandle(), TransFlag, TurnFlag); }
253  inline int DrawRotaGraph3(const pointi& p, const pointi& c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph3(p.x, p.y, c.x, c.y, ExtRateX, ExtRateY, Angle, GetHandle(), TransFlag, TurnFlag); }
255  inline int DrawModiGraph(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawModiGraph(x1, y1, x2, y2, x3, y3, x4, y4, GetHandle(), TransFlag); }
257  inline int DrawModiGraph(const std::array<pointi, 4>& ps, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawModiGraph(ps[0].x, ps[0].y, ps[1].x, ps[1].y, ps[2].x, ps[2].y, ps[3].x, ps[3].y, GetHandle(), TransFlag); }
259  inline int DrawTurnGraph(int x, int y, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawTurnGraph(x, y, GetHandle(), TransFlag); }
261  inline int DrawTurnGraph(const pointi& p, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawTurnGraph(p.x, p.y, GetHandle(), TransFlag); }
263  inline int DrawExtendTurnGraph(int x1, int y1, int x2, int y2, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraph(x2, y1, x1, y2, GetHandle(), TransFlag); }//x1とx2はこれで正しい
265  inline int DrawExtendTurnGraph(const pointi& lu, const pointi& rb, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraph(rb.x, lu.y, lu.x, rb.y, GetHandle(), TransFlag); }//lu.xとrb.xはこれで正しい
266 
268  inline int DrawGraphF(float xf, float yf, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawGraphF(xf, yf, GetHandle(), TransFlag); }
270  inline int DrawGraphF(const pointf& p, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawGraphF(p.x, p.y, GetHandle(), TransFlag); }
272  inline int DrawExtendGraphF(float x1f, float y1f, float x2f, float y2, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraphF(x1f, y1f, x2f, y2, GetHandle(), TransFlag); }
274  inline int DrawExtendGraphF(const pointf& lu, const pointf& rb, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraphF(lu.x, lu.y, rb.x, rb.y, GetHandle(), TransFlag); }
276  inline int DrawRotaGraphF(float xf, float yf, double ExRate, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraphF(xf, yf, ExRate, Angle, GetHandle(), TransFlag, TurnFlag); }
278  inline int DrawRotaGraphF(const pointf& p, double ExRate, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraphF(p.x, p.y, ExRate, Angle, GetHandle(), TransFlag, TurnFlag); }
280  inline int DrawRotaGraph2F(float xf, float yf, float cxf, float cyf, double ExtRate, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph2F(xf, yf, cxf, cyf, ExtRate, Angle, GetHandle(), TransFlag, TurnFlag); }
282  inline int DrawRotaGraph2F(const pointf& p, const pointf& c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph2F(p.x, p.y, c.x, c.y, ExtRate, Angle, GetHandle(), TransFlag, TurnFlag); }
284  inline int DrawRotaGraph3F(float xf, float yf, float cxf, float cyf, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph3F(xf, yf, cxf, cyf, ExtRateX, ExtRateY, Angle, GetHandle(), TransFlag, TurnFlag); }
286  inline int DrawRotaGraph3F(const pointf& p, const pointf& c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag = FALSE)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawRotaGraph3F(p.x, p.y, c.x, c.y, ExtRateX, ExtRateY, Angle, GetHandle(), TransFlag, TurnFlag); }
288  inline int DrawModiGraphF(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawModiGraphF(x1, y1, x2, y2, x3, y3, x4, y4, GetHandle(), TransFlag); }
290  inline int DrawModiGraphF(const std::array<pointf, 4>& ps, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawModiGraphF(ps[0].x, ps[0].y, ps[1].x, ps[1].y, ps[2].x, ps[2].y, ps[3].x, ps[3].y, GetHandle(), TransFlag); }
292  inline int DrawTurnGraphF(float xf, float yf, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawTurnGraphF(xf, yf, GetHandle(), TransFlag); }
294  inline int DrawTurnGraphF(const pointf& p, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawTurnGraphF(p.x, p.y, GetHandle(), TransFlag); }
296  inline int DrawExtendTurnGraphF(float x1f, float y1f, float x2f, float y2f, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraphF(x2f, y1f, x1f, y2f, GetHandle(), TransFlag); }//x1fとx2fはこれで正しい
298  inline int DrawExtendTurnGraphF(const pointf& lu, const pointf& rb, bool TransFlag)const { DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::DrawExtendGraphF(rb.x, lu.y, lu.x, rb.y, GetHandle(), TransFlag); }//x1fとx2fはこれで正しい
299 
300  int filter_mono (int16_t Cb, int16_t Cr);
301  int filter_gaussian (uint16_t PixelWidth, int Param);
302  int filter_down_scale (uint8_t DivNum);
303  int filter_bright_clip (bright_clip_mode clipmode, uint8_t clip_pram, unsigned int fillcolor, uint8_t fillalpha);
304  int filter_HSB (bool HueType, int16_t Hue, int Saturation, int16_t Bright);
305  int filter_invert ();
306  int filter_level (uint8_t min, uint8_t max, int Gamma, uint8_t Aftermin, uint8_t Aftermax);
307  int filter_two_color (uint8_t threshold, unsigned int LowColor, uint8_t LowAlpha, unsigned int HighColor, uint8_t HighAlpha);
308 
309 
310  private:
311  texture2d(int handle, bool NotUse3DFlag)
312  : texture2d(gr_impl::simple_graph_handle_manager::get_unique(handle, NotUse3DFlag))
313  {}
314  texture2d(std::unique_ptr<gr_impl::texture2d_handle_manager>&& handle_manager_)
315  : handle_manager(std::move(handle_manager_))
316  {}
317  std::unique_ptr<gr_impl::texture2d_handle_manager> handle_manager;
318 
319  int GetHandle()const{ if (!handle_manager){ return -1; } return handle_manager->get_handle(); }
320 
321  //ユーザーが継承するのを防止するためprotectedではなくfriendを使う
322 
323  friend screen;
324  friend animation_graph;
325 
326  //実装用
327 
328  template<typename BuffT, typename OutFunc>
329  friend void gr_impl::LoadDivGraph_impl(OutFunc&& out_func, BuffT* HandleBuf, const TCHAR *FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag);
331  };
332 
334  class screen final : public texture2d
335  {
336  public:
338  std::unique_ptr<texture2d> clone()const override{ return cloneSc(); }
340  std::unique_ptr<screen> cloneSc()const;
341 
342  //生成用static関数
343 
345  static inline screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel = false)DXLE_NOEXCEPT_OR_NOTHROW{ return screen(DxLib::MakeScreen(SizeX, SizeY, UseAlphaChannel), UseAlphaChannel); }
347  static inline screen MakeScreen(const sizei& size, bool UseAlphaChannel = false)DXLE_NOEXCEPT_OR_NOTHROW{ return screen(DxLib::MakeScreen(size.width, size.height, UseAlphaChannel), UseAlphaChannel); }
348 
349  //メンバ関数
350 
351  template<typename Func_T>
352  screen& draw_on_this(Func_T&& draw_func);
353 
357  inline int SetUseGraphZBuffer(bool UseFlag, int BitDepth = -1)DXLE_NOEXCEPT_OR_NOTHROW{ return DxLib::SetUseGraphZBuffer(GetHandle(), UseFlag, BitDepth); }
361  inline int CopyGraphZBufferImage(screen& ToGraph)const DXLE_NOEXCEPT_OR_NOTHROW{ return DxLib::CopyGraphZBufferImage(GetHandle(), ToGraph.GetHandle()); }
369  inline int BltDrawValidGraph(int x1, int y1, int x2, int y2, int DestX, int DestY, texture2d& DestGrHandle)const DXLE_NOEXCEPT_OR_NOTHROW{ return DxLib::BltDrawValidGraph(GetHandle(), x1, y1, x2, y2, DestX, DestY, DestGrHandle.GetHandle()); }
375  inline int BltDrawValidGraph(const pointi& lu, const pointi& rb, const pointi& dest, texture2d& DestGrHandle)const DXLE_NOEXCEPT_OR_NOTHROW{ return DxLib::BltDrawValidGraph(GetHandle(), rb.x, lu.y, lu.x, rb.y, dest.x, dest.y, DestGrHandle.GetHandle()); }
377  inline int SetDrawScreen()const DXLE_NOEXCEPT_OR_NOTHROW_SINGLE{ DXLE_GET_LOCK(screen_mutex_c::mtx); return DxLib::SetDrawScreen(GetHandle()); }
378 
379  public:
382  screen(const screen& other) = delete;
386  screen& operator=(const screen& other) = delete;
388  screen& operator=(screen&& other) DXLE_NOEXCEPT_OR_NOTHROW{ texture2d::operator=(std::move(other)); return *this; }
389 
390  protected:
391  screen(int handle, bool UseAlphaChannel)
392  : texture2d(gr_impl::screen_handle_manager::get_unique(handle, UseAlphaChannel))
393  {}
394  };
395  class shared_texture2d final
396  {
397  public:
399  template<typename texture2d_t> shared_texture2d(const texture2d_t& unique_tex) = delete;
400  template<typename texture2d_t, enable_if_t<std::is_base_of<texture2d, texture2d_t>::value, nullptr_t> = nullptr>
401  shared_texture2d(texture2d_t&& unique_tex)
402  : impl(std::make_shared<texture2d_t>(std::forward<texture2d_t>(unique_tex)))
403  {}
404 
406  shared_texture2d& operator=(const shared_texture2d& other)DXLE_NOEXCEPT_OR_NOTHROW { impl = (other.impl); return *this; }
407  shared_texture2d(shared_texture2d&& other) DXLE_NOEXCEPT_OR_NOTHROW : impl(std::move(other.impl)){}
408  shared_texture2d& operator=(shared_texture2d&& other) DXLE_NOEXCEPT_OR_NOTHROW{ impl = (std::move(other.impl)); return *this; }
409 
410 #if 1
411  texture2d& get()DXLE_NOEXCEPT_OR_NOTHROW{ return *impl; }
412  const texture2d& get()const DXLE_NOEXCEPT_OR_NOTHROW{ return *impl; }
413  operator texture2d&()DXLE_NOEXCEPT_OR_NOTHROW{ return *impl; }
414  operator const texture2d&()const DXLE_NOEXCEPT_OR_NOTHROW{ return *impl; }
415 #else
416  texture2d* operator->()DXLE_NOEXCEPT_OR_NOTHROW{ return impl.get(); }
417  const texture2d* operator->()const DXLE_NOEXCEPT_OR_NOTHROW{ return impl.get(); }
418  texture2d& operator*()DXLE_NOEXCEPT_OR_NOTHROW{ return impl.get(); }
419  const texture2d& operator*()const DXLE_NOEXCEPT_OR_NOTHROW{ return impl.get(); }
420 #endif
421 
422  private:
423  std::shared_ptr<texture2d> impl;
424  };
425 
427  template<size_t N>
432  class static_derivative_texture2d final
433  {
434  private:
435  std::array<texture2d, N> textures;
436  using cont_type = decltype(textures);
437  public:
438 
442  static_derivative_texture2d& operator=(const static_derivative_texture2d&) = delete;
444 
445  //----------生成関数----------//
446 
447  static_derivative_texture2d(const TCHAR *FileName, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
448  static_derivative_texture2d(const tstring& FileName, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
449 
450  void load(const TCHAR *FileName, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
451  void load(const tstring& FileName, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
452 
453  //----------utility----------//
454 
455  void delete_all();
456 
457  //----------コンテナ部----------//
458 
459  using reference = typename cont_type::reference;
460  using const_reference = typename cont_type::const_reference;
461  using iterator = typename cont_type::iterator;
462  using const_iterator = typename cont_type::const_iterator;
463  using reverse_iterator = typename cont_type::reverse_iterator;
464  using const_reverse_iterator = typename cont_type::const_reverse_iterator;
465  using size_type = typename cont_type::size_type;
466  using difference_type = typename cont_type::difference_type;
467  using pointer = typename cont_type::pointer;
468  using const_pointer = typename cont_type::const_pointer;
469  using value_type = typename cont_type::value_type;
470 
471  reference at(size_t index) { return textures.at(index); }
472  const_reference at(size_t index)const{ return textures.at(index); }
473  reference operator[](size_t index) { return textures[index]; }
474  const_reference operator[](size_t index)const{ return textures[index]; }
475  reference front() { return textures.front(); }
476  const_reference front()const{ return textures.front(); }
477  reference back() { return textures.back(); }
478  const_reference back()const{ return textures.back(); }
479  pointer data() DXLE_NOEXCEPT_OR_NOTHROW{ return textures.data(); }
480  const_pointer data()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.data(); }
481 
482  iterator begin () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.begin (); }
483  const_iterator begin ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.begin (); }
484  iterator end () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.end (); }
485  const_iterator end ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.end (); }
486  const_iterator cbegin()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.cbegin(); }
487  const_iterator cend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.cend (); }
488  reverse_iterator rbegin () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rbegin (); }
489  const_reverse_iterator rbegin ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rbegin (); }
490  reverse_iterator rend () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rend (); }
491  const_reverse_iterator rend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rend (); }
492  const_reverse_iterator crbegin()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.crbegin(); }
493  const_reverse_iterator crend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.crend (); }
494 
495  DXLE_CONSTEXPR bool empty()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.empty(); }
496  DXLE_CONSTEXPR size_type size()const DXLE_NOEXCEPT_OR_NOTHROW { return textures.size(); }
497  DXLE_CONSTEXPR size_type max_size()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.max_size(); }
498 
499  void swap(static_derivative_texture2d& other){ textures.swap(other.textures); }
500  };
505  {
506  private:
507  std::vector<texture2d> textures;
508  using cont_type = decltype(textures);
509  public:
510 
513  derivative_texture2d(derivative_texture2d&&)DXLE_NOEXCEPT_IF((std::is_nothrow_move_constructible<cont_type>::value));
515  derivative_texture2d& operator=(derivative_texture2d&&)DXLE_NOEXCEPT_IF((std::is_nothrow_move_assignable<cont_type>::value));
516 
517  //----------生成関数----------//
518 
519  derivative_texture2d(const TCHAR *FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
520  derivative_texture2d(const tstring& FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
521 
522  void load(const TCHAR *FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
523  void load(const tstring& FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
524 
525  static inline derivative_texture2d LoadDivGraph(const TCHAR *FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
526  static inline derivative_texture2d LoadDivGraph(const tstring& FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
527 
528  //----------utility----------//
529 
530  void delete_all();
531 
532  //----------コンテナ部----------//
533 
534  using reference = cont_type::reference;
535  using const_reference = cont_type::const_reference;
536  using iterator = cont_type::iterator;
537  using const_iterator = cont_type::const_iterator;
538  using reverse_iterator = cont_type::reverse_iterator;
540  using size_type = cont_type::size_type;
541  using difference_type = cont_type::difference_type;
542  using pointer = cont_type::pointer;
543  using const_pointer = cont_type::const_pointer;
544  using value_type = cont_type::value_type;
545 
546  reference at(size_t index) { return textures.at(index); }
547  const_reference at(size_t index)const{ return textures.at(index); }
548  reference operator[](size_t index) { return textures[index]; }
549  const_reference operator[](size_t index)const{ return textures[index]; }
550  reference front() { return textures.front(); }
551  const_reference front()const{ return textures.front(); }
552  reference back() { return textures.back(); }
553  const_reference back()const{ return textures.back(); }
554  pointer data() DXLE_NOEXCEPT_OR_NOTHROW{ return textures.data(); }
555  const_pointer data()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.data(); }
556 
557  iterator begin () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.begin (); }
558  const_iterator begin ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.begin (); }
559  iterator end () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.end (); }
560  const_iterator end ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.end (); }
561  const_iterator cbegin()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.cbegin(); }
562  const_iterator cend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.cend (); }
563  reverse_iterator rbegin () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rbegin (); }
564  const_reverse_iterator rbegin ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rbegin (); }
565  reverse_iterator rend () DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rend (); }
566  const_reverse_iterator rend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.rend (); }
567  const_reverse_iterator crbegin()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.crbegin(); }
568  const_reverse_iterator crend ()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.crend (); }
569 
570  bool empty()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.empty(); }
571  size_type size()const DXLE_NOEXCEPT_OR_NOTHROW { return textures.size(); }
572  size_type max_size()const DXLE_NOEXCEPT_OR_NOTHROW{ return textures.max_size(); }
573 
574  void swap(derivative_texture2d& other){ textures.swap(other.textures); }
575  };
576 
577 
578  //--------------------生成用関数--------------------//
579 
580  // グラフィック作成関係関数
581 
583  inline texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::MakeGraph(SizeX, SizeY, NotUse3DFlag); }
585  inline texture2d MakeGraph(const sizei& size, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::MakeGraph(size.width, size.height, NotUse3DFlag); }
587  inline screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel = false)DXLE_NOEXCEPT_OR_NOTHROW { return screen::MakeScreen(SizeX, SizeY, UseAlphaChannel); }
589  inline screen MakeScreen(const sizei& size, bool UseAlphaChannel = false)DXLE_NOEXCEPT_OR_NOTHROW { return screen::MakeScreen(size.width, size.height, UseAlphaChannel); }
591  inline texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d& SrcGraphHandle)DXLE_NOEXCEPT_OR_NOTHROW{ return texture2d::DerivationGraph(SrcX, SrcY, Width, Height, SrcGraphHandle); }
593  inline texture2d DerivationGraph(const pointi& src, const sizei& size, const texture2d& SrcGraphHandle)DXLE_NOEXCEPT_OR_NOTHROW{ return texture2d::DerivationGraph(src.x, src.y, size.width, size.height, SrcGraphHandle); }
594 
595  // 画像からグラフィックを作成する関数
596 
598  inline texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode = DX_MOVIESURFACE_NORMAL)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadBmpToGraph(FileName, TextureFlag, ReverseFlag, SurfaceMode); }
600  inline texture2d LoadBmpToGraph(const tstring& FileName, int TextureFlag, int ReverseFlag, int SurfaceMode = DX_MOVIESURFACE_NORMAL)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadBmpToGraph(FileName.c_str(), TextureFlag, ReverseFlag, SurfaceMode); }
602  inline texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadGraph(FileName, NotUse3DFlag); }
604  inline texture2d LoadGraph(const tstring& FileName, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadGraph(FileName.c_str(), NotUse3DFlag); }
606  inline texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadReverseGraph(FileName, NotUse3DFlag); }
608  inline texture2d LoadReverseGraph(const tstring& FileName, bool NotUse3DFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::LoadReverseGraph(FileName.c_str(), NotUse3DFlag); }
609 
611  inline derivative_texture2d LoadDivGraph(const TCHAR *FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
613  inline derivative_texture2d LoadDivGraph(const tstring& FileName, int AllNum, const dxle::sizei& Num, const dxle::sizei& Size, bool NotUse3DFlag = false);
614 
616  inline texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage = nullptr, int AlphaFileImageSize = 0, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromMem(RGBFileImage, RGBFileImageSize, AlphaFileImage, AlphaFileImageSize, TextureFlag, ReverseFlag); }
618  inline int ReCreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, texture2d& GrHandle, const void *AlphaFileImage = nullptr, int AlphaFileImageSize = 0, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromMem(RGBFileImage, RGBFileImageSize, GrHandle, AlphaFileImage, AlphaFileImageSize, TextureFlag, ReverseFlag); }
619 
621  inline texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateDXGraph(RgbBaseImage, AlphaBaseImage, TextureFlag); }
623  inline texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromGraphImage(RgbBaseImage, TextureFlag, ReverseFlag); }
625  inline texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromGraphImage(RgbBaseImage, AlphaBaseImage, TextureFlag, ReverseFlag); }
627  inline int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d& GrHandle, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromGraphImage(RgbBaseImage, GrHandle, TextureFlag, ReverseFlag); }
629  inline int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d& GrHandle, bool TextureFlag = true, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromGraphImage(RgbBaseImage, AlphaBaseImage, GrHandle, TextureFlag, ReverseFlag); }
630 
632  inline texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage = nullptr, const texture2d& GrHandle = texture2d())DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraph(Width, Height, Pitch, RGBImage, AlphaImage, GrHandle); }
634  inline texture2d CreateGraph(const sizei& size, int Pitch, const void *RGBImage, const void *AlphaImage = nullptr, const texture2d& GrHandle = texture2d())DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraph(size.width, size.height, Pitch, RGBImage, AlphaImage, GrHandle); }
636  inline int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d& GrHandle, const void *AlphaImage = nullptr)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraph(Width, Height, Pitch, RGBImage, GrHandle, AlphaImage); }
638  inline int ReCreateGraph(const sizei& size, int Pitch, const void *RGBImage, texture2d& GrHandle, const void *AlphaImage = nullptr)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraph(size.width, size.height, Pitch, RGBImage, GrHandle, AlphaImage); }
639 #ifndef DX_NON_SOFTIMAGE
640 #endif // DX_NON_SOFTIMAGE
641  inline texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromBaseImage(BaseImage); }
644  inline texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromRectBaseImage(BaseImage, x, y, SizeX, SizeY); }
646  inline texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi& p, const sizei& size)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::CreateGraphFromRectBaseImage(BaseImage, p.x, p.y, size.width, size.height); }
648  inline int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d& GrHandle)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromBaseImage(BaseImage, GrHandle); }
650  inline int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d& GrHandle)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromRectBaseImage(BaseImage, x, y, SizeX, SizeY, GrHandle); }
652  inline int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi& p, const sizei& size, texture2d& GrHandle)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReCreateGraphFromRectBaseImage(BaseImage, p.x, p.y, size.width, size.height, GrHandle); }
654  inline int ReloadGraph(const TCHAR *FileName, texture2d& GrHandle, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReloadGraph(FileName, GrHandle, ReverseFlag); }
656  inline int ReloadGraph(const tstring& FileName, texture2d& GrHandle, bool ReverseFlag = false)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReloadGraph(FileName.c_str(), GrHandle, ReverseFlag); }
658  inline int ReloadReverseGraph(const TCHAR *FileName, texture2d& GrHandle)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReloadReverseGraph(FileName, GrHandle); }
660  inline int ReloadReverseGraph(const tstring& FileName, texture2d& GrHandle)DXLE_NOEXCEPT_OR_NOTHROW { return texture2d::ReloadReverseGraph(FileName.c_str(), GrHandle); }
661 
662 
663  }
664  using namespace graph2d;
665 }
666 
667 #include "texture2d/texture2d.hpp"
668 #endif
cont_type::size_type size_type
Definition: texture2d.hpp:540
texture2d LoadGraph(const tstring &FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
Definition: texture2d.hpp:604
int ReloadGraph(const tstring &FileName, texture2d &GrHandle, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックへ画像データを転送する
Definition: texture2d.hpp:656
DXLE_CONSTEXPR bool empty() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:495
Template class for 2D sizes specified by its coordinates width and height.
Definition: point2d.hpp:36
texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
Definition: texture2d.hpp:642
derivative_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:511
int DrawRotaGraph3(int x, int y, int cx, int cy, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )
Definition: texture2d.hpp:251
static int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:154
size_type size() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:571
reverse_iterator rbegin() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:488
static screen MakeScreen(const sizei &size, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
Definition: texture2d.hpp:347
int SetDrawScreen() const DXLE_NOEXCEPT_OR_NOTHROW_SINGLE
描画先画面を設定する
Definition: texture2d.hpp:377
std::basic_string< TCHAR > tstring
Definition: tchar.hpp:27
iterator end() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:484
const_iterator end() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:485
int DrawExtendTurnGraph(int x1, int y1, int x2, int y2, bool TransFlag) const
画像の拡大左右反転描画
Definition: texture2d.hpp:263
#define DXLE_CONSTEXPR
Definition: suffix.hpp:21
int DrawExtendGraphF(const pointf &lu, const pointf &rb, bool TransFlag) const
画像の拡大描画( 座標指定が float 版 )
Definition: texture2d.hpp:274
int ReloadGraph(const TCHAR *FileName, texture2d &GrHandle, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックへ画像データを転送する
Definition: texture2d.hpp:654
void delete_this(bool LogOutFlag=false)
Definition: texture2d.hpp:74
static int ReloadReverseGraph(const dxle::tstring &FileName, texture2d &GrHandle)
ReloadGraph の画像反転処理追加版
Definition: texture2d.hpp:200
typename cont_type::const_reference const_reference
Definition: texture2d.hpp:460
texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
Definition: texture2d.hpp:623
const_pointer data() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:480
int DrawRotaGraph2(const pointi &p, const pointi &c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画2( 回転中心指定付き )
Definition: texture2d.hpp:249
texture2d LoadBmpToGraph(const tstring &FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
Definition: texture2d.hpp:600
static int ReCreateGraph(const sizei &size, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr)
Definition: texture2d.hpp:170
static texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag=false)
Definition: texture2d.hpp:105
int GetGraphTextureSize(int *SizeXBuf, int *SizeYBuf) const
グラフィックが持つ一つ目のテクスチャのサイズを得る
Definition: texture2d.hpp:224
const_reference operator[](size_t index) const
Definition: texture2d.hpp:549
shared_texture2d(shared_texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:407
int ReloadReverseGraph(const tstring &FileName, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
ReloadGraph の画像反転処理追加版
Definition: texture2d.hpp:660
DXLE_CONSTEXPR size_type max_size() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:497
int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを再作成する
Definition: texture2d.hpp:636
texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
Definition: texture2d.hpp:625
int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックにデータを転送する
Definition: texture2d.hpp:627
const_reverse_iterator rbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:489
int GetGraphSize(int *SizeXBuf, int *SizeYBuf) const
グラフィックのサイズを得る
Definition: texture2d.hpp:220
cont_type::const_reverse_iterator const_reverse_iterator
Definition: texture2d.hpp:539
const_iterator begin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:483
static texture2d LoadGraph(const dxle::tstring &FileName, bool NotUse3DFlag=false)
Definition: texture2d.hpp:127
static texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:148
int GraphUnLock()
グラフィックメモリ領域のロック解除
Definition: texture2d.hpp:216
int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:650
cont_type::reference reference
Definition: texture2d.hpp:534
cont_type::const_reference const_reference
Definition: texture2d.hpp:535
reference at(size_t index)
Definition: texture2d.hpp:546
texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
指定サイズのグラフィックを作成する
Definition: texture2d.hpp:583
int DrawExtendTurnGraph(const pointi &lu, const pointi &rb, bool TransFlag) const
画像の拡大左右反転描画
Definition: texture2d.hpp:265
typename cont_type::difference_type difference_type
Definition: texture2d.hpp:466
screen(int handle, bool UseAlphaChannel)
Definition: texture2d.hpp:391
const_reverse_iterator crend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:493
texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d()) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを作成する
Definition: texture2d.hpp:632
int ReloadReverseGraph(const TCHAR *FileName, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
ReloadGraph の画像反転処理追加版
Definition: texture2d.hpp:658
virtual ~texture2d() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:82
bool empty() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:570
sizei GetGraphSize() const
グラフィックのサイズを得る
Definition: texture2d.hpp:222
static texture2d LoadBmpToGraph(const dxle::tstring &FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
Definition: texture2d.hpp:121
int SetUseGraphZBuffer(bool UseFlag, int BitDepth=-1) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:357
iterator begin() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:482
int DrawModiGraph(const std::array< pointi, 4 > &ps, bool TransFlag) const
画像の自由変形描画
Definition: texture2d.hpp:257
typename cont_type::pointer pointer
Definition: texture2d.hpp:467
int SetDeviceLostDeleteGraphFlag(bool DeleteFlag)
グラフィックスデバイスのデバイスロスト発生時に指定のグラフィックを削除するかどうかを設定する( TRUE:デ...
Definition: texture2d.hpp:218
int ReCreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, texture2d &GrHandle, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上の画像イメージから既存のグラフィックにデータを転送する
Definition: texture2d.hpp:618
texture2d LoadReverseGraph(const tstring &FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルを反転したものでグラフィックを作成する
Definition: texture2d.hpp:608
const_iterator cbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:486
reverse_iterator rend() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:490
int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &p, const sizei &size, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:652
screen & operator=(screen &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
Definition: texture2d.hpp:388
int DrawRotaGraphF(const pointf &p, double ExRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画( 座標指定が float 版 )
Definition: texture2d.hpp:278
int DrawRotaGraph2(int x, int y, int cx, int cy, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画2( 回転中心指定付き )
Definition: texture2d.hpp:247
texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d &SrcGraphHandle) DXLE_NOEXCEPT_OR_NOTHROW
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
Definition: texture2d.hpp:591
derivative_texture2d LoadDivGraph(const TCHAR *FileName, int AllNum, const dxle::sizei &Num, const dxle::sizei &Size, bool NotUse3DFlag)
画像ファイルを分割してグラフィックハンドルを作成する
Definition: texture2d.hpp:238
#define DXLE_NOEXCEPT_OR_NOTHROW_SINGLE
Definition: thread.hpp:27
texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルを反転したものでグラフィックを作成する
Definition: texture2d.hpp:606
static int ReCreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, texture2d &GrHandle, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:141
int DrawGraph(const pointi &p, bool TransFlag) const
画像の等倍描画
Definition: texture2d.hpp:237
const_reference operator[](size_t index) const
Definition: texture2d.hpp:474
cont_type::const_iterator const_iterator
Definition: texture2d.hpp:537
texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使ってグラフィックを作成する
Definition: texture2d.hpp:644
int DrawExtendTurnGraphF(float x1f, float y1f, float x2f, float y2f, bool TransFlag) const
画像の拡大左右反転描画( 座標指定が float 版 )
Definition: texture2d.hpp:296
value_type y
Definition: point2d.hpp:109
derivative_texture2d(derivative_texture2d &&) DXLE_NOEXCEPT_IF((std derivative_texture2d & operator=(const derivative_texture2d &)=delete
Definition: texture2d.hpp:514
static texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag=false)
Definition: texture2d.hpp:124
cont_type::const_pointer const_pointer
Definition: texture2d.hpp:543
int GetGraphFilePath(TCHAR FilePathBuffer[]) const
グラフィックが画像ファイルから読み込まれていた場合、その画像のファイルパスを取得する ...
Definition: texture2d.hpp:230
cont_type::value_type value_type
Definition: texture2d.hpp:544
texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからサイズを割り出し、それに合ったグラフィックを作成する
Definition: texture2d.hpp:621
void swap(static_derivative_texture2d &other)
Definition: texture2d.hpp:499
static texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d())
Definition: texture2d.hpp:161
static int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr)
Definition: texture2d.hpp:167
int BltDrawValidGraph(int x1, int y1, int x2, int y2, int DestX, int DestY, texture2d &DestGrHandle) const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:369
typename cont_type::size_type size_type
Definition: texture2d.hpp:465
static texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
Definition: texture2d.hpp:118
static int ReloadReverseGraph(const TCHAR *FileName, texture2d &GrHandle)
ReloadGraph の画像反転処理追加版
Definition: texture2d.hpp:198
int DrawModiGraphF(const std::array< pointf, 4 > &ps, bool TransFlag) const
画像の自由変形描画( 座標指定が float 版 )
Definition: texture2d.hpp:290
int DrawTurnGraphF(float xf, float yf, bool TransFlag) const
画像の左右反転描画( 座標指定が float 版 )
Definition: texture2d.hpp:292
cont_type::reverse_iterator reverse_iterator
Definition: texture2d.hpp:538
Definition: point2d.hpp:672
const_reference back() const
Definition: texture2d.hpp:553
static texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d &SrcGraphHandle)
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
Definition: texture2d.hpp:110
Definition: cast_if.hpp:12
const_reverse_iterator crbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:567
int DrawTurnGraph(int x, int y, bool TransFlag) const
画像の左右反転描画
Definition: texture2d.hpp:259
int DrawTurnGraphF(const pointf &p, bool TransFlag) const
画像の左右反転描画( 座標指定が float 版 )
Definition: texture2d.hpp:294
static screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
Definition: texture2d.hpp:345
DXLE_CONSTEXPR texture2d() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:64
static int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d &GrHandle)
基本イメージデータから既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:188
const_iterator cend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:487
static int ReloadGraph(const TCHAR *FileName, texture2d &GrHandle, bool ReverseFlag=false)
画像ファイルからグラフィックへ画像データを転送する
Definition: texture2d.hpp:194
void LoadDivGraph_impl(OutFunc &&out_func, BuffT *HandleBuf, const TCHAR *FileName, int AllNum, const dxle::sizei &Num, const dxle::sizei &Size, bool NotUse3DFlag)
画像ファイルを分割してグラフィックハンドルを作成する
Definition: texture2d.hpp:35
texture2d DerivationGraph(const pointi &src, const sizei &size, const texture2d &SrcGraphHandle) DXLE_NOEXCEPT_OR_NOTHROW
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
Definition: texture2d.hpp:593
screen MakeScreen(const sizei &size, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
Definition: texture2d.hpp:589
int GetGraphMipmapCount() const
グラフィックが持つテクスチャのミップマップレベル数を取得する
Definition: texture2d.hpp:228
static texture2d LoadReverseGraph(const dxle::tstring &FileName, bool NotUse3DFlag=false)
Definition: texture2d.hpp:133
sizei size() const DXLE_NOEXCEPT_OR_NOTHROW
グラフィックのサイズを得る
Definition: texture2d.hpp:77
typename cont_type::reverse_iterator reverse_iterator
Definition: texture2d.hpp:463
int DrawRotaGraphF(float xf, float yf, double ExRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画( 座標指定が float 版 )
Definition: texture2d.hpp:276
texture2d & operator=(const texture2d &other)=delete
texture2d(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
Definition: texture2d.hpp:93
texture2d & operator=(texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:70
DXLE_CONSTEXPR size_type size() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:496
texture2d DerivationGraph(const pointi &src, const sizei &size) const
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
Definition: texture2d.hpp:207
int DrawRotaGraph3(const pointi &p, const pointi &c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )
Definition: texture2d.hpp:253
reverse_iterator rbegin() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:563
value_type width
Definition: size.hpp:104
int DrawRotaGraph(int x, int y, double ExRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画
Definition: texture2d.hpp:243
pointer data() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:554
描画可能画像クラス
Definition: texture2d.hpp:334
static texture2d DerivationGraph(const pointi &src, const sizei &size, const texture2d &SrcGraphHandle)
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
Definition: texture2d.hpp:112
const_iterator begin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:558
static texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:138
static int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &pos, const sizei &size, texture2d &GrHandle)
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:192
#define DXLE_GET_LOCK(mtx)
Definition: thread.hpp:26
int DrawRotaGraph2F(const pointf &p, const pointf &c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画2( 回転中心指定付き )( 座標指定が float 版 )
Definition: texture2d.hpp:282
const_iterator end() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:560
texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
Definition: texture2d.hpp:598
shared_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:398
void swap(derivative_texture2d &other)
Definition: texture2d.hpp:574
int DrawGraphF(float xf, float yf, bool TransFlag) const
画像の描画( 座標指定が float 版 )
Definition: texture2d.hpp:268
int BltDrawValidGraph(const pointi &lu, const pointi &rb, const pointi &dest, texture2d &DestGrHandle) const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:375
shared_texture2d & operator=(const shared_texture2d &other) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:406
static texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag)
Definition: texture2d.hpp:145
const_reverse_iterator rend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:566
pointer data() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:479
reference operator[](size_t index)
Definition: texture2d.hpp:548
typename cont_type::reference reference
Definition: texture2d.hpp:459
typename cont_type::iterator iterator
Definition: texture2d.hpp:461
#define DXLE_NOEXCEPT_IF(COND)
Definition: suffix.hpp:107
typename cont_type::const_pointer const_pointer
Definition: texture2d.hpp:468
texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height) const
Definition: texture2d.hpp:205
const_pointer data() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:555
int GraphLock(int *PitchBuf, void **DataPointBuf, DxLib::COLORDATA **ColorDataPP=nullptr, bool WriteOnly=false)
グラフィックメモリ領域のロック
Definition: texture2d.hpp:214
static texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:151
static int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d &GrHandle)
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:190
const_iterator cbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:561
screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
Definition: texture2d.hpp:587
int DrawTurnGraph(const pointi &p, bool TransFlag) const
画像の左右反転描画
Definition: texture2d.hpp:261
int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックに画像データを転送する
Definition: texture2d.hpp:648
static texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag=false)
Definition: texture2d.hpp:130
screen(screen &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
Definition: texture2d.hpp:384
int DrawRotaGraph(const pointi &p, double ExRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画
Definition: texture2d.hpp:245
static texture2d MakeGraph(const sizei &size, bool NotUse3DFlag=false)
Definition: texture2d.hpp:108
sizei GetGraphTextureSize() const
グラフィックが持つ一つ目のテクスチャのサイズを得る
Definition: texture2d.hpp:226
texture2d(const TCHAR *FileName, bool NotUse3DFlag=false)
Definition: texture2d.hpp:96
int CopyGraphZBufferImage(screen &ToGraph) const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:361
int DrawRotaGraph2F(float xf, float yf, float cxf, float cyf, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画2( 回転中心指定付き )( 座標指定が float 版 )
Definition: texture2d.hpp:280
DXLE_CONSTEXPR static_derivative_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:439
int DrawGraph(int x, int y, bool TransFlag) const
画像の等倍描画
Definition: texture2d.hpp:235
int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックにデータを転送する
Definition: texture2d.hpp:629
texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &p, const sizei &size) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使ってグラフィックを作成する
Definition: texture2d.hpp:646
reverse_iterator rend() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:565
#define DXLE_NOEXCEPT_OR_NOTHROW
Definition: suffix.hpp:94
value_type height
Definition: size.hpp:104
shared_texture2d(const shared_texture2d &other) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:405
texture2d MakeGraph(const sizei &size, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
指定サイズのグラフィックを作成する
Definition: texture2d.hpp:585
static texture2d CreateGraph(const sizei &size, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d())
Definition: texture2d.hpp:164
texture2d(texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
Definition: texture2d.hpp:69
texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上の画像イメージからグラフィックを作成する
Definition: texture2d.hpp:616
int DrawExtendGraphF(float x1f, float y1f, float x2f, float y2, bool TransFlag) const
画像の拡大描画( 座標指定が float 版 )
Definition: texture2d.hpp:272
typename cont_type::value_type value_type
Definition: texture2d.hpp:469
const_reference front() const
Definition: texture2d.hpp:551
int DrawModiGraph(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, bool TransFlag) const
画像の自由変形描画
Definition: texture2d.hpp:255
typename cont_type::const_reverse_iterator const_reverse_iterator
Definition: texture2d.hpp:464
int DrawExtendGraph(int x1, int y1, int x2, int y2, bool TransFlag) const
画像の拡大描画
Definition: texture2d.hpp:239
static int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false)
Definition: texture2d.hpp:157
static texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &pos, const sizei &size)
基本イメージデータの指定の領域を使ってグラフィックを作成する
Definition: texture2d.hpp:186
texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
Definition: texture2d.hpp:602
static int ReloadGraph(const dxle::tstring &FileName, texture2d &GrHandle, bool ReverseFlag=false)
画像ファイルからグラフィックへ画像データを転送する
Definition: texture2d.hpp:196
cont_type::difference_type difference_type
Definition: texture2d.hpp:541
int DrawRotaGraph3F(const pointf &p, const pointf &c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )( 座標指定が float 版 )
Definition: texture2d.hpp:286
screen() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:380
int DrawExtendTurnGraphF(const pointf &lu, const pointf &rb, bool TransFlag) const
画像の拡大左右反転描画( 座標指定が float 版 )
Definition: texture2d.hpp:298
value_type x
Definition: point2d.hpp:109
shared_texture2d & operator=(shared_texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:408
Template class for 2D points specified by its coordinates x and y.
Definition: point2d.hpp:105
std::unique_ptr< texture2d > clone() const override
画像を複製する
Definition: texture2d.hpp:338
iterator end() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:559
int DrawExtendGraph(const pointi &lu, const pointi &rb, bool TransFlag) const
画像の拡大描画
Definition: texture2d.hpp:241
int ReCreateGraph(const sizei &size, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを再作成する
Definition: texture2d.hpp:638
const_reference at(size_t index) const
Definition: texture2d.hpp:472
const_reverse_iterator crbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:492
const_iterator cend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:562
int DrawModiGraphF(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, bool TransFlag) const
画像の自由変形描画( 座標指定が float 版 )
Definition: texture2d.hpp:288
const_reference at(size_t index) const
Definition: texture2d.hpp:547
static texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage)
Definition: texture2d.hpp:181
const_reverse_iterator rend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:491
int DrawRotaGraph3F(float xf, float yf, float cxf, float cyf, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )( 座標指定が float 版 )
Definition: texture2d.hpp:284
size_type max_size() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:572
iterator begin() DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:557
typename cont_type::const_iterator const_iterator
Definition: texture2d.hpp:462
bright_clip_mode
for filter_bright_clip(texture2d and screen_c )
Definition: texture2d.hpp:54
const_reverse_iterator crend() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:568
static texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY)
Definition: texture2d.hpp:184
shared_texture2d(texture2d_t &&unique_tex)
Definition: texture2d.hpp:401
texture2d CreateGraph(const sizei &size, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d()) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを作成する
Definition: texture2d.hpp:634
int DrawGraphF(const pointf &p, bool TransFlag) const
画像の描画( 座標指定が float 版 )
Definition: texture2d.hpp:270
const_reverse_iterator rbegin() const DXLE_NOEXCEPT_OR_NOTHROW
Definition: texture2d.hpp:564