summaryrefslogtreecommitdiff
path: root/src/icon.cpp
blob: f5fd2318e1a20b56151c68e00d0158880180d3dc (plain)
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
#include <core/icon.h>

CompIcon::CompIcon (CompScreen *screen, unsigned int width,
		    unsigned int height) :
    mWidth (width),
    mHeight (height),
    mData (new unsigned char[width * height * 4]),
    mUpdateTex (true)
{
}

CompIcon::~CompIcon ()
{
    delete mData;
}

unsigned int
CompIcon::width ()
{
    return mWidth;
}

unsigned int
CompIcon::height ()
{
    return mHeight;
}

unsigned char*
CompIcon::data ()
{
    mUpdateTex = true;
    return mData;
}