Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::Graphics::BasicChromosome::ChromosomeSegment::_draw_segment (   self,
) [private]

Draw the current chromosome segment.

Reimplemented in Bio::Graphics::BasicChromosome::TelomereSegment.

Definition at line 338 of file BasicChromosome.py.

00338                                         :
        """Draw the current chromosome segment.
        # set the coordinates of the segment -- it'll take up the left part
        # of the space we have.
        segment_x = self.start_x_position
        segment_y = self.end_y_position
        segment_width = (self.end_x_position - self.start_x_position) \
                        * self.chr_percent
        segment_height = self.start_y_position - self.end_y_position
        # first draw the sides of the segment
        right_line = Line(segment_x, segment_y,
                          segment_x, segment_y + segment_height)
        left_line = Line(segment_x + segment_width, segment_y,
                         segment_x + segment_width, segment_y + segment_height)
        # now draw the box, if it is filled in
        if self.fill_color is not None:
            fill_rectangle = Rect(segment_x, segment_y,
                                  segment_width, segment_height)
            fill_rectangle.fillColor = self.fill_color
            fill_rectangle.strokeColor = None

    def _draw_label(self, cur_drawing):

Generated by  Doxygen 1.6.0   Back to index