facundobatista/yaswfp — pull request #6 by yonomitt (2014-09-10 08:37:24+00:00)
Title: RECT is composed of signed-bit values

To facilitate calculating the twos compliments for the RECT values, the nBits used for the rect should also be returned. This is more important for RECTs with negative minX or minY values. This implementation returns a tuple where the first element is the nBits value and the second element is the original tuple of values for the RECT.

I decided to keep the values for the RECT in the tuple, to make compatibility easier. The other option would be to make the RECT structure a dictionary or object giving labels to each value and including the nBits within it.

I have also updated the tests, since they were originally not expecting these nBit values.