Project

General

Profile

Download (1.19 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.draw2d;
12

    
13
import org.eclipse.draw2d.geometry.Rectangle;
14

    
15
/**
16
 * Provides a {@link org.eclipse.draw2d.Graphics} object for painting.
17
 */
18
public interface GraphicsSource {
19

    
20
	/**
21
	 * Returns a Graphics for the rectangular region requested. May return
22
	 * <code>null</code>.
23
	 * 
24
	 * @param region
25
	 *            The rectangular region
26
	 * @return A new Graphics object for the given region
27
	 */
28
	Graphics getGraphics(Rectangle region);
29

    
30
	/**
31
	 * Tells the GraphicsSource that you have finished using that region.
32
	 * 
33
	 * @param region
34
	 *            The rectangular region that that no longer needs the Graphics
35
	 */
36
	void flushGraphics(Rectangle region);
37

    
38
}
(79-79/171)