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) {