[AD] ALLEGRO_ALIGN_CENTRE and integer alignment

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi,

How should ALLEGRO_ALIGN_CENTRE behave now that we don't try to align
text drawing to integral offsets?  The user may pass in (x,y) which are
both integer-aligned, but because the text length is an odd value
(x - text_length*0.5) is no longer integer aligned.
You can see the effect in ex_audio_chain (the "Mixer" label).

One solution is use an integer division, so that
(x - text_length/2) remains integral if x was integral.

Any problem with that?

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/