8 #ifndef DXLE_INC_TEXTURE_TEXTURE2D_HPP_ 9 #define DXLE_INC_TEXTURE_TEXTURE2D_HPP_ 12 #if defined(__c2__) && __clang_major__ == 3 && __clang_minor__ == 8 45 static std::recursive_mutex mtx;
74 inline void delete_this(
bool LogOutFlag =
false) { DxLib::DeleteGraph(GetHandle(), LogOutFlag); }
80 virtual std::unique_ptr<texture2d> clone()
const;
93 inline texture2d(
const TCHAR *FileName,
int TextureFlag,
int ReverseFlag,
int SurfaceMode = DX_MOVIESURFACE_NORMAL) :
texture2d(DxLib::
LoadBmpToGraph(FileName, TextureFlag, ReverseFlag, SurfaceMode), false){}
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); }
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 178 #endif // DX_NON_SOFTIMAGE 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()); }
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()); }
220 inline int GetGraphSize(
int *SizeXBuf,
int *SizeYBuf)
const {
return DxLib::GetGraphSize(GetHandle(), SizeXBuf, SizeYBuf); }
224 inline int GetGraphTextureSize(
int *SizeXBuf,
int *SizeYBuf)
const {
return DxLib::GetGraphTextureSize(GetHandle(), SizeXBuf, SizeYBuf); }
230 inline int GetGraphFilePath(TCHAR FilePathBuffer[])
const {
return DxLib::GetGraphFilePath(GetHandle(), FilePathBuffer); }
232 inline tstring GetGraphFilePath()
const;
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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);
312 :
texture2d(gr_impl::simple_graph_handle_manager::get_unique(handle, NotUse3DFlag))
314 texture2d(std::unique_ptr<gr_impl::texture2d_handle_manager>&& handle_manager_)
315 : handle_manager(std::move(handle_manager_))
317 std::unique_ptr<gr_impl::texture2d_handle_manager> handle_manager;
319 int GetHandle()
const{
if (!handle_manager){
return -1; }
return handle_manager->get_handle(); }
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);
338 std::unique_ptr<texture2d>
clone()
const override{
return cloneSc(); }
340 std::unique_ptr<screen> cloneSc()
const;
351 template<
typename Func_T>
352 screen& draw_on_this(Func_T&& draw_func);
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()); }
392 :
texture2d(gr_impl::screen_handle_manager::get_unique(handle, UseAlphaChannel))
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>
402 : impl(
std::make_shared<texture2d_t>(
std::forward<texture2d_t>(unique_tex)))
423 std::shared_ptr<texture2d> impl;
435 std::array<texture2d, N> textures;
436 using cont_type = decltype(textures);
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);
507 std::vector<texture2d> textures;
508 using cont_type = decltype(textures);
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);
546 reference at(
size_t index) {
return textures.
at(index); }
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); }
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); }
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); }
639 #ifndef DX_NON_SOFTIMAGE 640 #endif // DX_NON_SOFTIMAGE 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); }
664 using namespace graph2d;
cont_type::size_type size_type
texture2d LoadGraph(const tstring &FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
int ReloadGraph(const tstring &FileName, texture2d &GrHandle, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックへ画像データを転送する
DXLE_CONSTEXPR bool empty() const DXLE_NOEXCEPT_OR_NOTHROW
Template class for 2D sizes specified by its coordinates width and height.
cont_type::pointer pointer
texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
derivative_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
int DrawRotaGraph3(int x, int y, int cx, int cy, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )
static int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false)
size_type size() const DXLE_NOEXCEPT_OR_NOTHROW
reverse_iterator rbegin() DXLE_NOEXCEPT_OR_NOTHROW
static screen MakeScreen(const sizei &size, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
int SetDrawScreen() const DXLE_NOEXCEPT_OR_NOTHROW_SINGLE
描画先画面を設定する
std::basic_string< TCHAR > tstring
iterator end() DXLE_NOEXCEPT_OR_NOTHROW
const_iterator end() const DXLE_NOEXCEPT_OR_NOTHROW
int DrawExtendTurnGraph(int x1, int y1, int x2, int y2, bool TransFlag) const
画像の拡大左右反転描画
int DrawExtendGraphF(const pointf &lu, const pointf &rb, bool TransFlag) const
画像の拡大描画( 座標指定が float 版 )
int ReloadGraph(const TCHAR *FileName, texture2d &GrHandle, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックへ画像データを転送する
void delete_this(bool LogOutFlag=false)
static int ReloadReverseGraph(const dxle::tstring &FileName, texture2d &GrHandle)
ReloadGraph の画像反転処理追加版
typename cont_type::const_reference const_reference
texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
const_pointer data() const DXLE_NOEXCEPT_OR_NOTHROW
int DrawRotaGraph2(const pointi &p, const pointi &c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画2( 回転中心指定付き )
texture2d LoadBmpToGraph(const tstring &FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
static int ReCreateGraph(const sizei &size, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr)
static texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag=false)
int GetGraphTextureSize(int *SizeXBuf, int *SizeYBuf) const
グラフィックが持つ一つ目のテクスチャのサイズを得る
const_reference operator[](size_t index) const
shared_texture2d(shared_texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
int ReloadReverseGraph(const tstring &FileName, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
ReloadGraph の画像反転処理追加版
DXLE_CONSTEXPR size_type max_size() const DXLE_NOEXCEPT_OR_NOTHROW
int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを再作成する
texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからグラフィックを作成する
int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックにデータを転送する
const_reverse_iterator rbegin() const DXLE_NOEXCEPT_OR_NOTHROW
int GetGraphSize(int *SizeXBuf, int *SizeYBuf) const
グラフィックのサイズを得る
cont_type::const_reverse_iterator const_reverse_iterator
const_iterator begin() const DXLE_NOEXCEPT_OR_NOTHROW
static texture2d LoadGraph(const dxle::tstring &FileName, bool NotUse3DFlag=false)
static texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, bool TextureFlag=true, bool ReverseFlag=false)
int GraphUnLock()
グラフィックメモリ領域のロック解除
int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
cont_type::reference reference
cont_type::const_reference const_reference
reference at(size_t index)
texture2d MakeGraph(int SizeX, int SizeY, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
指定サイズのグラフィックを作成する
int DrawExtendTurnGraph(const pointi &lu, const pointi &rb, bool TransFlag) const
画像の拡大左右反転描画
typename cont_type::difference_type difference_type
screen(int handle, bool UseAlphaChannel)
const_reverse_iterator crend() const DXLE_NOEXCEPT_OR_NOTHROW
texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d()) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを作成する
int ReloadReverseGraph(const TCHAR *FileName, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
ReloadGraph の画像反転処理追加版
virtual ~texture2d() DXLE_NOEXCEPT_OR_NOTHROW
bool empty() const DXLE_NOEXCEPT_OR_NOTHROW
sizei GetGraphSize() const
グラフィックのサイズを得る
static texture2d LoadBmpToGraph(const dxle::tstring &FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
int SetUseGraphZBuffer(bool UseFlag, int BitDepth=-1) DXLE_NOEXCEPT_OR_NOTHROW
iterator begin() DXLE_NOEXCEPT_OR_NOTHROW
int DrawModiGraph(const std::array< pointi, 4 > &ps, bool TransFlag) const
画像の自由変形描画
typename cont_type::pointer pointer
int SetDeviceLostDeleteGraphFlag(bool DeleteFlag)
グラフィックスデバイスのデバイスロスト発生時に指定のグラフィックを削除するかどうかを設定する( TRUE:デ...
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
メモリ上の画像イメージから既存のグラフィックにデータを転送する
texture2d LoadReverseGraph(const tstring &FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルを反転したものでグラフィックを作成する
const_iterator cbegin() const DXLE_NOEXCEPT_OR_NOTHROW
reference operator[](size_t index)
reverse_iterator rend() DXLE_NOEXCEPT_OR_NOTHROW
int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &p, const sizei &size, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
screen & operator=(screen &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
int DrawRotaGraphF(const pointf &p, double ExRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画( 座標指定が float 版 )
int DrawRotaGraph2(int x, int y, int cx, int cy, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画2( 回転中心指定付き )
texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d &SrcGraphHandle) DXLE_NOEXCEPT_OR_NOTHROW
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
derivative_texture2d LoadDivGraph(const TCHAR *FileName, int AllNum, const dxle::sizei &Num, const dxle::sizei &Size, bool NotUse3DFlag)
画像ファイルを分割してグラフィックハンドルを作成する
#define DXLE_NOEXCEPT_OR_NOTHROW_SINGLE
texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルを反転したものでグラフィックを作成する
static int ReCreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, texture2d &GrHandle, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false)
int DrawGraph(const pointi &p, bool TransFlag) const
画像の等倍描画
const_reference operator[](size_t index) const
cont_type::const_iterator const_iterator
texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使ってグラフィックを作成する
int DrawExtendTurnGraphF(float x1f, float y1f, float x2f, float y2f, bool TransFlag) const
画像の拡大左右反転描画( 座標指定が float 版 )
derivative_texture2d(derivative_texture2d &&) DXLE_NOEXCEPT_IF((std derivative_texture2d & operator=(const derivative_texture2d &)=delete
static texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag=false)
cont_type::const_pointer const_pointer
int GetGraphFilePath(TCHAR FilePathBuffer[]) const
グラフィックが画像ファイルから読み込まれていた場合、その画像のファイルパスを取得する ...
cont_type::value_type value_type
texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータからサイズを割り出し、それに合ったグラフィックを作成する
void swap(static_derivative_texture2d &other)
static texture2d CreateGraph(int Width, int Height, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d())
static int ReCreateGraph(int Width, int Height, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr)
int BltDrawValidGraph(int x1, int y1, int x2, int y2, int DestX, int DestY, texture2d &DestGrHandle) const DXLE_NOEXCEPT_OR_NOTHROW
const_reference front() const
typename cont_type::size_type size_type
static texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
static int ReloadReverseGraph(const TCHAR *FileName, texture2d &GrHandle)
ReloadGraph の画像反転処理追加版
int DrawModiGraphF(const std::array< pointf, 4 > &ps, bool TransFlag) const
画像の自由変形描画( 座標指定が float 版 )
int DrawTurnGraphF(float xf, float yf, bool TransFlag) const
画像の左右反転描画( 座標指定が float 版 )
cont_type::reverse_iterator reverse_iterator
const_reference back() const
static texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height, const texture2d &SrcGraphHandle)
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
const_reverse_iterator crbegin() const DXLE_NOEXCEPT_OR_NOTHROW
int DrawTurnGraph(int x, int y, bool TransFlag) const
画像の左右反転描画
int DrawTurnGraphF(const pointf &p, bool TransFlag) const
画像の左右反転描画( 座標指定が float 版 )
static screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
DXLE_CONSTEXPR texture2d() DXLE_NOEXCEPT_OR_NOTHROW
static int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d &GrHandle)
基本イメージデータから既存のグラフィックに画像データを転送する
const_iterator cend() const DXLE_NOEXCEPT_OR_NOTHROW
static int ReloadGraph(const TCHAR *FileName, texture2d &GrHandle, bool ReverseFlag=false)
画像ファイルからグラフィックへ画像データを転送する
void LoadDivGraph_impl(OutFunc &&out_func, BuffT *HandleBuf, const TCHAR *FileName, int AllNum, const dxle::sizei &Num, const dxle::sizei &Size, bool NotUse3DFlag)
画像ファイルを分割してグラフィックハンドルを作成する
texture2d DerivationGraph(const pointi &src, const sizei &size, const texture2d &SrcGraphHandle) DXLE_NOEXCEPT_OR_NOTHROW
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
screen MakeScreen(const sizei &size, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
int GetGraphMipmapCount() const
グラフィックが持つテクスチャのミップマップレベル数を取得する
static texture2d LoadReverseGraph(const dxle::tstring &FileName, bool NotUse3DFlag=false)
sizei size() const DXLE_NOEXCEPT_OR_NOTHROW
グラフィックのサイズを得る
typename cont_type::reverse_iterator reverse_iterator
int DrawRotaGraphF(float xf, float yf, double ExRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画( 座標指定が float 版 )
texture2d & operator=(const texture2d &other)=delete
texture2d(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL)
texture2d & operator=(texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
DXLE_CONSTEXPR size_type size() const DXLE_NOEXCEPT_OR_NOTHROW
texture2d DerivationGraph(const pointi &src, const sizei &size) const
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
int DrawRotaGraph3(const pointi &p, const pointi &c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )
reverse_iterator rbegin() DXLE_NOEXCEPT_OR_NOTHROW
int DrawRotaGraph(int x, int y, double ExRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画
pointer data() DXLE_NOEXCEPT_OR_NOTHROW
const_reference back() const
static texture2d DerivationGraph(const pointi &src, const sizei &size, const texture2d &SrcGraphHandle)
指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する
const_iterator begin() const DXLE_NOEXCEPT_OR_NOTHROW
static texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false)
static int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &pos, const sizei &size, texture2d &GrHandle)
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
#define DXLE_GET_LOCK(mtx)
int DrawRotaGraph2F(const pointf &p, const pointf &c, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画2( 回転中心指定付き )( 座標指定が float 版 )
const_iterator end() const DXLE_NOEXCEPT_OR_NOTHROW
texture2d LoadBmpToGraph(const TCHAR *FileName, int TextureFlag, int ReverseFlag, int SurfaceMode=DX_MOVIESURFACE_NORMAL) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
shared_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
void swap(derivative_texture2d &other)
int DrawGraphF(float xf, float yf, bool TransFlag) const
画像の描画( 座標指定が float 版 )
int BltDrawValidGraph(const pointi &lu, const pointi &rb, const pointi &dest, texture2d &DestGrHandle) const DXLE_NOEXCEPT_OR_NOTHROW
shared_texture2d & operator=(const shared_texture2d &other) DXLE_NOEXCEPT_OR_NOTHROW
static texture2d CreateDXGraph(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag)
const_reverse_iterator rend() const DXLE_NOEXCEPT_OR_NOTHROW
pointer data() DXLE_NOEXCEPT_OR_NOTHROW
reference operator[](size_t index)
typename cont_type::reference reference
typename cont_type::iterator iterator
#define DXLE_NOEXCEPT_IF(COND)
typename cont_type::const_pointer const_pointer
texture2d DerivationGraph(int SrcX, int SrcY, int Width, int Height) const
const_pointer data() const DXLE_NOEXCEPT_OR_NOTHROW
int GraphLock(int *PitchBuf, void **DataPointBuf, DxLib::COLORDATA **ColorDataPP=nullptr, bool WriteOnly=false)
グラフィックメモリ領域のロック
static texture2d CreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, bool TextureFlag=true, bool ReverseFlag=false)
static int ReCreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY, texture2d &GrHandle)
基本イメージデータの指定の領域を使って既存のグラフィックに画像データを転送する
const_iterator cbegin() const DXLE_NOEXCEPT_OR_NOTHROW
screen MakeScreen(int SizeX, int SizeY, bool UseAlphaChannel=false) DXLE_NOEXCEPT_OR_NOTHROW
SetDrawScreen で描画対象にできるグラフィックを作成する
int DrawTurnGraph(const pointi &p, bool TransFlag) const
画像の左右反転描画
reference at(size_t index)
int ReCreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage, texture2d &GrHandle) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックに画像データを転送する
static texture2d LoadReverseGraph(const TCHAR *FileName, bool NotUse3DFlag=false)
screen(screen &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
int DrawRotaGraph(const pointi &p, double ExRate, double Angle, bool TransFlag, bool TurnFlag=false) const
画像の回転描画
static texture2d MakeGraph(const sizei &size, bool NotUse3DFlag=false)
sizei GetGraphTextureSize() const
グラフィックが持つ一つ目のテクスチャのサイズを得る
texture2d(const TCHAR *FileName, bool NotUse3DFlag=false)
int CopyGraphZBufferImage(screen &ToGraph) const DXLE_NOEXCEPT_OR_NOTHROW
int DrawRotaGraph2F(float xf, float yf, float cxf, float cyf, double ExtRate, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画2( 回転中心指定付き )( 座標指定が float 版 )
DXLE_CONSTEXPR static_derivative_texture2d() DXLE_NOEXCEPT_OR_NOTHROW
int DrawGraph(int x, int y, bool TransFlag) const
画像の等倍描画
int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータから既存のグラフィックにデータを転送する
texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &p, const sizei &size) DXLE_NOEXCEPT_OR_NOTHROW
基本イメージデータの指定の領域を使ってグラフィックを作成する
reverse_iterator rend() DXLE_NOEXCEPT_OR_NOTHROW
#define DXLE_NOEXCEPT_OR_NOTHROW
shared_texture2d(const shared_texture2d &other) DXLE_NOEXCEPT_OR_NOTHROW
texture2d MakeGraph(const sizei &size, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
指定サイズのグラフィックを作成する
static texture2d CreateGraph(const sizei &size, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d())
texture2d(texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
所有権の譲渡
texture2d CreateGraphFromMem(const void *RGBFileImage, int RGBFileImageSize, const void *AlphaFileImage=nullptr, int AlphaFileImageSize=0, bool TextureFlag=true, bool ReverseFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上の画像イメージからグラフィックを作成する
int DrawExtendGraphF(float x1f, float y1f, float x2f, float y2, bool TransFlag) const
画像の拡大描画( 座標指定が float 版 )
typename cont_type::value_type value_type
const_reference front() const
int DrawModiGraph(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, bool TransFlag) const
画像の自由変形描画
typename cont_type::const_reverse_iterator const_reverse_iterator
int DrawExtendGraph(int x1, int y1, int x2, int y2, bool TransFlag) const
画像の拡大描画
static int ReCreateGraphFromGraphImage(const DxLib::BASEIMAGE *RgbBaseImage, const DxLib::BASEIMAGE *AlphaBaseImage, texture2d &GrHandle, bool TextureFlag=true, bool ReverseFlag=false)
static texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, const pointi &pos, const sizei &size)
基本イメージデータの指定の領域を使ってグラフィックを作成する
cont_type::iterator iterator
texture2d LoadGraph(const TCHAR *FileName, bool NotUse3DFlag=false) DXLE_NOEXCEPT_OR_NOTHROW
画像ファイルからグラフィックを作成する
static int ReloadGraph(const dxle::tstring &FileName, texture2d &GrHandle, bool ReverseFlag=false)
画像ファイルからグラフィックへ画像データを転送する
cont_type::difference_type difference_type
int DrawRotaGraph3F(const pointf &p, const pointf &c, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )( 座標指定が float 版 )
screen() DXLE_NOEXCEPT_OR_NOTHROW
int DrawExtendTurnGraphF(const pointf &lu, const pointf &rb, bool TransFlag) const
画像の拡大左右反転描画( 座標指定が float 版 )
shared_texture2d & operator=(shared_texture2d &&other) DXLE_NOEXCEPT_OR_NOTHROW
Template class for 2D points specified by its coordinates x and y.
std::unique_ptr< texture2d > clone() const override
画像を複製する
iterator end() DXLE_NOEXCEPT_OR_NOTHROW
int DrawExtendGraph(const pointi &lu, const pointi &rb, bool TransFlag) const
画像の拡大描画
int ReCreateGraph(const sizei &size, int Pitch, const void *RGBImage, texture2d &GrHandle, const void *AlphaImage=nullptr) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを再作成する
const_reference at(size_t index) const
const_reverse_iterator crbegin() const DXLE_NOEXCEPT_OR_NOTHROW
const_iterator cend() const DXLE_NOEXCEPT_OR_NOTHROW
int DrawModiGraphF(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, bool TransFlag) const
画像の自由変形描画( 座標指定が float 版 )
const_reference at(size_t index) const
static texture2d CreateGraphFromBaseImage(const DxLib::BASEIMAGE *BaseImage)
const_reverse_iterator rend() const DXLE_NOEXCEPT_OR_NOTHROW
int DrawRotaGraph3F(float xf, float yf, float cxf, float cyf, double ExtRateX, double ExtRateY, double Angle, bool TransFlag, bool TurnFlag=FALSE) const
画像の回転描画3( 回転中心指定付き+縦横拡大率別指定版 )( 座標指定が float 版 )
size_type max_size() const DXLE_NOEXCEPT_OR_NOTHROW
iterator begin() DXLE_NOEXCEPT_OR_NOTHROW
typename cont_type::const_iterator const_iterator
bright_clip_mode
for filter_bright_clip(texture2d and screen_c )
const_reverse_iterator crend() const DXLE_NOEXCEPT_OR_NOTHROW
static texture2d CreateGraphFromRectBaseImage(const DxLib::BASEIMAGE *BaseImage, int x, int y, int SizeX, int SizeY)
shared_texture2d(texture2d_t &&unique_tex)
texture2d CreateGraph(const sizei &size, int Pitch, const void *RGBImage, const void *AlphaImage=nullptr, const texture2d &GrHandle=texture2d()) DXLE_NOEXCEPT_OR_NOTHROW
メモリ上のビットマップイメージからグラフィックを作成する
int DrawGraphF(const pointf &p, bool TransFlag) const
画像の描画( 座標指定が float 版 )
const_reverse_iterator rbegin() const DXLE_NOEXCEPT_OR_NOTHROW