Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void axis_draw_log_indicator ( Plot plot,
Axis axis 
)

Write "log" at the end of a log axis.

Parameters:
plot The Plot on which the axes are to be drawn.
axis The Axis to be labelled.

Definition at line 651 of file axis.c.

References axis_get_text_height(), axis_get_text_width(), AXIS_LOG, _Axis::font, _Axis::gc, _Plot::i_origin, _Plot::i_size, _Plot::j_origin, _Plot::j_size, _Axis::orientation, _Plot::pixmap, _Axis::type, and X_AXIS.

Referenced by axis_draw_log_indicator_xy().

{
  gint text_height;
  gint text_width;
  gint text_ip;
  gint text_jp;
  
  text_height = axis_get_text_height(axis->font, AXIS_LOG_TYPE_LABEL,
                                     axis->orientation);
  text_width = axis_get_text_width(axis->font, AXIS_LOG_TYPE_LABEL,
                                   axis->orientation);

  if (axis->orientation == X_AXIS)
    {
      text_ip = plot->i_origin + plot->i_size - text_width;
      text_jp = plot->j_origin;
    }
  else
    {
      text_ip = plot->i_origin - text_width;
      text_jp = plot->j_origin - plot->j_size;
    }

  if (axis->type == AXIS_LOG)
    gdk_draw_text(plot->pixmap, axis->font, axis->gc,
                  text_ip, text_jp+text_height,
                  AXIS_LOG_TYPE_LABEL, strlen(AXIS_LOG_TYPE_LABEL));
}


Generated by  Doxygen 1.6.0   Back to index