-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcdecorator_iimage.cpp
More file actions
79 lines (71 loc) · 4.05 KB
/
cdecorator_iimage.cpp
File metadata and controls
79 lines (71 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//****************************************************************************************************
//ïîäêëþ÷àåìûå áèáëèîòåêè
//****************************************************************************************************
#include "cdecorator_iimage.h"
//****************************************************************************************************
//ãëîáàëüíûå ïåðåìåííûå
//****************************************************************************************************
//****************************************************************************************************
//êîíñòàíòû
//****************************************************************************************************
//****************************************************************************************************
//ìàêðîîïðåäåëåíèÿ
//****************************************************************************************************
//****************************************************************************************************
//êîíñòðóêòîð è äåñòðóêòîð
//****************************************************************************************************
//----------------------------------------------------------------------------------------------------
//êîíñòðóêòîð
//----------------------------------------------------------------------------------------------------
CDecorator_IImage::CDecorator_IImage(IImage *iImage_Set_Ptr)
{
iImage_Ptr=iImage_Set_Ptr;
}
//----------------------------------------------------------------------------------------------------
//äåñòðóêòîð
//----------------------------------------------------------------------------------------------------
CDecorator_IImage::~CDecorator_IImage()
{
delete(iImage_Ptr);
}
//****************************************************************************************************
//çàêðûòûå ôóíêöèè
//****************************************************************************************************
//****************************************************************************************************
//îòêðûòûå ôóíêöèè
//****************************************************************************************************
//----------------------------------------------------------------------------------------------------
//ïîëó÷èòü RGBA èçîáðàæåíèå
//----------------------------------------------------------------------------------------------------
void CDecorator_IImage::GetRGBAImage(uint32_t &width,uint32_t &height,std::vector<uint32_t> &vector_image)
{
iImage_Ptr->GetRGBAImage(width,height,vector_image);
}
//----------------------------------------------------------------------------------------------------
//çàäàòü RGBA èçîáðàæåíèå
//----------------------------------------------------------------------------------------------------
void CDecorator_IImage::SetRGBAImage(const uint32_t &width,const uint32_t &height,const std::vector<uint32_t> &vector_image)
{
iImage_Ptr->SetRGBAImage(width,height,vector_image);
}
//----------------------------------------------------------------------------------------------------
//çàäàòü ðàçìåð èçîáðàæåíèÿ è âûäåëèòü ïàìÿòü
//----------------------------------------------------------------------------------------------------
void CDecorator_IImage::SetSize(uint32_t width,uint32_t height)
{
iImage_Ptr->SetSize(width,height);
}
//----------------------------------------------------------------------------------------------------
//çàäàòü òî÷êó
//----------------------------------------------------------------------------------------------------
void CDecorator_IImage::SetRGBAPixel(uint32_t x,uint32_t y,uint32_t color)
{
iImage_Ptr->SetRGBAPixel(x,y,color);
}
//----------------------------------------------------------------------------------------------------
//ïîëó÷èòü òî÷êó
//----------------------------------------------------------------------------------------------------
uint32_t CDecorator_IImage::GetRGBAPixel(uint32_t x,uint32_t y)
{
return(iImage_Ptr->GetRGBAPixel(x,y));
}