From 0b4ed61542b0b5ab07b22b26363f2fbec14ddd76 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Tue, 1 Nov 2016 12:27:00 +1000 Subject: [PATCH] Gmr module: Add function ToModel in gmt_color structure. --- modules/gmt/modgmt_structs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/gmt/modgmt_structs.h b/modules/gmt/modgmt_structs.h index 114dbb5..ddbb178 100644 --- a/modules/gmt/modgmt_structs.h +++ b/modules/gmt/modgmt_structs.h @@ -565,6 +565,17 @@ struct gmt_color: public gmt_struct cyan=cc.cyan; magenta=cc.magenta; yellow=cc.yellow; black=cc.black; } + void ToModel(ColorModel newmodel) + { + switch(newmodel) + { + case(RGB): ToRGB(); return; + case(GRAY): ToGray(); return; + case(HSV): ToHSV(); return; + case(CMYK): ToCMYK(); return; + } + } + // Interpret one numeric argument as gray value bool Convert(double gr, std::string& err) {