def draw_foreground
      case @justify
        when :left
          rel_x = 0.0
          draw_x = x + padding_left

        when :right
          rel_x = 1.0
          draw_x = x + rect.width - padding_right

        when :center
          rel_x = 0.5
          draw_x = (x + padding_left) + (rect.width - padding_right - padding_left) / 2.0
      end

      font.draw_rel(@text, draw_x, y + padding_top, z, rel_x, 0, 1, 1, color)
    end
def draw_foreground
      case @justify
        when :left
          rel_x = 0.0
          draw_x = x + padding_left

        when :right
          rel_x = 1.0
          draw_x = x + rect.width - padding_right

        when :center
          rel_x = 0.5
          draw_x = (x + padding_left) + (rect.width - padding_right - padding_left) / 2.0
      end

      font.draw_rel(@text, draw_x, y + padding_top, z, rel_x, 0, 1, 1, color)
    end
@param (see Element#initialize)
 @param [String] text The string to display in the line of text.

 @option (see Element#initialize)
 @option options [:left, :right, :center] :justify (:left) Text justification.