#include "modgmt_objects.h" template<> const std::string ObjectGMTCoord::type="GMTCoord"; template<> const std::string ObjectGMTRegion::type="GMTRegion"; template<> const std::string ObjectGMTProjection::type="GMTProjection"; template<> const std::string ObjectGMTColor::type="GMTColor"; template<> const std::string ObjectGMTDash::type="GMTDash"; template<> const std::string ObjectGMTPen::type="GMTPen"; template<> const std::string ObjectGMTFont::type="GMTFont"; template<> const std::string ObjectGMTLayer::type="GMTLayer"; template<> const int8_t* ObjectGMTLayer::Blob(size_t* size) const { if(s.Shifted()) { std::string b=s.BeginShift(); std::string e=s.EndShift(); int8_t* p=new int8_t[b.size()+s.data->size()+e.size()]; memcpy(p,b.data(),b.size()); memcpy(p+b.size(),s.data->data(),s.data->size()); memcpy(p+b.size()+s.data->size(),e.data(),e.size()); return p; } else { *size=s.data->size(); return reinterpret_cast(s.data->data()); } } template<> void ObjectGMTLayer::DeallocBlob(const int8_t* ptr) const { if(s.Shifted()) delete[] ptr; } std::map gmt_projection::projnames; void gmt_projection::FillProjNames() { projnames["x"]=XY; projnames["xy"]=XY; projnames["decart"]=XY; projnames["q"]=CYL_EQU; projnames["cyl_equid"]=CYL_EQU; projnames["cylindrical equidistant"]=CYL_EQU; projnames["m"]=MERCATOR; projnames["merc"]=MERCATOR; projnames["mercator"]=MERCATOR; projnames["t"]=TRANSMERCATOR; projnames["tmerc"]=TRANSMERCATOR; projnames["transverse mercator"]=TRANSMERCATOR; projnames["o"]=OBLIQMERCATOR; projnames["omerc"]=OBLIQMERCATOR; projnames["oblique mercator"]=OBLIQMERCATOR; projnames["c"]=CASSINI; projnames["cassini"]=CASSINI; projnames["y"]=CYL_EQA; projnames["cyl_equala"]=CYL_EQA; projnames["cylindrical equal-area"]=CYL_EQA; projnames["cylindrical equalarea"]=CYL_EQA; projnames["j"]=MILLER; projnames["cyl_miller"]=MILLER; projnames["miller"]=MILLER; projnames["cylindrical miller"]=MILLER; projnames["cyl_stere"]=CYL_STERE; projnames["cylindrical stereographic"]=CYL_STERE; } bool gmt_font::FillFontNames() { families.insert("Helvetica"); families.insert("Helvetica-Bold"); families.insert("Helvetica-Oblique"); families.insert("Helvetica-BoldOblique"); families.insert("Times-Roman"); families.insert("Times-Bold"); families.insert("Times-Italic"); families.insert("Times-BoldItalic"); families.insert("Courier"); families.insert("Courier-Bold"); families.insert("Courier-Oblique"); families.insert("Courier-BoldOblique"); families.insert("Symbol"); families.insert("AvantGarde-Book"); families.insert("AvantGarde-BookOblique"); families.insert("AvantGarde-Demi"); families.insert("AvantGarde-DemiOblique"); families.insert("Bookman-Demi"); families.insert("Bookman-DemiItalic"); families.insert("Bookman-Light"); families.insert("Bookman-LightItalic"); families.insert("Helvetica-Narrow"); families.insert("Helvetica-Narrow-Bold"); families.insert("Helvetica-Narrow-Oblique"); families.insert("Helvetica-Narrow-BoldOblique"); families.insert("NewCenturySchlbk-Roman"); families.insert("NewCenturySchlbk-Italic"); families.insert("NewCenturySchlbk-Bold"); families.insert("NewCenturySchlbk-BoldItalic"); families.insert("Palatino-Roman"); families.insert("Palatino-Italic"); families.insert("Palatino-Bold"); families.insert("Palatino-BoldItalic"); families.insert("ZapfChancery-MediumItalic"); families.insert("ZapfDingbats"); default_family="Times-Roman"; return true; } const double gmt_projection::default_width=10.0; const double gmt_pen::default_width=1.0; const double gmt_dash::default_width=gmt_pen::default_width; const double gmt_font::default_size=12.0; std::string gmt_font::default_family; std::set gmt_font::families;