Java Rectangle expand(Rectangle rect, int amount)

Here you can find the source of expand(Rectangle rect, int amount)

Description

expand

License

Apache License

Declaration

public static Rectangle expand(Rectangle rect, int amount) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.*;

public class Main {
    public static Rectangle expand(Rectangle rect, int amount) {
        return new Rectangle(rect.x - amount, rect.y - amount, rect.width + amount * 2, rect.height + amount * 2);
    }//from   ww  w .ja va  2 s. c  o  m
}

Related

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