graphf-number-format

graphf-number-format —

Synopsis




struct      GraphfNumberFormat;
void        graphf_number_format_get_from_range
                                            (GraphfNumberFormat *format_out,
                                             double start,
                                             double end,
                                             double count);
void        graphf_number_format_render_by_val
                                            (const GraphfNumberFormat *format,
                                             double value,
                                             char *buf,
                                             unsigned                  len);
void        graphf_number_format_render_by_index
                                            (const GraphfNumberFormat *format,
                                             unsigned                  index,
                                             char *buf,
                                             unsigned                  len);
void        graphf_number_render_by_val_and_step
                                            (double value,
                                             double step,
                                             char *buf,
                                             unsigned                  len);
double      graphf_number_format_nth        (const GraphfNumberFormat *format,
                                             unsigned                  index);

Description

Details

struct GraphfNumberFormat

struct GraphfNumberFormat {

  int least_digit;		/* 0 means that the 1s digit is the least to display */
  int istep;			/* 1,2,5 */
  double first;
  double step;
  double last;
  unsigned count;
};


graphf_number_format_get_from_range ()

void        graphf_number_format_get_from_range
                                            (GraphfNumberFormat *format_out,
                                             double start,
                                             double end,
                                             double count);

format_out:
start:
end:
count:

graphf_number_format_render_by_val ()

void        graphf_number_format_render_by_val
                                            (const GraphfNumberFormat *format,
                                             double value,
                                             char *buf,
                                             unsigned                  len);

format:
value:
buf:
Param4:

graphf_number_format_render_by_index ()

void        graphf_number_format_render_by_index
                                            (const GraphfNumberFormat *format,
                                             unsigned                  index,
                                             char *buf,
                                             unsigned                  len);

format:
Param2:
buf:
Param4:

graphf_number_render_by_val_and_step ()

void        graphf_number_render_by_val_and_step
                                            (double value,
                                             double step,
                                             char *buf,
                                             unsigned                  len);

value:
step:
buf:
Param4:

graphf_number_format_nth ()

double      graphf_number_format_nth        (const GraphfNumberFormat *format,
                                             unsigned                  index);

format:
Param2:
Returns :