eu.hansolo.steelseries.gauges.Radial1Vertical Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SteelSeries Show documentation
Show all versions of SteelSeries Show documentation
The SteelSeries is a javabeans component library that contains gauges.
You will find linear and radial gauges. In addition you will also find
digital displays, indicators from cars and some instruments from airplanes and
sailboats.
package eu.hansolo.steelseries.gauges;
/**
*
* @author hansolo
*/
public final class Radial1Vertical extends AbstractRadial
{
private final double FREE_AREA_ANGLE; // area where no tickmarks will be painted
private double angleStep;
private static final double TICKMARK_OFFSET = 0.75 * Math.PI;
private final double ROTATION_OFFSET; // Offset for the pointer
private int tickLabelPeriod; // Draw value at every nth tickmark
private final java.awt.geom.Point2D CENTER;
private final java.awt.geom.Point2D TRACK_OFFSET;
private final java.awt.GraphicsConfiguration GFX_CONF;
private java.awt.image.BufferedImage frameImage;
private java.awt.image.BufferedImage backgroundImage;
private java.awt.image.BufferedImage postsImage;
private java.awt.image.BufferedImage trackImage;
private java.awt.image.BufferedImage tickmarksImage;
private java.awt.image.BufferedImage pointerImage;
private java.awt.image.BufferedImage pointerShadowImage;
private java.awt.image.BufferedImage foregroundImage;
private java.awt.image.BufferedImage thresholdImage;
private java.awt.image.BufferedImage minMeasuredImage;
private java.awt.image.BufferedImage maxMeasuredImage;
private java.awt.image.BufferedImage disabledImage;
private double angle = 0;
public Radial1Vertical()
{
super();
FREE_AREA_ANGLE = 0;
ROTATION_OFFSET = (1.75 * Math.PI) + (FREE_AREA_ANGLE / 2.0);
tickLabelPeriod = 20;
CENTER = new java.awt.geom.Point2D.Double();
TRACK_OFFSET = new java.awt.geom.Point2D.Double();
GFX_CONF = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
setLedPositionX(0.455);
setLedPositionY(0.555);
setOrientation(eu.hansolo.steelseries.tools.Orientation.NORTH);
setGaugeType(eu.hansolo.steelseries.tools.GaugeType.TYPE1);
calcAngleStep();
init(getInnerBounds().width, getInnerBounds().height);
}
@Override
public final AbstractGauge init(final int WIDTH, final int HEIGHT)
{
if (frameImage != null)
{
frameImage.flush();
}
frameImage = create_FRAME_Image(WIDTH);
if (backgroundImage != null)
{
backgroundImage.flush();
}
backgroundImage = create_BACKGROUND_Image(WIDTH);
if (postsImage != null)
{
postsImage.flush();
}
postsImage = create_POSTS_Image(WIDTH, eu.hansolo.steelseries.tools.PostPosition.LOWER_CENTER, eu.hansolo.steelseries.tools.PostPosition.SMALL_GAUGE_MIN_LEFT, eu.hansolo.steelseries.tools.PostPosition.SMALL_GAUGE_MAX_RIGHT);
if (trackImage != null)
{
trackImage.flush();
}
TRACK_OFFSET.setLocation(0, 0);
CENTER.setLocation(getGaugeBounds().getCenterX(), HEIGHT * 0.73);
trackImage = create_TRACK_Image(WIDTH, getFreeAreaAngle() + Math.PI / 2, getTickmarkOffset(), getMinValue(), getMaxValue(), getAngleStep(), getTrackStart(), getTrackSection(), getTrackStop(), getTrackStartColor(), getTrackSectionColor(), getTrackStopColor(), 0.44f, CENTER, getTickmarkDirection(), TRACK_OFFSET);
if (tickmarksImage != null)
{
tickmarksImage.flush();
}
tickmarksImage = create_TICKMARKS_Image(WIDTH, FREE_AREA_ANGLE, TICKMARK_OFFSET, getMinValue(), getMaxValue(), angleStep, tickLabelPeriod, getScaleDividerPower(), isDrawTicks(), isDrawTickLabels(), getTickmarkSections(), 0.44f, -0.04f, new java.awt.geom.Point2D.Double(WIDTH / 2.0, WIDTH * 0.73));
if (pointerImage != null)
{
pointerImage.flush();
}
pointerImage = create_POINTER_Image(WIDTH, getPointerType());
if (pointerShadowImage != null)
{
pointerShadowImage.flush();
}
pointerShadowImage = create_POINTER_SHADOW_Image(WIDTH, getPointerType());
if (foregroundImage != null)
{
foregroundImage.flush();
}
foregroundImage = create_FOREGROUND_Image(WIDTH, false, getForegroundType());
if (thresholdImage != null)
{
thresholdImage.flush();
}
thresholdImage = create_THRESHOLD_Image(WIDTH);
if (minMeasuredImage != null)
{
minMeasuredImage.flush();
}
minMeasuredImage = create_MEASURED_VALUE_Image(WIDTH, new java.awt.Color(0, 23, 252, 255));
if (maxMeasuredImage != null)
{
maxMeasuredImage.flush();
}
maxMeasuredImage = create_MEASURED_VALUE_Image(WIDTH, new java.awt.Color(252, 29, 0, 255));
if (disabledImage != null)
{
disabledImage.flush();
}
disabledImage = create_DISABLED_Image(WIDTH);
createAreas();
createSections();
setCurrentLedImage(getLedImageOff());
return this;
}
@Override
protected void paintComponent(java.awt.Graphics g)
{
if (!isInitialized())
{
return;
}
final java.awt.Graphics2D G2 = (java.awt.Graphics2D) g.create();
G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_PURE);
G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
// Translate coordinate system related to insets
G2.translate(getInnerBounds().x, getInnerBounds().y);
CENTER.setLocation(getGaugeBounds().getCenterX(), getGaugeBounds().getCenterY());
final java.awt.geom.AffineTransform OLD_TRANSFORM = G2.getTransform();
// Draw the frame
if (isFrameVisible())
{
G2.drawImage(frameImage, 0, 0, null);
}
// Draw the background
if (isBackgroundVisible())
{
G2.drawImage(backgroundImage, 0, 0, null);
}
// Draw the area
if (isAreasVisible())
{
switch(getOrientation())
{
case NORTH:
G2.translate(0, CENTER.getY() / 2.2);
break;
case EAST:
break;
case SOUTH:
break;
case WEST:
G2.translate(CENTER.getX() / 2.2, 0);
break;
default:
G2.translate(0, CENTER.getY() / 2.2);
break;
}
for (eu.hansolo.steelseries.tools.Section area : getAreas())
{
G2.setColor(area.getColor());
G2.fill(area.getFilledArea());
}
G2.setTransform(OLD_TRANSFORM);
}
// Draw the sections
if (isSectionsVisible())
{
switch(getOrientation())
{
case NORTH:
G2.translate(0, CENTER.getY() / 2.2);
break;
case EAST:
break;
case SOUTH:
break;
case WEST:
G2.translate(CENTER.getX() / 2.2, 0);
break;
default:
G2.translate(0, CENTER.getY() / 2.2);
break;
}
for (eu.hansolo.steelseries.tools.Section section : getSections())
{
G2.setColor(section.getColor());
G2.fill(section.getSectionArea());
}
G2.setTransform(OLD_TRANSFORM);
}
// Draw title
final java.awt.font.FontRenderContext RENDER_CONTEXT = new java.awt.font.FontRenderContext(null, true, true);
if (!getTitle().isEmpty())
{
if (isLabelColorFromThemeEnabled())
{
G2.setColor(getBackgroundColor().LABEL_COLOR);
}
else
{
G2.setColor(getLabelColor());
}
G2.setFont(new java.awt.Font("Verdana", 0, (int) (0.04672897196261682 * getGaugeBounds().width)));
final java.awt.font.TextLayout TITLE_LAYOUT = new java.awt.font.TextLayout(getTitle(), G2.getFont(), RENDER_CONTEXT);
final java.awt.geom.Rectangle2D TITLE_BOUNDARY = TITLE_LAYOUT.getBounds();
G2.drawString(getTitle(), (float)((getGaugeBounds().width - TITLE_BOUNDARY.getWidth()) / 2.0), 0.4f * getGaugeBounds().width + TITLE_LAYOUT.getAscent() - TITLE_LAYOUT.getDescent());
}
// Draw unit string
if (!getUnitString().isEmpty())
{
if (isLabelColorFromThemeEnabled())
{
G2.setColor(getBackgroundColor().LABEL_COLOR);
}
else
{
G2.setColor(getLabelColor());
}
G2.setFont(new java.awt.Font("Verdana", 0, (int) (0.04672897196261682 * getGaugeBounds().width)));
final java.awt.font.TextLayout UNIT_LAYOUT = new java.awt.font.TextLayout(getUnitString(), G2.getFont(), RENDER_CONTEXT);
final java.awt.geom.Rectangle2D UNIT_BOUNDARY = UNIT_LAYOUT.getBounds();
G2.drawString(getUnitString(), (float)((getGaugeBounds().width - UNIT_BOUNDARY.getWidth()) / 2.0), 0.47f * getGaugeBounds().width + UNIT_LAYOUT.getAscent() - UNIT_LAYOUT.getDescent());
}
switch(getOrientation())
{
case NORTH:
break;
case EAST:
break;
case SOUTH:
break;
case WEST:
G2.rotate(-Math.PI / 2.0, CENTER.getX(), CENTER.getY());
break;
default:
break;
}
final java.awt.geom.AffineTransform FORMER_TRANSFORM = G2.getTransform();
// Draw the track
if (isTrackVisible())
{
G2.drawImage(trackImage, 0, 0, null);
}
// Draw the tickmarks
G2.drawImage(tickmarksImage, 0, 0, null);
// Draw threshold indicator
if (isThresholdVisible())
{
G2.rotate(ROTATION_OFFSET + (getThreshold() - getMinValue()) * angleStep, CENTER.getX(), getGaugeBounds().width * 0.7336448598);
G2.drawImage(thresholdImage, 0, 0, null);
G2.setTransform(FORMER_TRANSFORM);
}
// Draw min measured value indicator
if (isMinMeasuredValueVisible())
{
G2.rotate(ROTATION_OFFSET + (getMinMeasuredValue() - getMinValue()) * angleStep, CENTER.getX(), getGaugeBounds().width * 0.7336448598);
G2.drawImage(minMeasuredImage, 0, 0, null);
G2.setTransform(FORMER_TRANSFORM);
}
// Draw max measured value indicator
if (isMaxMeasuredValueVisible())
{
G2.rotate(ROTATION_OFFSET + (getMaxMeasuredValue() - getMinValue()) * angleStep, CENTER.getX(), getGaugeBounds().width * 0.7336448598);
G2.drawImage(maxMeasuredImage, 0, 0, null);
G2.setTransform(FORMER_TRANSFORM);
}
// Draw LED if enabled
if (isLedVisible())
{
G2.setTransform(OLD_TRANSFORM);
G2.drawImage(getCurrentLedImage(), (int) (getGaugeBounds().width * getLedPositionX()), (int) (getGaugeBounds().width * getLedPositionY()), null);
G2.setTransform(FORMER_TRANSFORM);
}
// Draw the pointer
angle = ROTATION_OFFSET + (getValue() - getMinValue()) * angleStep;
//G2.rotate(ANGLE + (Math.cos(Math.toRadians(ANGLE - ROTATION_OFFSET - 91.5))), CENTER.getX(), backgroundImage.getHeight() * 0.7336448598);
G2.rotate(angle, CENTER.getX(), getGaugeBounds().height * 0.7336448598 + 2);
G2.drawImage(pointerShadowImage, 0, 0, null);
G2.setTransform(FORMER_TRANSFORM);
G2.rotate(angle, CENTER.getX(), getGaugeBounds().height * 0.7336448598);
G2.drawImage(pointerImage, 0, 0, null);
G2.setTransform(FORMER_TRANSFORM);
// Draw posts
G2.drawImage(postsImage, 0, 0, null);
switch(getOrientation())
{
case NORTH:
break;
case EAST:
break;
case SOUTH:
break;
case WEST:
G2.setTransform(OLD_TRANSFORM);
break;
default:
break;
}
// Draw the foreground
if (isForegroundVisible())
{
G2.drawImage(foregroundImage, 0, 0, null);
}
if (!isEnabled())
{
G2.drawImage(disabledImage, 0, 0, null);
}
// Translate coordinate system back to original
G2.translate(-getInnerBounds().x, -getInnerBounds().y);
G2.dispose();
}
@Override
public eu.hansolo.steelseries.tools.GaugeType getGaugeType()
{
return eu.hansolo.steelseries.tools.GaugeType.TYPE1;
}
public int getTickLabelPeriod()
{
return this.tickLabelPeriod;
}
public void setTickLabelPeriod(final int TICK_LABEL_PERIOD)
{
this.tickLabelPeriod = TICK_LABEL_PERIOD;
init(getInnerBounds().width, getInnerBounds().height);
repaint(getInnerBounds());
}
/**
* Sets the orientation of the gauge as an int value that is defined in javax.swing.SwingUtilities
* 1 => NORTH => Pointer rotation center placed on the bottom of the gauge
* 3 => EAST => Pointer rotation center placed on the left side of the gauge
* 5 => SOUTH => Pointer rotation center placed on the top of the gauge
* 7 => WEST => Pointer rotation center placed on the left side of the gauge
* @param ORIENTATION
*/
@Override
public void setOrientation(final eu.hansolo.steelseries.tools.Orientation ORIENTATION)
{
super.setOrientation(ORIENTATION);
switch(ORIENTATION)
{
case NORTH:
setLedPositionX(0.455);
setLedPositionY(0.555);
break;
case EAST:
break;
case SOUTH:
break;
case WEST:
setLedPositionX(0.455);
setLedPositionY(0.555);
break;
default:
setLedPositionX(0.455);
setLedPositionY(0.555);
break;
}
init(getInnerBounds().width, getInnerBounds().height);
repaint(getInnerBounds());
}
protected final void calcAngleStep()
{
angleStep = (Math.PI / 2.0 - FREE_AREA_ANGLE) / (getMaxValue() - getMinValue());
}
@Override
public java.awt.geom.Point2D getCenter()
{
return new java.awt.geom.Point2D.Double(backgroundImage.getWidth() / 2.0, backgroundImage.getHeight() / 2.0);
}
@Override
public java.awt.geom.Rectangle2D getBounds2D()
{
return new java.awt.geom.Rectangle2D.Double(backgroundImage.getMinX(), backgroundImage.getMinY(), backgroundImage.getWidth(), backgroundImage.getHeight());
}
private void createAreas()
{
if (!getAreas().isEmpty() && backgroundImage != null)
{
final double ORIGIN_CORRECTION;
switch(getOrientation())
{
case NORTH:
ORIGIN_CORRECTION = 135;
break;
case EAST:
ORIGIN_CORRECTION = 135;
break;
case SOUTH:
ORIGIN_CORRECTION = 135;
break;
case WEST:
ORIGIN_CORRECTION = 225;
break;
default:
ORIGIN_CORRECTION = 135;
break;
}
final double RADIUS = backgroundImage.getWidth() * 0.44f - backgroundImage.getWidth() * 0.04f;
final double FREE_AREA = backgroundImage.getWidth() / 2.0 - RADIUS;
for (eu.hansolo.steelseries.tools.Section tmpArea : getAreas())
{
final double ANGLE_START = ORIGIN_CORRECTION - (tmpArea.getStart() * Math.toDegrees(angleStep));
final double ANGLE_EXTEND = -(tmpArea.getStop() - tmpArea.getStart()) * Math.toDegrees(angleStep);
final java.awt.geom.Arc2D AREA = new java.awt.geom.Arc2D.Double(java.awt.geom.Arc2D.PIE);
final java.awt.geom.Rectangle2D AREA_FRAME = new java.awt.geom.Rectangle2D.Double(backgroundImage.getMinX() + FREE_AREA, backgroundImage.getMinY() + FREE_AREA, 2 * RADIUS, 2 * RADIUS);
AREA.setFrame(AREA_FRAME);
AREA.setAngleStart(ANGLE_START);
AREA.setAngleExtent(ANGLE_EXTEND);
tmpArea.setFilledArea(new java.awt.geom.Arc2D.Double(AREA_FRAME, ANGLE_START, ANGLE_EXTEND, java.awt.geom.Arc2D.PIE));
}
}
}
private void createSections()
{
if (!getSections().isEmpty() && backgroundImage != null)
{
final double ORIGIN_CORRECTION;
switch(getOrientation())
{
case NORTH:
ORIGIN_CORRECTION = 135;
break;
case EAST:
ORIGIN_CORRECTION = 135;
break;
case SOUTH:
ORIGIN_CORRECTION = 135;
break;
case WEST:
ORIGIN_CORRECTION = 225;
break;
default:
ORIGIN_CORRECTION = 135;
break;
}
final double OUTER_RADIUS = backgroundImage.getWidth() * 0.44f;
final double INNER_RADIUS = backgroundImage.getWidth() * 0.44f - backgroundImage.getWidth() * 0.04f;
final double FREE_AREA_OUTER_RADIUS = backgroundImage.getWidth() / 2.0 - OUTER_RADIUS;
final double FREE_AREA_INNER_RADIUS = backgroundImage.getWidth() / 2.0 - INNER_RADIUS;
final java.awt.geom.Ellipse2D INNER = new java.awt.geom.Ellipse2D.Double(backgroundImage.getMinX() + FREE_AREA_INNER_RADIUS, backgroundImage.getMinY() + FREE_AREA_INNER_RADIUS, 2 * INNER_RADIUS, 2 * INNER_RADIUS);
for (eu.hansolo.steelseries.tools.Section section : getSections())
{
final double ANGLE_START = ORIGIN_CORRECTION - (section.getStart() * Math.toDegrees(angleStep));
final double ANGLE_EXTEND = -(section.getStop() - section.getStart()) * Math.toDegrees(angleStep);
final java.awt.geom.Arc2D OUTER_ARC = new java.awt.geom.Arc2D.Double(java.awt.geom.Arc2D.PIE);
OUTER_ARC.setFrame(backgroundImage.getMinX() + FREE_AREA_OUTER_RADIUS, backgroundImage.getMinY() + FREE_AREA_OUTER_RADIUS, 2 * OUTER_RADIUS, 2 * OUTER_RADIUS);
OUTER_ARC.setAngleStart(ANGLE_START);
OUTER_ARC.setAngleExtent(ANGLE_EXTEND);
final java.awt.geom.Area SECTION = new java.awt.geom.Area(OUTER_ARC);
SECTION.subtract(new java.awt.geom.Area(INNER));
section.setSectionArea(SECTION);
}
}
}
@Override
protected java.awt.image.BufferedImage create_THRESHOLD_Image(final int WIDTH)
{
if (WIDTH <= 0)
{
return null;
}
final java.awt.image.BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, WIDTH, java.awt.Transparency.TRANSLUCENT);
final java.awt.Graphics2D G2 = IMAGE.createGraphics();
G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_PURE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
final int IMAGE_WIDTH = IMAGE.getWidth();
final int IMAGE_HEIGHT = IMAGE.getHeight();
final java.awt.geom.GeneralPath THRESHOLD = new java.awt.geom.GeneralPath();
THRESHOLD.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
THRESHOLD.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3333333333333333);
THRESHOLD.lineTo(IMAGE_WIDTH * 0.4866666666666667, IMAGE_HEIGHT * 0.37333333333333335);
THRESHOLD.lineTo(IMAGE_WIDTH * 0.52, IMAGE_HEIGHT * 0.37333333333333335);
THRESHOLD.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3333333333333333);
THRESHOLD.closePath();
final java.awt.geom.Point2D THRESHOLD_START = new java.awt.geom.Point2D.Double(0, THRESHOLD.getBounds2D().getMinY() );
final java.awt.geom.Point2D THRESHOLD_STOP = new java.awt.geom.Point2D.Double(0, THRESHOLD.getBounds2D().getMaxY() );
final float[] THRESHOLD_FRACTIONS =
{
0.0f,
0.3f,
0.59f,
1.0f
};
final java.awt.Color[] THRESHOLD_COLORS =
{
new java.awt.Color(82, 0, 0, 255),
new java.awt.Color(252, 29, 0, 255),
new java.awt.Color(252, 29, 0, 255),
new java.awt.Color(82, 0, 0, 255)
};
final java.awt.LinearGradientPaint THRESHOLD_GRADIENT = new java.awt.LinearGradientPaint(THRESHOLD_START, THRESHOLD_STOP, THRESHOLD_FRACTIONS, THRESHOLD_COLORS);
G2.setPaint(THRESHOLD_GRADIENT);
G2.fill(THRESHOLD);
G2.setColor(java.awt.Color.WHITE);
G2.setStroke(new java.awt.BasicStroke(1.0f, java.awt.BasicStroke.CAP_BUTT, java.awt.BasicStroke.JOIN_MITER));
G2.draw(THRESHOLD);
G2.dispose();
return IMAGE;
}
@Override
protected java.awt.image.BufferedImage create_MEASURED_VALUE_Image(final int WIDTH, final java.awt.Color COLOR)
{
if (WIDTH <= 0)
{
return null;
}
final java.awt.image.BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, WIDTH, java.awt.Transparency.TRANSLUCENT);
final java.awt.Graphics2D G2 = IMAGE.createGraphics();
G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
// G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
// G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE);
// G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
// G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
// G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_PURE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
final int IMAGE_WIDTH = IMAGE.getWidth();
final int IMAGE_HEIGHT = IMAGE.getHeight();
final java.awt.geom.GeneralPath MAXMEASURED = new java.awt.geom.GeneralPath();
MAXMEASURED.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
MAXMEASURED.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3037383177570093);
MAXMEASURED.lineTo(IMAGE_WIDTH * 0.514018691588785, IMAGE_HEIGHT * 0.2803738317757009);
MAXMEASURED.lineTo(IMAGE_WIDTH * 0.48598130841121495, IMAGE_HEIGHT * 0.2803738317757009);
MAXMEASURED.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3037383177570093);
MAXMEASURED.closePath();
G2.setColor(COLOR);
G2.fill(MAXMEASURED);
G2.dispose();
return IMAGE;
}
@Override
protected java.awt.image.BufferedImage create_POINTER_Image(final int WIDTH, final eu.hansolo.steelseries.tools.PointerType POINTER_TYPE)
{
if (WIDTH <= 0)
{
return null;
}
final java.awt.image.BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, WIDTH, java.awt.Transparency.TRANSLUCENT);
final java.awt.Graphics2D G2 = IMAGE.createGraphics();
G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_PURE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
final int IMAGE_WIDTH = IMAGE.getWidth();
final int IMAGE_HEIGHT = IMAGE.getHeight();
final java.awt.geom.GeneralPath POINTER;
final java.awt.geom.Point2D POINTER_START;
final java.awt.geom.Point2D POINTER_STOP;
final float[] POINTER_FRACTIONS;
final java.awt.Color[] POINTER_COLORS;
final java.awt.Paint POINTER_GRADIENT;
final eu.hansolo.steelseries.tools.CustomColorDef CUSTOM_POINTER_COLOR;
if (getPointerColor() == eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
CUSTOM_POINTER_COLOR = new eu.hansolo.steelseries.tools.CustomColorDef(getCustomPointerColor());
}
else
{
CUSTOM_POINTER_COLOR = null;
}
switch(POINTER_TYPE)
{
case TYPE1:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.514018691588785, IMAGE_HEIGHT * 0.6915887850467289, IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6261682242990654, IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6121495327102804);
POINTER.curveTo(IMAGE_WIDTH * 0.5046728971962616, IMAGE_HEIGHT * 0.5981308411214953, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764);
POINTER.curveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764, IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.5981308411214953, IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6121495327102804);
POINTER.curveTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6308411214953271, IMAGE_WIDTH * 0.48598130841121495, IMAGE_HEIGHT * 0.6915887850467289, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.4719626168224299, IMAGE_HEIGHT * 0.7149532710280374, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.7663551401869159);
POINTER.curveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.5280373831775701, IMAGE_HEIGHT * 0.7149532710280374, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.closePath();
POINTER_START = new java.awt.geom.Point2D.Double(0, POINTER.getBounds2D().getMinY() );
POINTER_STOP = new java.awt.geom.Point2D.Double(0, POINTER.getBounds2D().getMaxY() );
POINTER_FRACTIONS = new float[]
{
0.0f,
0.3f,
0.59f,
1.0f
};
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
POINTER_COLORS = new java.awt.Color[]
{
getPointerColor().DARK,
getPointerColor().LIGHT,
getPointerColor().LIGHT,
getPointerColor().DARK
};
}
else
{
POINTER_COLORS = new java.awt.Color[]
{
CUSTOM_POINTER_COLOR.DARK,
CUSTOM_POINTER_COLOR.LIGHT,
CUSTOM_POINTER_COLOR.LIGHT,
CUSTOM_POINTER_COLOR.DARK
};
}
POINTER_GRADIENT = new java.awt.LinearGradientPaint(POINTER_START, POINTER_STOP, POINTER_FRACTIONS, POINTER_COLORS);
G2.setPaint(POINTER_GRADIENT);
G2.fill(POINTER);
final java.awt.Color STROKE_COLOR_POINTER = getPointerColor().LIGHT;
G2.setColor(STROKE_COLOR_POINTER);
G2.setStroke(new java.awt.BasicStroke(1.0f, java.awt.BasicStroke.CAP_BUTT, java.awt.BasicStroke.JOIN_MITER));
G2.draw(POINTER);
break;
case TYPE2:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.lineTo(IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6962616822429907);
POINTER.lineTo(IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.5747663551401869);
POINTER.lineTo(IMAGE_WIDTH * 0.5046728971962616, IMAGE_HEIGHT * 0.2897196261682243);
POINTER.lineTo(IMAGE_WIDTH * 0.4953271028037383, IMAGE_HEIGHT * 0.2897196261682243);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.5747663551401869);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6962616822429907);
POINTER.lineTo(IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.7663551401869159);
POINTER.curveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.closePath();
POINTER_START = new java.awt.geom.Point2D.Double(0, POINTER.getBounds2D().getMaxY() );
POINTER_STOP = new java.awt.geom.Point2D.Double(0, POINTER.getBounds2D().getMinY() );
POINTER_FRACTIONS = new float[]
{
0.0f,
0.36f,
0.3601f,
1.0f
};
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
POINTER_COLORS = new java.awt.Color[]
{
new java.awt.Color(0, 0, 0, 255),
new java.awt.Color(0, 0, 0, 255),
getPointerColor().LIGHT,
getPointerColor().LIGHT
};
}
else
{
POINTER_COLORS = new java.awt.Color[]
{
new java.awt.Color(0, 0, 0, 255),
new java.awt.Color(0, 0, 0, 255),
CUSTOM_POINTER_COLOR.LIGHT,
CUSTOM_POINTER_COLOR.LIGHT
};
}
POINTER_GRADIENT = new java.awt.LinearGradientPaint(POINTER_START, POINTER_STOP, POINTER_FRACTIONS, POINTER_COLORS);
G2.setPaint(POINTER_GRADIENT);
G2.fill(POINTER);
break;
case TYPE3:
POINTER = new java.awt.geom.GeneralPath(new java.awt.geom.Rectangle2D.Double(IMAGE_WIDTH * 0.4953271028037383, IMAGE_HEIGHT * 0.2897196261682243, IMAGE_WIDTH * 0.009345794392523364, IMAGE_HEIGHT * 0.4485981308));
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
G2.setColor(getPointerColor().LIGHT);
}
else
{
G2.setColor(CUSTOM_POINTER_COLOR.LIGHT);
}
G2.fill(POINTER);
break;
case TYPE4:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29439252336448596);
POINTER.lineTo(IMAGE_WIDTH * 0.514018691588785, IMAGE_HEIGHT * 0.3037383177570093);
POINTER.lineTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.lineTo(IMAGE_WIDTH * 0.5233644859813084, IMAGE_HEIGHT * 0.8364485981308412);
POINTER.lineTo(IMAGE_WIDTH * 0.4766355140186916, IMAGE_HEIGHT * 0.8364485981308412);
POINTER.lineTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.3037383177570093);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29439252336448596);
POINTER.closePath();
POINTER_START = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMinX(), 0);
POINTER_STOP = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMaxX(), 0);
POINTER_FRACTIONS = new float[]
{
0.0f,
0.51f,
0.52f,
1.0f
};
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
POINTER_COLORS = new java.awt.Color[]
{
getPointerColor().DARK,
getPointerColor().DARK,
getPointerColor().LIGHT,
getPointerColor().LIGHT
};
}
else
{
POINTER_COLORS = new java.awt.Color[]
{
CUSTOM_POINTER_COLOR.DARK,
CUSTOM_POINTER_COLOR.DARK,
CUSTOM_POINTER_COLOR.LIGHT,
CUSTOM_POINTER_COLOR.LIGHT
};
}
POINTER_GRADIENT = new java.awt.LinearGradientPaint(POINTER_START, POINTER_STOP, POINTER_FRACTIONS, POINTER_COLORS);
G2.setPaint(POINTER_GRADIENT);
G2.fill(POINTER);
break;
case TYPE5:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5266666666666666, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3);
POINTER.lineTo(IMAGE_WIDTH * 0.47333333333333333, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.74);
POINTER.closePath();
POINTER_START = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMinX(), 0);
POINTER_STOP = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMaxX(), 0);
POINTER_FRACTIONS = new float[]
{
0.0f,
0.4999f,
0.5f,
1.0f
};
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
POINTER_COLORS = new java.awt.Color[]
{
getPointerColor().LIGHT,
getPointerColor().LIGHT,
getPointerColor().MEDIUM,
getPointerColor().MEDIUM
};
}
else
{
POINTER_COLORS = new java.awt.Color[]
{
getCustomPointerColorObject().LIGHT,
getCustomPointerColorObject().LIGHT,
getCustomPointerColorObject().MEDIUM,
getCustomPointerColorObject().MEDIUM
};
}
POINTER_GRADIENT = new java.awt.LinearGradientPaint(POINTER_START, POINTER_STOP, POINTER_FRACTIONS, POINTER_COLORS);
G2.setPaint(POINTER_GRADIENT);
G2.fill(POINTER);
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
G2.setColor(getPointerColor().DARK);
}
else
{
G2.setColor(getCustomPointerColorObject().DARK);
}
G2.setStroke(new java.awt.BasicStroke(1.0f, java.awt.BasicStroke.CAP_BUTT, java.awt.BasicStroke.JOIN_MITER));
G2.draw(POINTER);
break;
case TYPE6:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.48, IMAGE_HEIGHT * 0.46);
POINTER.lineTo(IMAGE_WIDTH * 0.49333333333333335, IMAGE_HEIGHT * 0.32);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.30666666666666664);
POINTER.lineTo(IMAGE_WIDTH * 0.5066666666666667, IMAGE_HEIGHT * 0.32);
POINTER.lineTo(IMAGE_WIDTH * 0.52, IMAGE_HEIGHT * 0.46);
POINTER.lineTo(IMAGE_WIDTH * 0.5333333333333333, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.5333333333333333, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.5133333333333333, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.5133333333333333, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.43333333333333335);
POINTER.lineTo(IMAGE_WIDTH * 0.4866666666666667, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.4866666666666667, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.72);
POINTER.closePath();
POINTER_START = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMaxY(), 0);
POINTER_STOP = new java.awt.geom.Point2D.Double(POINTER.getBounds2D().getMinY(), 0);
POINTER_FRACTIONS = new float[]
{
0.0f,
0.25f,
0.75f,
1.0f
};
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
POINTER_COLORS = new java.awt.Color[]
{
getPointerColor().LIGHT,
getPointerColor().MEDIUM,
getPointerColor().MEDIUM,
getPointerColor().LIGHT
};
}
else
{
POINTER_COLORS = new java.awt.Color[]
{
getCustomPointerColorObject().LIGHT,
getCustomPointerColorObject().MEDIUM,
getCustomPointerColorObject().MEDIUM,
getCustomPointerColorObject().LIGHT
};
}
POINTER_GRADIENT = new java.awt.LinearGradientPaint(POINTER_START, POINTER_STOP, POINTER_FRACTIONS, POINTER_COLORS);
G2.setPaint(POINTER_GRADIENT);
G2.fill(POINTER);
if (getPointerColor() != eu.hansolo.steelseries.tools.ColorDef.CUSTOM)
{
G2.setColor(getPointerColor().DARK);
}
else
{
G2.setColor(getCustomPointerColorObject().DARK);
}
G2.setStroke(new java.awt.BasicStroke(1.0f, java.awt.BasicStroke.CAP_BUTT, java.awt.BasicStroke.JOIN_MITER));
G2.draw(POINTER);
break;
}
G2.dispose();
return IMAGE;
}
@Override
protected java.awt.image.BufferedImage create_POINTER_SHADOW_Image(final int WIDTH, final eu.hansolo.steelseries.tools.PointerType POINTER_TYPE)
{
if (WIDTH <= 0)
{
return null;
}
final java.awt.Color SHADOW_COLOR = new java.awt.Color(0.0f, 0.0f, 0.0f, 0.65f);
final java.awt.image.BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, WIDTH, java.awt.Transparency.TRANSLUCENT);
final java.awt.Graphics2D G2 = IMAGE.createGraphics();
G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_PURE);
//G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
final int IMAGE_WIDTH = IMAGE.getWidth();
final int IMAGE_HEIGHT = IMAGE.getHeight();
final java.awt.geom.GeneralPath POINTER;
switch(POINTER_TYPE)
{
case TYPE1:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.514018691588785, IMAGE_HEIGHT * 0.6915887850467289, IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6261682242990654, IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6121495327102804);
POINTER.curveTo(IMAGE_WIDTH * 0.5046728971962616, IMAGE_HEIGHT * 0.5981308411214953, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764);
POINTER.curveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29906542056074764, IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.5981308411214953, IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6121495327102804);
POINTER.curveTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6308411214953271, IMAGE_WIDTH * 0.48598130841121495, IMAGE_HEIGHT * 0.6915887850467289, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.4719626168224299, IMAGE_HEIGHT * 0.7149532710280374, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.7663551401869159);
POINTER.curveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.5280373831775701, IMAGE_HEIGHT * 0.7149532710280374, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.closePath();
G2.setColor(SHADOW_COLOR);
G2.fill(POINTER);
break;
case TYPE2:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.lineTo(IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.6962616822429907);
POINTER.lineTo(IMAGE_WIDTH * 0.5093457943925234, IMAGE_HEIGHT * 0.5747663551401869);
POINTER.lineTo(IMAGE_WIDTH * 0.5046728971962616, IMAGE_HEIGHT * 0.2897196261682243);
POINTER.lineTo(IMAGE_WIDTH * 0.4953271028037383, IMAGE_HEIGHT * 0.2897196261682243);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.5747663551401869);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.6962616822429907);
POINTER.lineTo(IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514);
POINTER.curveTo(IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.705607476635514, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.48130841121495327, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.7663551401869159);
POINTER.curveTo(IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.7663551401869159, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7523364485981309, IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.curveTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7242990654205608, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514, IMAGE_WIDTH * 0.5186915887850467, IMAGE_HEIGHT * 0.705607476635514);
POINTER.closePath();
G2.setColor(SHADOW_COLOR);
G2.fill(POINTER);
break;
case TYPE3:
break;
case TYPE4:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29439252336448596);
POINTER.lineTo(IMAGE_WIDTH * 0.514018691588785, IMAGE_HEIGHT * 0.3037383177570093);
POINTER.lineTo(IMAGE_WIDTH * 0.5327102803738317, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.lineTo(IMAGE_WIDTH * 0.5233644859813084, IMAGE_HEIGHT * 0.8364485981308412);
POINTER.lineTo(IMAGE_WIDTH * 0.4766355140186916, IMAGE_HEIGHT * 0.8364485981308412);
POINTER.lineTo(IMAGE_WIDTH * 0.4672897196261682, IMAGE_HEIGHT * 0.7336448598130841);
POINTER.lineTo(IMAGE_WIDTH * 0.49065420560747663, IMAGE_HEIGHT * 0.3037383177570093);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.29439252336448596);
POINTER.closePath();
G2.setColor(SHADOW_COLOR);
G2.fill(POINTER);
break;
case TYPE5:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5266666666666666, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.3);
POINTER.lineTo(IMAGE_WIDTH * 0.47333333333333333, IMAGE_HEIGHT * 0.74);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.74);
POINTER.closePath();
G2.setColor(SHADOW_COLOR);
G2.fill(POINTER);
break;
case TYPE6:
POINTER = new java.awt.geom.GeneralPath();
POINTER.setWindingRule(java.awt.geom.GeneralPath.WIND_EVEN_ODD);
POINTER.moveTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.48, IMAGE_HEIGHT * 0.46);
POINTER.lineTo(IMAGE_WIDTH * 0.49333333333333335, IMAGE_HEIGHT * 0.32);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.30666666666666664);
POINTER.lineTo(IMAGE_WIDTH * 0.5066666666666667, IMAGE_HEIGHT * 0.32);
POINTER.lineTo(IMAGE_WIDTH * 0.52, IMAGE_HEIGHT * 0.46);
POINTER.lineTo(IMAGE_WIDTH * 0.5333333333333333, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.5333333333333333, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.5133333333333333, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.5133333333333333, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT * 0.43333333333333335);
POINTER.lineTo(IMAGE_WIDTH * 0.4866666666666667, IMAGE_HEIGHT * 0.6066666666666667);
POINTER.lineTo(IMAGE_WIDTH * 0.4866666666666667, IMAGE_HEIGHT * 0.72);
POINTER.lineTo(IMAGE_WIDTH * 0.4666666666666667, IMAGE_HEIGHT * 0.72);
POINTER.closePath();
G2.setColor(SHADOW_COLOR);
G2.fill(POINTER);
break;
}
G2.dispose();
return IMAGE;
}
@Override
public String toString()
{
return "Radial1Vertical";
}
}