Commit 35b7c84e authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55216 954022d7-b5bf-4e40-9824-e11837661b57
parent 00e364da
#ifndef _BUILD_IMAGE_H_
#define _BUILD_IMAGE_H_
#include "AggPlusEnums.h"
#include <string>
#include "IRenderer.h"
namespace Aggplus
{
class CImage : public IGrObject
{
public:
friend class CGraphics;
friend class CBrushTexture;
public:
CImage();
CImage(const std::wstring& filename);
virtual ~CImage();
DWORD GetWidth() const;
DWORD GetHeight() const;
Status GetLastStatus() const;
void Create(const std::wstring& filename);
void Destroy();
public:
Status m_Status;
DWORD m_dwWidth;
DWORD m_dwHeight;
long m_nStride;
BYTE* m_pImgData;
bool m_bExternalBuffer;
};
//---------------------------------------------------------------------------
// Information about image pixel data
//---------------------------------------------------------------------------
class CBitmapData
{
public:
UINT Width;
UINT Height;
LONG Stride;
PixelFormat PixelFormat;
void* Scan0;
UINT* Reserved;
};
class CBitmap : public CImage
{
public:
CBitmap(LONG width, LONG height, PixelFormat format = PixelFormat32bppARGB);
CBitmap(LONG width, LONG height, LONG stride, PixelFormat format, BYTE* scan0);
CBitmap(const std::wstring& filename);
virtual ~CBitmap();
void LockBits(const RectF* rect, PixelFormat format, CBitmapData* lockedBitmapData);
};
}
#ifndef _BUILD_IMAGE_H_
#define _BUILD_IMAGE_H_
#include "AggPlusEnums.h"
#include <string>
#include "IRenderer.h"
namespace Aggplus
{
class CImage : public IGrObject
{
public:
friend class CGraphics;
friend class CBrushTexture;
public:
CImage();
CImage(const std::wstring& filename);
virtual ~CImage();
DWORD GetWidth() const;
DWORD GetHeight() const;
Status GetLastStatus() const;
void Create(const std::wstring& filename);
void Destroy();
public:
Status m_Status;
DWORD m_dwWidth;
DWORD m_dwHeight;
long m_nStride;
BYTE* m_pImgData;
bool m_bExternalBuffer;
};
//---------------------------------------------------------------------------
// Information about image pixel data
//---------------------------------------------------------------------------
class CBitmapData
{
public:
UINT Width;
UINT Height;
LONG Stride;
Aggplus::PixelFormat PixelFormat;
void* Scan0;
UINT* Reserved;
};
class CBitmap : public CImage
{
public:
CBitmap(LONG width, LONG height, PixelFormat format = PixelFormat32bppARGB);
CBitmap(LONG width, LONG height, LONG stride, PixelFormat format, BYTE* scan0);
CBitmap(const std::wstring& filename);
virtual ~CBitmap();
void LockBits(const RectF* rect, PixelFormat format, CBitmapData* lockedBitmapData);
};
}
#endif // _BUILD_IMAGE_H_
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment