Ejemplo n.º 1
0
void
stp_array_copy(stp_array_t *dest, const stp_array_t *source)
{
  check_array(dest);
  check_array(source);

  dest->x_size = source->x_size;
  dest->y_size = source->y_size;
  if (dest->data)
    stp_sequence_destroy(dest->data);
  dest->data = stp_sequence_create_copy(source->data);
}
Ejemplo n.º 2
0
void
stp_curve_copy(stp_curve_t *dest, const stp_curve_t *source)
{
  CHECK_CURVE(dest);
  CHECK_CURVE(source);
  curve_dtor(dest);
  dest->curve_type = source->curve_type;
  dest->wrap_mode = source->wrap_mode;
  dest->gamma = source->gamma;
  dest->seq = stp_sequence_create_copy(source->seq);
  dest->piecewise = source->piecewise;
  dest->recompute_interval = 1;
}