Here you can find the source of clip(int x, int y, int w, int h)
public static void clip(int x, int y, int w, int h)
//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; } }