Subversion Repositories DIN Is Noise

Rev

Rev 484 | Rev 1370 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
* separator.cc
* DIN Is Noise is copyright (c) 2006-2019 Jagannathan Sampath
* For more information, please visit http://dinisnoise.org/
*/


#include "separator.h"

void separator::draw () {
  widget::draw ();
  glEnable (GL_LINE_STIPPLE);
  glLineStipple (1, 0x1111);
  static int pts[4]={0};
  glVertexPointer (2, GL_INT, 0, pts);
  if (type == horizontal) {
    pts[0]=extents.left;pts[1]=extents.bottom;
    pts[2]=extents.right;pts[3]=extents.bottom;
  } else {
    pts[0]=extents.left;pts[1]=extents.bottom;
    pts[2]=extents.left;pts[3]=extents.top;
  }
  glDrawArrays (GL_LINES, 0, 2);
  glDisable (GL_LINE_STIPPLE);
}