Minsky
createLinkGroupIcons.cc
Go to the documentation of this file.
1 #include "plot.h"
2 #include "cairo_base.h"
3 #include "ecolab_epilogue.h"
4 #include <cairo.h>
5 using namespace ecolab;
6 using namespace std;
7 
8 int main()
9 {
10  const double width=30, height=10;
11  for (int i=0; i<paletteSz; ++i)
12  {
13  const cairo::Surface surface(cairo_image_surface_create(CAIRO_FORMAT_ARGB32,width,height));
14  auto cr=surface.cairo();
15  auto c=palette[i];
16  cairo_set_source_rgba(cr,0.5*c.r,0.5*c.g,0.5*c.b,0.5*c.a);
17  cairo_rectangle(cr,0,0,width,height);
18  cairo_fill(cr);
19  cairo_surface_write_to_png(surface.surface(),("linkGroup"+to_string(i)+".png").c_str());
20  }
21 }
STL namespace.
int main()
string to_string(CONST84 char *x)
Definition: minskyTCLObj.h:33