Here you can find the source of drawMask(Graphics2D g2, Shape mask)
private static void drawMask(Graphics2D g2, Shape mask)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Australian Nuclear Science and Technology Organisation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * //from w w w. j av a 2s .c o m * Contributors: * Norman Xiong (nxi@Bragg Institute) - initial API and implementation ******************************************************************************/ import java.awt.Graphics2D; import java.awt.Shape; public class Main { private static void drawMask(Graphics2D g2, Shape mask) { g2.fill(mask); } }