summaryrefslogtreecommitdiff
path: root/src/types.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-27 14:41:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-27 14:41:33 +0000
commit8c2f3517e868078b551bb01d975f2956cb692fbf (patch)
tree81bf98f00b9a267a73494c1939c6e9473559c85e /src/types.cc
parente5d368553b47a566a83d4edce0a8f166db9509e6 (diff)
Various tinkerings.
Diffstat (limited to 'src/types.cc')
-rw-r--r--src/types.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types.cc b/src/types.cc
index 106fb44c..0ecf7a16 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -29,6 +29,9 @@ using namespace std;
using namespace dcp;
using namespace boost;
+/** Construct a Fraction from a string of the form <numerator> <denominator>
+ * e.g. "1 3".
+ */
Fraction::Fraction (string s)
{
vector<string> b;
@@ -52,6 +55,7 @@ dcp::operator!= (Fraction const & a, Fraction const & b)
return (a.numerator != b.numerator || a.denominator != b.denominator);
}
+/** Construct a Color, initialising it to black. */
Color::Color ()
: r (0)
, g (0)
@@ -60,6 +64,9 @@ Color::Color ()
}
+/** Construct a Color from R, G and B. The values run between
+ * 0 and 255.
+ */
Color::Color (int r_, int g_, int b_)
: r (r_)
, g (g_)