com.tensegrity.graphics.device.swt
Class SWTPatternContext

java.lang.Object
  extended bycom.tensegrity.graphics.device.swt.SWTPatternContext

public class SWTPatternContext
extends java.lang.Object

Instances of SWTPatternContext are used in order to render Patterns in the SWT context. The ImageData in fill(ImageData, int, int, int, int) is updated pixel per pixel depending on the Pattern passed to the constructor.

Version:
$Id: SWTPatternContext.java,v 1.1 2004/12/02 14:47:11 SebastienGuyon Exp $
Author:
S�bastien Guyon
See Also:
Pattern

Constructor Summary
SWTPatternContext(Pattern pattern, org.eclipse.swt.graphics.Rectangle rcPaint)
           Default constructor initializing this context with the Pattern to be rendered and the area where it should be rendered.
 
Method Summary
 void fill(org.eclipse.swt.graphics.ImageData imageData, int x, int y, int w, int h)
           Method used to fill an ImageData with a specific Pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWTPatternContext

public SWTPatternContext(Pattern pattern,
                         org.eclipse.swt.graphics.Rectangle rcPaint)

Default constructor initializing this context with the Pattern to be rendered and the area where it should be rendered.

Parameters:
pattern - the Pattern to render.
rcPaint - the area on which the Pattern is rendered.
Method Detail

fill

public void fill(org.eclipse.swt.graphics.ImageData imageData,
                 int x,
                 int y,
                 int w,
                 int h)

Method used to fill an ImageData with a specific Pattern. The ImageData passed as parameter is updated pixel per pixel depending on the Pattern passed to the constructor.

Parameters:
imageData - the ImageData to render the Pattern into.
x - the x coordinate of the area in device space for which the Pattern is generated.
y - the y coordinate of the area in device space for which the Pattern is generated.
w - the width of the area in device space
h - the height of the area in device space


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.