return empty_seq;
}
-void GlSequence::add_annotations_for_undefined_sequence(Drawable::draw_func_ptr draw)
+void GlSequence::add_annotations_for_defined_sequence(Drawable::draw_func_ptr draw)
{
Sequence::const_iterator start_i = begin();
Sequence::const_iterator seq_i = begin();
for(; seq_i != end_i; ++seq_i)
{
// need a better set of characters to serch for
- if (*seq_i == 'N' or *seq_i == 'n') {
+ if (not (*seq_i == 'N' or *seq_i == 'n')) {
if (start_block_i == end_i) {
start_block_i = seq_i;
}
void GlSequence::draw_box(GLfloat world_left, GLfloat world_right,
GLfloat left, GLfloat right,
- GLfloat height, GLfloat y, GLfloat z)
+ GLfloat height, GLfloat y, GLfloat z,
+ GLint primitive)
{
GLfloat pixel_width = pixelWidth(world_left, world_right);
GLfloat offset = height/2.0;
if ((right-left) < pixel_width) {
right = left + pixel_width;
}
- glBegin(GL_QUADS);
+ glBegin(primitive);
glVertex3f(left, top, z);
glVertex3f(left, bottom, z);
glVertex3f(right, bottom, z);
{
glColor3fv(color()->get());
// draw main sequence track
- draw_box(left, right, x(), x()+Sequence::size(), height(), y(), 0.0);
+ draw_box(left, right, x(), x()+Sequence::size(), height(), y(), 0.0, GL_LINE_LOOP);
}
void GlSequence::draw_annotations(GLfloat left, GLfloat right) const
float z( (parent_draw) ? parent_draw->z() : 10 );
float height( (parent_draw) ? parent_draw->height() : default_height );
- glColor3f(1.0, 1.0, 1.0);
- float hsmall = height * 3.0/4.0;
+ glColor3f(0.0, 0.0, 0.0);
+ float hsmall = height * 0.5;
GlSequence::draw_box(left, right, x+s->start(), x+s->stop(),
hsmall, y, z+10);
+}
+
+void draw_track(SeqSpanRef s, float left, float right)
+{
+ SeqSpanRef parent(s->parent());
+ DrawableRef parent_draw(parent->drawable());
+ float x( (parent_draw) ? parent_draw->x() : 0);
+ float y( (parent_draw) ? parent_draw->y() : 0);
+ float z( (parent_draw) ? parent_draw->z() : 10 );
+ float height( (parent_draw) ? parent_draw->height() : default_height );
+
+ glColor3f(0.0, 0.0, 0.0);
+ GlSequence::draw_box(left, right, x+s->start(), x+s->stop(),
+ height, y, z+10);
}
\ No newline at end of file