Search in sources :

Example 61 with BasicStroke

use of java.awt.BasicStroke in project litiengine by gurkenlabs.

the class RectangleOutlineParticle method render.

@Override
public void render(final Graphics2D g, final Point2D emitterOrigin) {
    final Point2D renderLocation = this.getLocation(emitterOrigin);
    final Stroke oldStroke = g.getStroke();
    g.setColor(this.getColor());
    g.setStroke(new BasicStroke(this.stroke));
    g.draw(new Rectangle2D.Double(renderLocation.getX(), renderLocation.getY(), this.getWidth(), this.getHeight()));
    g.setStroke(oldStroke);
}
Also used : BasicStroke(java.awt.BasicStroke) Stroke(java.awt.Stroke) BasicStroke(java.awt.BasicStroke) Point2D(java.awt.geom.Point2D) Rectangle2D(java.awt.geom.Rectangle2D)

Example 62 with BasicStroke

use of java.awt.BasicStroke in project litiengine by gurkenlabs.

the class VerticalSlider method render.

@Override
public void render(final Graphics2D g) {
    final Stroke oldStroke = g.getStroke();
    g.setStroke(new BasicStroke((float) (this.getWidth() / 8)));
    g.setColor(this.getAppearance().getForeColor());
    g.drawLine((int) (this.getX() + this.getWidth() / 2), (int) this.minSliderY, (int) (this.getX() + this.getWidth() / 2), (int) (this.getY() + this.getHeight() - this.getWidth()));
    g.setStroke(oldStroke);
    super.render(g);
}
Also used : BasicStroke(java.awt.BasicStroke) Stroke(java.awt.Stroke) BasicStroke(java.awt.BasicStroke)

Example 63 with BasicStroke

use of java.awt.BasicStroke in project litiengine by gurkenlabs.

the class ListField method render.

@Override
public void render(final Graphics2D g) {
    super.render(g);
    if (this.selectedComponent != null) {
        final Stroke oldStroke = g.getStroke();
        g.setStroke(new BasicStroke(2));
        final Rectangle2D border = new Rectangle2D.Double(this.selectedComponent.getX() - 1, this.selectedComponent.getY() - 1, this.selectedComponent.getWidth() + 2, this.selectedComponent.getHeight() + 2);
        g.setColor(Color.WHITE);
        g.draw(border);
        g.setStroke(oldStroke);
    }
}
Also used : BasicStroke(java.awt.BasicStroke) Stroke(java.awt.Stroke) BasicStroke(java.awt.BasicStroke) Rectangle2D(java.awt.geom.Rectangle2D)

Example 64 with BasicStroke

use of java.awt.BasicStroke in project polyGembler by c-zhou.

the class JfreeChart method getRenderer2.

private XYLineAndShapeRenderer getRenderer2() {
    // TODO Auto-generated method stub
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setStroke(new BasicStroke(stroke));
    renderer.setPaint(Color.DARK_GRAY);
    renderer.setShapesVisible(false);
    renderer.setShapesFilled(false);
    return renderer;
}
Also used : BasicStroke(java.awt.BasicStroke) XYLineAndShapeRenderer(org.jfree.chart.renderer.xy.XYLineAndShapeRenderer)

Example 65 with BasicStroke

use of java.awt.BasicStroke in project polyGembler by c-zhou.

the class JfreeChart method getRenderer3.

private XYLineAndShapeRenderer getRenderer3() {
    // TODO Auto-generated method stub
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setStroke(new BasicStroke(stroke));
    renderer.setPaint(Color.DARK_GRAY);
    renderer.setShapesVisible(false);
    renderer.setShapesFilled(false);
    return renderer;
}
Also used : BasicStroke(java.awt.BasicStroke) XYLineAndShapeRenderer(org.jfree.chart.renderer.xy.XYLineAndShapeRenderer)

Aggregations

BasicStroke (java.awt.BasicStroke)571 Graphics2D (java.awt.Graphics2D)179 Color (java.awt.Color)164 Stroke (java.awt.Stroke)141 GradientPaint (java.awt.GradientPaint)96 Test (org.junit.Test)93 Rectangle2D (java.awt.geom.Rectangle2D)71 Paint (java.awt.Paint)64 Font (java.awt.Font)61 Point (java.awt.Point)47 Line2D (java.awt.geom.Line2D)47 BufferedImage (java.awt.image.BufferedImage)43 Shape (java.awt.Shape)39 Point2D (java.awt.geom.Point2D)38 AffineTransform (java.awt.geom.AffineTransform)34 JFreeChart (org.jfree.chart.JFreeChart)34 Rectangle (java.awt.Rectangle)27 Ellipse2D (java.awt.geom.Ellipse2D)27 RectangleInsets (org.jfree.ui.RectangleInsets)27 NumberAxis (org.jfree.chart.axis.NumberAxis)25