Some functions have multiple variants like love.graphics.push. These variants sometimes have their descriptions on the wiki. The question is how to handle these in the documentation.
My suggestion would be this:
{
name='push',
description='Copies and pushes the current coordinate transformation to the transformation stack.\n\nThis function is always used to prepare for a corresponding pop operation later. It stores the current coordinate transformation state into the transformation stack and keeps it active. Later changes to the transformation can be undone by using the pop operation, which returns the coordinate transform to the state it was in before calling push.',
functions= {
{
description='Pushes the current transformation to the transformation stack.',
},
{ description='Pushes a specific type of state to the stack.',
arguments= {
{
type='StackType',
name='stack',
description='The type of stack to push (e.g. just transformation state, or all love.graphics state).'
},
}
}
}
},
Some functions have multiple variants like love.graphics.push. These variants sometimes have their descriptions on the wiki. The question is how to handle these in the documentation.
My suggestion would be this:
{ name='push', description='Copies and pushes the current coordinate transformation to the transformation stack.\n\nThis function is always used to prepare for a corresponding pop operation later. It stores the current coordinate transformation state into the transformation stack and keeps it active. Later changes to the transformation can be undone by using the pop operation, which returns the coordinate transform to the state it was in before calling push.', functions= { { description='Pushes the current transformation to the transformation stack.', }, { description='Pushes a specific type of state to the stack.', arguments= { { type='StackType', name='stack', description='The type of stack to push (e.g. just transformation state, or all love.graphics state).' }, } } } },