#include "OGC.h"

#include <xclass/OXWindow.h>

//----------------------------------------------------------------------

OGC::OGC(OXClient * c, char * color) {
  XGCValues gcv;
  int mask = GCForeground | GCFont | GCFillStyle | GCGraphicsExposures;

  gcv.foreground = c->GetColorByName(color);
  gcv.fill_style = FillSolid;
  gcv.graphics_exposures = False;
  gcv.font = (_font = XLoadQueryFont(c->GetDisplay(), "fixed"))->fid;

  _gc = XCreateGC(c->GetDisplay(), c->GetRoot()->GetId(), mask, &gcv);

  _color = new OString(color);
}

OGC::~OGC() {
}
