summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-02 19:26:05 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-02 19:26:05 +0200
commit3be8598f672eb5b8e48373ed4ee59feff543ada2 (patch)
tree1925d95fde39e903f340d58cc83e990a49d5e767
parent81770a4ddc9306c517b75b8034dda4a5dd12d10a (diff)
Refactored Colour.
-rw-r--r--plugingui/colour.cc39
-rw-r--r--plugingui/colour.h27
2 files changed, 25 insertions, 41 deletions
diff --git a/plugingui/colour.cc b/plugingui/colour.cc
index 943011b..fb3d789 100644
--- a/plugingui/colour.cc
+++ b/plugingui/colour.cc
@@ -26,38 +26,25 @@
*/
#include "colour.h"
-GUI::Colour::Colour()
+namespace GUI {
+
+Colour::Colour()
{
- red = blue = green = alpha = 1.0;
+ red = blue = green = alpha = 1.0;
}
-GUI::Colour::Colour(float grey, float a)
+Colour::Colour(float grey, float a)
{
- red = green = blue = grey;
- alpha = a;
+ red = green = blue = grey;
+ alpha = a;
}
-GUI::Colour::Colour(float r, float g, float b, float a)
+Colour::Colour(float r, float g, float b, float a)
{
- red = r;
- green = g;
- blue = b;
- alpha = a;
+ red = r;
+ green = g;
+ blue = b;
+ alpha = a;
}
-#ifdef TEST_COLOUR
-//Additional dependency files
-//deps:
-//Required cflags (autoconf vars may be used)
-//cflags:
-//Required link options (autoconf vars may be used)
-//libs:
-#include "test.h"
-
-TEST_BEGIN;
-
-// TODO: Put some testcode here (see test.h for usable macros).
-
-TEST_END;
-
-#endif/*TEST_COLOUR*/
+} // GUI::
diff --git a/plugingui/colour.h b/plugingui/colour.h
index 92ec99e..9f539e9 100644
--- a/plugingui/colour.h
+++ b/plugingui/colour.h
@@ -24,28 +24,25 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_COLOUR_H__
-#define __DRUMGIZMO_COLOUR_H__
+#pragma once
namespace GUI {
class Colour {
public:
- Colour();
+ Colour();
- Colour(float grey, float alpha = 1.0);
+ Colour(float grey, float alpha = 1.0);
- Colour(float red,
- float green,
- float blue,
- float alpha = 1.0);
+ Colour(float red,
+ float green,
+ float blue,
+ float alpha = 1.0);
- float red;
- float green;
- float blue;
- float alpha;
+ float red;
+ float green;
+ float blue;
+ float alpha;
};
-};
-
-#endif/*__DRUMGIZMO_COLOUR_H__*/
+} // GUI::