com.davisor.graphics
Class PixelGraphics

java.lang.Object
  extended bycom.davisor.graphics.PixelGraphics

public class PixelGraphics
extends java.lang.Object

PixelGraphics implements a convenience Graphics2D tool that allows pixel-level drawing on graphic context with custom affine transformations. The operations in this class provide compute location coordinates with the graphics' context's current transformation, and then they draw the shape by identity transformation. This affects, in particular, the stroke and font settings.

Since:
JDK1.2

Field Summary
static java.awt.geom.AffineTransform I
          Identity transformation.
 
Constructor Summary
PixelGraphics(java.awt.Graphics2D graphics)
          Creates a new pixel graphics that targets the given graphics' context.
 
Method Summary
 void clearRect(float x, float y, int width, int height)
           
 void clipRect(float x, float y, int width, int height)
           
 void draw(java.awt.Shape shape)
           
 void draw3DRect(float x, float y, int width, int height, boolean raised)
           
 void drawArc(float x, float y, int width, int height, int startAngle, int arcAngle)
           
 void drawLine(float x1, float y1, float x2, float y2)
           
 void drawOval(float x, float y, int width, int height)
           
 void drawRect(float x, float y, int width, int height)
           
 void drawString(java.lang.String str, float x, float y)
           
 void fill3DRect(float x, float y, int width, int height, boolean raised)
           
 void fillArc(float x, float y, int width, int height, int startAngle, int arcAngle)
           
 void fillOval(float x, float y, int width, int height)
           
 void fillRect(float x, float y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

I

public static final java.awt.geom.AffineTransform I
Identity transformation.

Constructor Detail

PixelGraphics

public PixelGraphics(java.awt.Graphics2D graphics)
Creates a new pixel graphics that targets the given graphics' context.

Method Detail

clearRect

public void clearRect(float x,
                      float y,
                      int width,
                      int height)

clipRect

public void clipRect(float x,
                     float y,
                     int width,
                     int height)

draw

public void draw(java.awt.Shape shape)

draw3DRect

public void draw3DRect(float x,
                       float y,
                       int width,
                       int height,
                       boolean raised)

drawArc

public void drawArc(float x,
                    float y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)

drawLine

public void drawLine(float x1,
                     float y1,
                     float x2,
                     float y2)

drawOval

public void drawOval(float x,
                     float y,
                     int width,
                     int height)

drawRect

public void drawRect(float x,
                     float y,
                     int width,
                     int height)

drawString

public void drawString(java.lang.String str,
                       float x,
                       float y)

fill3DRect

public void fill3DRect(float x,
                       float y,
                       int width,
                       int height,
                       boolean raised)

fillArc

public void fillArc(float x,
                    float y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)

fillOval

public void fillOval(float x,
                     float y,
                     int width,
                     int height)

fillRect

public void fillRect(float x,
                     float y,
                     int width,
                     int height)


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.