static DrawableRef default_drawable();
static DrawableRef copy_drawable(DrawableRef s);
+ //! search through sequence and add an annotation highlighting all the non AGCT characters
+ void add_annotations_for_defined_sequence(Drawable::draw_func_ptr draw=0);
//! set our starting x (horizontal) coordinate
void setX(float x);
//! get our starting x (horizontal) coordinate
const ColorRef color() const;
//! return our draw color
ColorRef color();
+ //! return our annotation color mapper
+ AnnotationColorsRef colorMapper() { return color_mapper; }
+ //! draw a from left to right +/- height/2
+ static
+ void draw_box(GLfloat world_left, GLfloat world_right,
+ GLfloat left, GLfloat right, GLfloat height,
+ GLfloat y, GLfloat z,
+ GLint primitive=GL_QUADS);
//! draw a track
/*! left and right are the edges of the current viewport
*/
//! return a subsequence as a GlSequence (instead of a Sequence subsequence)
GlSequence subseq(size_type start, size_type count) const;
+ //! Return the pixel width of the opengl viewport.
+ static int get_viewport_width_in_pixels();
//! how big is a pixel in world coordinats
- GLfloat pixelWidth(GLfloat, GLfloat) const;
+ static GLfloat pixelWidth(GLfloat, GLfloat);
//! how big is a pixel in world coordinats (specifying viewport size)
- GLfloat pixelWidth(GLfloat, GLfloat, int) const;
+ static GLfloat pixelWidth(GLfloat, GLfloat, int);
//! are we close enough that it would make sense to view the base pairs?
bool is_sequence_renderable(GLfloat left, GLfloat right) const;
friend bool operator==(const GlSequence &left, const GlSequence &right);
protected:
- boost::shared_ptr<AnnotationColors> color_mapper;
+ AnnotationColorsRef color_mapper;
const GLfloat char_pix_per_world_unit;
- //! Return the pixel width of the opengl viewport.
- static int get_viewport_width_in_pixels();
- //! draw a from left to right +/- height/2
- void draw_box(GLfloat world_left, GLfloat world_right, GLfloat left, GLfloat right, GLfloat height, GLfloat z) const;
+ //! initalize a SeqSpanRef covering start, count
+ SeqSpanRef make_undefined_sequence_annotation(
+ Drawable::draw_func_ptr draw,
+ size_type start,
+ size_type count);
+
//! draw sequence as a bar
void draw_track(GLfloat, GLfloat) const;
void draw_annotations(GLfloat, GLfloat) const;
*/
void draw_sequence(GLfloat, GLfloat) const;
};
+
+void draw_track(SeqSpanRef ref, float left, float right);
+void draw_narrow_track(SeqSpanRef ref, float left, float right);
#endif