Java Rectangle expand(Rectangle rectangle, int expansion)

Here you can find the source of expand(Rectangle rectangle, int expansion)

Description

expand

License

Open Source License

Declaration

public static void expand(Rectangle rectangle, int expansion) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Rectangle;

public class Main {
    public static void expand(Rectangle rectangle, int expansion) {
        rectangle.x -= expansion;//w w  w  .ja  va2  s. co m
        rectangle.y -= expansion;
        rectangle.width += expansion * 2;
        rectangle.height += expansion * 2;
    }
}

Related

  1. alignsVertically(Rectangle r1, Rectangle r2)
  2. clip(int x, int y, int w, int h)
  3. computeDifference(Rectangle rectA, Rectangle rectB)
  4. expand(final Rectangle rect, final int expansion)
  5. expand(Rectangle rect, int amount)
  6. firstSmallerThanSecond(java.awt.Rectangle first, java.awt.Rectangle second)
  7. flip(Dimension view, Rectangle rect, int direction)
  8. formatRect(Rectangle rc)
  9. formatRectangle(Rectangle rect)