CP Ndata[] = {{ 0, -5, PT}, {0, 5, PT}, {5, -5, PT}, {5, 5, END}};
//! the maximum width used for a charcter glyph
-const int max_glyph_width = 5;
+const int max_glyph_width = 5; // unit ( glyph_coord )
static void drawLetter(CP *l, GLfloat z)
{
Sequence::const_iterator seq_itor = sequence_begin(left, right);
Sequence::const_iterator seq_end = sequence_end(left, right);
Sequence::size_type basepair = 0;
- const float glyph_x_scale = 0.1;
- const float glyph_margin = ((1.0 / glyph_x_scale) - max_glyph_width) / 4.0;
+ const float bp_per_world = 1.0; //( world coord )
+ const float glyph_x_scale = 0.125; // unit = ( world coord / glyph coord )
+ // compute how much space there should be to either size of a letter
+ const float glyph_margin = (bp_per_world - glyph_x_scale * max_glyph_width)
+ / 2.0;
assert(seq_end - seq_itor >= 0);
while(seq_itor != seq_end)