Java Rectangle clip(int x, int y, int w, int h)

Here you can find the source of clip(int x, int y, int w, int h)

Description

clip

License

Open Source License

Declaration

public static void clip(int x, int y, int w, int h) 

Method Source Code

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

import java.awt.Rectangle;

public class Main {
    public static int cX = 0;
    public static int cY = 0;
    public static int cW = 1;
    public static int cH = 1;
    public static Rectangle clip = new Rectangle(0, 0, 1, 1);

    public static void clip(int x, int y, int w, int h) {
        cX = x;/*from w  w w. ja v a2 s .  c o  m*/
        cY = y;
        cW = w;
        cH = h;
        clip.x = x;
        clip.y = y;
        clip.width = w;
        clip.height = h;
    }
}

Related

  1. addTo(Insets i1, Insets i2)
  2. alignComponentsBaseHorizontal(Component left, Component right)
  3. alignsVertically(Rectangle r1, Rectangle r2)
  4. computeDifference(Rectangle rectA, Rectangle rectB)
  5. expand(final Rectangle rect, final int expansion)
  6. expand(Rectangle rect, int amount)
  7. expand(Rectangle rectangle, int expansion)