mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
particle: all particles now take margin arguments
Ramp and map however, doesn't allow any values other than 0 (yet).
This commit is contained in:
parent
bd251cbf9f
commit
3135f1d36d
5 changed files with 56 additions and 52 deletions
|
@ -59,9 +59,14 @@ instantiate(const struct particle *particle, const struct tag_set *tags)
|
|||
}
|
||||
|
||||
struct particle *
|
||||
particle_ramp_new(const char *tag, struct particle *particles[], size_t count)
|
||||
particle_ramp_new(const char *tag, struct particle *particles[], size_t count,
|
||||
int left_margin, int right_margin)
|
||||
{
|
||||
struct particle *particle = particle_common_new(0, 0, NULL);
|
||||
assert(left_margin == 0 && right_margin == 0
|
||||
&& "ramp: margins not implemented");
|
||||
|
||||
struct particle *particle = particle_common_new(
|
||||
left_margin, right_margin, NULL);
|
||||
particle->destroy = &particle_destroy;
|
||||
particle->instantiate = &instantiate;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue