mfenniak/pyPdf — Issue #40: Bug and improvement in RectangleObject getWidth() and getHeight()
Author: etienned
Created: 2012-02-24 16:03:49+00:00
State: open

In generic.py on line 727, it's like that:

```python
def getHeight(self):
return self.getUpperRight_y() - self.getLowerLeft_x()
```

And should be like that (the "x" change to "y" at the end):

```python
def getHeight(self):
return self.getUpperRight_y() - self.getLowerLeft_y()
```

Also both `getWidth()` and `getHeight()` output should be wrap in `abs()` like that:

```python
def getHeight(self):
return abs(self.getUpperRight_y() - self.getLowerLeft_y())
```

And we could add properties to make the thing more pleasant:

```python
@property
def width(self):
return self.getWidth()

@property
def height(self):
return self.getHeight()
```