CM2D/inc/hgl/2d/Blend.h

34 lines
833 B
C
Raw Normal View History

2023-07-11 20:19:51 +08:00
#pragma once
2023-07-11 18:48:55 +08:00
#include<hgl/type/DataType.h>
2023-07-11 20:19:51 +08:00
#include<hgl/2d/Bitmap.h>
2023-07-11 18:48:55 +08:00
namespace hgl
{
namespace bitmap
{
template<typename T> struct BlendColor
{
2023-07-11 19:36:48 +08:00
virtual const T operator()(const T &src,const T &)const
2023-07-11 18:48:55 +08:00
{
return src;
}
2023-07-11 19:36:48 +08:00
virtual const T operator()(const T &src,const T &,const float &)const
2023-07-11 18:48:55 +08:00
{
return src;
}
2023-07-11 19:36:48 +08:00
};//template<typename T> struct BlendColor
2023-07-11 20:19:51 +08:00
/**
*
*/
template<typename ST,typename DT> class BlendBitmap
{
public:
void operator ()(const Bitmap<ST> *src,Bitmap<DT> *dst,const float alpha)const;
};//template<typename ST,typename DT> class BlendBitmap
2023-07-11 18:48:55 +08:00
}//namespace bitmap
2023-07-11 20:19:51 +08:00
}//namespace hgl