edu.umd.cs.piccolox.util
Class PFixedWidthStroke

java.lang.Object
  extended by edu.umd.cs.piccolox.util.PFixedWidthStroke
All Implemented Interfaces:
java.awt.Stroke, java.io.Serializable

public class PFixedWidthStroke
extends java.lang.Object
implements java.awt.Stroke, java.io.Serializable

PFixedWidthStroke is the same as java.awt.BasicStroke except that PFixedWidthStroke has a fixed width on the screen so that even when the canvas view is zooming its width stays the same in canvas coordinates. Note that this stroke draws in the inside of the stroked shape, instead of the normal draw on center behavior.

Version:
1.0
Author:
Jesse Grosjean
See Also:
PPath, Serialized Form

Nested Class Summary
 class PFixedWidthStroke.FillAdapter
           
 
Field Summary
static int CAP_BUTT
           
static int CAP_ROUND
           
static int CAP_SQUARE
           
static int JOIN_BEVEL
           
static int JOIN_MITER
           
static int JOIN_ROUND
           
static int[] RasterizerCaps
           
static int[] RasterizerCorners
           
 
Constructor Summary
PFixedWidthStroke()
           
PFixedWidthStroke(float width)
           
PFixedWidthStroke(float width, int cap, int join)
           
PFixedWidthStroke(float width, int cap, int join, float miterlimit)
           
PFixedWidthStroke(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase)
           
 
Method Summary
 java.lang.Object clone()
           
 java.awt.Shape createStrokedShape(java.awt.Shape s)
           
 boolean equals(java.lang.Object obj)
           
 float[] getDashArray()
           
 float getDashPhase()
           
 int getEndCap()
           
 int getLineJoin()
           
 float getLineWidth()
           
 float getMiterLimit()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOIN_MITER

public static final int JOIN_MITER
See Also:
Constant Field Values

JOIN_ROUND

public static final int JOIN_ROUND
See Also:
Constant Field Values

JOIN_BEVEL

public static final int JOIN_BEVEL
See Also:
Constant Field Values

CAP_BUTT

public static final int CAP_BUTT
See Also:
Constant Field Values

CAP_ROUND

public static final int CAP_ROUND
See Also:
Constant Field Values

CAP_SQUARE

public static final int CAP_SQUARE
See Also:
Constant Field Values

RasterizerCaps

public static final int[] RasterizerCaps

RasterizerCorners

public static final int[] RasterizerCorners
Constructor Detail

PFixedWidthStroke

public PFixedWidthStroke()

PFixedWidthStroke

public PFixedWidthStroke(float width)

PFixedWidthStroke

public PFixedWidthStroke(float width,
                         int cap,
                         int join)

PFixedWidthStroke

public PFixedWidthStroke(float width,
                         int cap,
                         int join,
                         float miterlimit)

PFixedWidthStroke

public PFixedWidthStroke(float width,
                         int cap,
                         int join,
                         float miterlimit,
                         float[] dash,
                         float dash_phase)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

createStrokedShape

public java.awt.Shape createStrokedShape(java.awt.Shape s)
Specified by:
createStrokedShape in interface java.awt.Stroke

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getDashArray

public float[] getDashArray()

getDashPhase

public float getDashPhase()

getEndCap

public int getEndCap()

getLineJoin

public int getLineJoin()

getLineWidth

public float getLineWidth()

getMiterLimit

public float getMiterLimit()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2008 by University of Maryland, College Park, MD 20742, USA All rights reserved.