com.tensegrity.graphics.device.awt
Class AWTPatternPaintContext

java.lang.Object
  extended bycom.tensegrity.graphics.device.awt.AWTPaintContext
      extended bycom.tensegrity.graphics.device.awt.AWTPatternPaintContext
All Implemented Interfaces:
java.awt.PaintContext

public class AWTPatternPaintContext
extends com.tensegrity.graphics.device.awt.AWTPaintContext

The AWTPatternPaintContext is an implementation of the PaintContext interface that is used by the AWTDevice to render patterns.

Version:
$Id: AWTPatternPaintContext.java,v 1.3 2004/03/24 16:06:53 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
protected  int alpha
          instance variable for the alpha value when writing a pixel
static java.awt.image.ColorModel argbmodel
          constant that defines a ColorModel that do support alpha values
protected  double transparency
          instance variable for the transparency level in percent
protected  int txOrg
          instance variable for the origin translation in x direction
protected  int tyOrg
          instance variable for the origin translation in y direction
static java.awt.image.ColorModel xrgbmodel
          constant that defines a ColorModel that do not support alpha values
 
Constructor Summary
AWTPatternPaintContext(Pattern pattern, java.awt.Rectangle rcPaint, int transparency)
          Constructor that creates a AWTPatternPaintContext with the Pattern given by pattern, the transparency level given by transparency that renders within the Rectangle given by rcPaint.
 
Method Summary
 void dispose()
           
 java.awt.image.ColorModel getColorModel()
           
 java.awt.image.Raster getRaster(int x, int y, int w, int h)
           
 void setColorModel(boolean hasAlpha)
          Sets the ColorModel for the AWTPaintContext with respect to the flag given by hasAlpha that indicates whether the AWTPaintContext should support transparency or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xrgbmodel

public static java.awt.image.ColorModel xrgbmodel
constant that defines a ColorModel that do not support alpha values


argbmodel

public static java.awt.image.ColorModel argbmodel
constant that defines a ColorModel that do support alpha values


transparency

protected double transparency
instance variable for the transparency level in percent


alpha

protected int alpha
instance variable for the alpha value when writing a pixel


txOrg

protected int txOrg
instance variable for the origin translation in x direction


tyOrg

protected int tyOrg
instance variable for the origin translation in y direction

Constructor Detail

AWTPatternPaintContext

public AWTPatternPaintContext(Pattern pattern,
                              java.awt.Rectangle rcPaint,
                              int transparency)
Constructor that creates a AWTPatternPaintContext with the Pattern given by pattern, the transparency level given by transparency that renders within the Rectangle given by rcPaint.

Parameters:
pattern - the Pattern to use
rcPaint - the Rectangle to render within
transparency - the transparency level given in percent
Method Detail

getRaster

public java.awt.image.Raster getRaster(int x,
                                       int y,
                                       int w,
                                       int h)

setColorModel

public void setColorModel(boolean hasAlpha)
Sets the ColorModel for the AWTPaintContext with respect to the flag given by hasAlpha that indicates whether the AWTPaintContext should support transparency or not.

Parameters:
hasAlpha - flag that indicates whether alpha values should be supported or not

dispose

public void dispose()
Specified by:
dispose in interface java.awt.PaintContext

getColorModel

public java.awt.image.ColorModel getColorModel()
Specified by:
getColorModel in interface java.awt.PaintContext


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