From 436908e5988381b9c92c03fe2806731acf7ecd35 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Tue, 14 Oct 2008 08:13:21 +0200 Subject: Better use of classes in icon and image handling. --- src/icon.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/icon.cpp') diff --git a/src/icon.cpp b/src/icon.cpp index 46cd537..aa17e35 100644 --- a/src/icon.cpp +++ b/src/icon.cpp @@ -29,8 +29,7 @@ CompIcon::CompIcon (CompScreen *screen, unsigned int width, unsigned int height) : - mWidth (width), - mHeight (height), + mSize (width, height), mData (new unsigned char[width * height * 4]) { } @@ -40,16 +39,10 @@ CompIcon::~CompIcon () delete mData; } -unsigned int -CompIcon::width () const +const CompSize & +CompIcon::size () const { - return mWidth; -} - -unsigned int -CompIcon::height () const -{ - return mHeight; + return mSize; } unsigned char* -- cgit v1.1