Does Qt have a built-in way to inflate or grow a rectangle? Like .NET's Rectangle.Inflate
or Java's Rectangle.grow
... or do I have to implement my own? I've looked through the docs and couldn't find one but maybe I'm missing something.
views:
58answers:
1
+6
A:
There seems to be an adjust
function that comes closest to what you want. You could easily use it to "inflate" a rectangle:
rect.adjust(-dx, -dy, dx, dy);
where dx
and dy
are the amounts you want to inflate in the x and y directions.
casablanca
2010-09-13 02:17:50
This seems about the best. Thanks.
Jake Petroules
2010-09-13 03:55:29