JHotDraw 7.4.1

org.jhotdraw.samples.svg
Class RadialGradient

java.lang.Object
  extended by org.jhotdraw.samples.svg.RadialGradient
All Implemented Interfaces:
java.lang.Cloneable, Gradient

public class RadialGradient
extends java.lang.Object
implements Gradient

Represents an SVG RadialGradient.

Version:
$Id: RadialGradient.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Constructor Summary
RadialGradient()
          Creates a new instance.
RadialGradient(double cx, double cy, double fx, double fy, double r, double[] stopOffsets, java.awt.Color[] stopColors, double[] stopOpacities, boolean isRelativeToFigureBounds, java.awt.geom.AffineTransform tx)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 boolean equals(RadialGradient that)
           
 double getCX()
           
 double getCY()
           
 double getFX()
           
 double getFY()
           
 java.awt.Paint getPaint(Figure f, double opacity)
           
 double getR()
           
 java.awt.Color[] getStopColors()
           
 double[] getStopOffsets()
           
 double[] getStopOpacities()
           
 java.awt.geom.AffineTransform getTransform()
           
 int hashCode()
           
 boolean isRelativeToFigureBounds()
           
 void makeRelativeToFigureBounds(Figure f)
           
 void setGradientCircle(double cx, double cy, double r)
           
 void setRelativeToFigureBounds(boolean b)
           
 void setStops(double[] offsets, java.awt.Color[] colors, double[] stopOpacities)
           
 void setTransform(java.awt.geom.AffineTransform tx)
           
 void transform(java.awt.geom.AffineTransform tx)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadialGradient

public RadialGradient()
Creates a new instance.


RadialGradient

public RadialGradient(double cx,
                      double cy,
                      double fx,
                      double fy,
                      double r,
                      double[] stopOffsets,
                      java.awt.Color[] stopColors,
                      double[] stopOpacities,
                      boolean isRelativeToFigureBounds,
                      java.awt.geom.AffineTransform tx)
Method Detail

setGradientCircle

public void setGradientCircle(double cx,
                              double cy,
                              double r)

setStops

public void setStops(double[] offsets,
                     java.awt.Color[] colors,
                     double[] stopOpacities)

setRelativeToFigureBounds

public void setRelativeToFigureBounds(boolean b)

makeRelativeToFigureBounds

public void makeRelativeToFigureBounds(Figure f)
Specified by:
makeRelativeToFigureBounds in interface Gradient

getPaint

public java.awt.Paint getPaint(Figure f,
                               double opacity)
Specified by:
getPaint in interface Gradient

getCX

public double getCX()

getCY

public double getCY()

getFX

public double getFX()

getFY

public double getFY()

getR

public double getR()

getStopOffsets

public double[] getStopOffsets()

getStopColors

public java.awt.Color[] getStopColors()

getStopOpacities

public double[] getStopOpacities()

isRelativeToFigureBounds

public boolean isRelativeToFigureBounds()
Specified by:
isRelativeToFigureBounds in interface Gradient

setTransform

public void setTransform(java.awt.geom.AffineTransform tx)

getTransform

public java.awt.geom.AffineTransform getTransform()

transform

public void transform(java.awt.geom.AffineTransform tx)
Specified by:
transform in interface Gradient

clone

public java.lang.Object clone()
Specified by:
clone in interface Gradient
Overrides:
clone in class java.lang.Object

hashCode

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

equals

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

equals

public boolean equals(RadialGradient that)

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.