package test.check.svg.flags;
import java.awt.*;
import java.awt.geom.*;
import javax.swing.Icon;
import javax.swing.plaf.UIResource;
import org.pushingpixels.lafwidget.icon.IsHiDpiAware;
import org.pushingpixels.lafwidget.icon.IsResizable;
/**
* This class has been automatically generated using <a
* href="https://flamingo.dev.java.net">Flamingo SVG transcoder</a>.
*/
public class il implements Icon, UIResource, IsResizable, IsHiDpiAware {
/**
* Paints the transcoded SVG image on the specified graphics context. You
* can install a custom transformation on the graphics context to scale the
* image.
*
* @param g
* Graphics context.
*/
public static void paint(Graphics2D g) {
Shape shape = null;
Paint paint = null;
Stroke stroke = null;
float origAlpha = 1.0f;
Composite origComposite = ((Graphics2D)g).getComposite();
if (origComposite instanceof AlphaComposite) {
AlphaComposite origAlphaComposite =
(AlphaComposite)origComposite;
if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) {
origAlpha = origAlphaComposite.getAlpha();
}
}
AffineTransform defaultTransform_ = g.getTransform();
//
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, -0.0f, -0.0f));
// _0
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0 = g.getTransform();
g.transform(new AffineTransform(0.9399999976158142f, 0.0f, 0.0f, 0.9399999976158142f, 82.13999938964844f, 0.0f));
// _0_0
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0_0 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
// _0_0_0
paint = new Color(255, 255, 255, 255);
shape = new GeneralPath();
((GeneralPath)shape).moveTo(619.43, 512.0);
((GeneralPath)shape).lineTo(-112.0, 512.0);
((GeneralPath)shape).lineTo(-112.0, 0.0);
((GeneralPath)shape).lineTo(619.43, 0.0);
((GeneralPath)shape).closePath();
g.setPaint(paint);
g.fill(shape);
g.setTransform(defaultTransform__0_0_0);
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0_1 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
// _0_0_1
paint = new Color(0, 0, 204, 255);
shape = new GeneralPath();
((GeneralPath)shape).moveTo(619.43, 115.23);
((GeneralPath)shape).lineTo(-112.0, 115.23);
((GeneralPath)shape).lineTo(-112.0, 48.003);
((GeneralPath)shape).lineTo(619.43, 48.003);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(619.43, 465.68002);
((GeneralPath)shape).lineTo(-112.0, 465.68002);
((GeneralPath)shape).lineTo(-112.0, 398.45303);
((GeneralPath)shape).lineTo(619.43, 398.45303);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(136.43, 190.78003);
((GeneralPath)shape).lineTo(246.54999, 382.32);
((GeneralPath)shape).lineTo(359.03998, 191.57);
((GeneralPath)shape).lineTo(136.42998, 190.78001);
((GeneralPath)shape).closePath();
g.setPaint(paint);
g.fill(shape);
g.setTransform(defaultTransform__0_0_1);
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0_2 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
// _0_0_2
paint = new Color(255, 255, 255, 255);
shape = new GeneralPath();
((GeneralPath)shape).moveTo(225.75, 317.81);
((GeneralPath)shape).lineTo(246.7, 353.316);
((GeneralPath)shape).lineTo(268.1, 317.956);
((GeneralPath)shape).lineTo(225.75, 317.811);
((GeneralPath)shape).closePath();
g.setPaint(paint);
g.fill(shape);
g.setTransform(defaultTransform__0_0_2);
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0_3 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
// _0_0_3
paint = new Color(0, 0, 204, 255);
shape = new GeneralPath();
((GeneralPath)shape).moveTo(136.02, 320.58);
((GeneralPath)shape).lineTo(246.15, 129.04);
((GeneralPath)shape).lineTo(358.63, 319.78998);
((GeneralPath)shape).lineTo(136.02, 320.58);
((GeneralPath)shape).closePath();
g.setPaint(paint);
g.fill(shape);
g.setTransform(defaultTransform__0_0_3);
g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
AffineTransform defaultTransform__0_0_4 = g.getTransform();
g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
// _0_0_4
paint = new Color(255, 255, 255, 255);
shape = new GeneralPath();
((GeneralPath)shape).moveTo(225.75, 191.61);
((GeneralPath)shape).lineTo(246.7, 156.104);
((GeneralPath)shape).lineTo(268.1, 191.464);
((GeneralPath)shape).lineTo(225.75, 191.60901);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(181.97, 271.11);
((GeneralPath)shape).lineTo(160.33, 307.09198);
((GeneralPath)shape).lineTo(201.23001, 306.96497);
((GeneralPath)shape).lineTo(181.97002, 271.10995);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(160.7, 204.60999);
((GeneralPath)shape).lineTo(201.92499, 204.89998);
((GeneralPath)shape).lineTo(182.09099, 241.15997);
((GeneralPath)shape).lineTo(160.70099, 204.60997);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(311.94, 271.52);
((GeneralPath)shape).lineTo(332.77, 307.09598);
((GeneralPath)shape).lineTo(291.06, 306.563);
((GeneralPath)shape).lineTo(311.94, 271.52);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(332.39, 204.60999);
((GeneralPath)shape).lineTo(291.165, 204.89998);
((GeneralPath)shape).lineTo(311.0, 241.16);
((GeneralPath)shape).lineTo(332.39, 204.61);
((GeneralPath)shape).closePath();
((GeneralPath)shape).moveTo(218.12003, 204.56999);
((GeneralPath)shape).lineTo(189.72603, 256.085);
((GeneralPath)shape).lineTo(218.52603, 306.382);
((GeneralPath)shape).lineTo(271.25604, 307.599);
((GeneralPath)shape).lineTo(303.30005, 256.08398);
((GeneralPath)shape).lineTo(273.69006, 204.16399);
((GeneralPath)shape).lineTo(218.11807, 204.56898);
((GeneralPath)shape).closePath();
g.setPaint(paint);
g.fill(shape);
g.setTransform(defaultTransform__0_0_4);
g.setTransform(defaultTransform__0_0);
g.setTransform(defaultTransform__0);
g.setTransform(defaultTransform_);
}
/**
* Returns the X of the bounding box of the original SVG image.
*
* @return The X of the bounding box of the original SVG image.
*/
public static int getOrigX() {
return 0;
}
/**
* Returns the Y of the bounding box of the original SVG image.
*
* @return The Y of the bounding box of the original SVG image.
*/
public static int getOrigY() {
return 0;
}
/**
* Returns the width of the bounding box of the original SVG image.
*
* @return The width of the bounding box of the original SVG image.
*/
public static int getOrigWidth() {
return 640;
}
/**
* Returns the height of the bounding box of the original SVG image.
*
* @return The height of the bounding box of the original SVG image.
*/
public static int getOrigHeight() {
return 480;
}
/**
* The current width of this resizable icon.
*/
int width;
/**
* The current height of this resizable icon.
*/
int height;
/**
* Creates a new transcoded SVG image.
*/
public il() {
this.width = getOrigWidth();
this.height = getOrigHeight();
}
/*
* (non-Javadoc)
*
* @see javax.swing.Icon#getIconHeight()
*/
@Override
public int getIconHeight() {
return height;
}
/*
* (non-Javadoc)
*
* @see javax.swing.Icon#getIconWidth()
*/
@Override
public int getIconWidth() {
return width;
}
@Override
public void setDimension(Dimension newDimension) {
this.width = newDimension.width;
this.height = newDimension.height;
}
@Override
public boolean isHiDpiAware() {
return true;
}
/*
* (non-Javadoc)
*
* @see javax.swing.Icon#paintIcon(java.awt.Component, java.awt.Graphics,
* int, int)
*/
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {
Graphics2D g2d = (Graphics2D) g.create();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2d.translate(x, y);
double coef1 = (double) this.width / (double) getOrigWidth();
double coef2 = (double) this.height / (double) getOrigHeight();
double coef = Math.min(coef1, coef2);
g2d.clipRect(0, 0, this.width, this.height);
g2d.scale(coef, coef);
paint(g2d);
g2d.dispose();
}
}