add rect.inset(dx, dy)
git-svn-id: http://skia.googlecode.com/svn/trunk@1058 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
3eb291455c
commit
f81401763e
@ -232,6 +232,15 @@ struct GrRect {
|
||||
fRight += tx; fBottom += ty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inset the rectangle by dx,dy. If dx > 0 the rect becomes narrower,
|
||||
* if dx < 0 the rect becomes wider.
|
||||
*/
|
||||
void inset(GrScalar dx, GrScalar dy) {
|
||||
fLeft += dx; fTop += dy;
|
||||
fRight -= dx; fBottom -= dy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a rectangle to a point.
|
||||
* @param pt the point used to initialize the rectangle.
|
||||
|
Loading…
Reference in New Issue
Block a user