Java Graphics Draw drawAndFill(Graphics g, Shape s, Color draw, Color fill)

Here you can find the source of drawAndFill(Graphics g, Shape s, Color draw, Color fill)

Description

draw And Fill

License

Apache License

Declaration

public static void drawAndFill(Graphics g, Shape s, Color draw, Color fill) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.Color;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;

public class Main {
    public static void drawAndFill(Graphics g, Shape s, Color draw, Color fill) {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(fill);/*  ww w.  ja  va2  s  .  c  o  m*/
        g2.fill(s);
        g2.setColor(draw);
        g2.draw(s);
    }
}

Related

  1. draw(int[] pixels, int width, int height)
  2. drawAngledLine(Graphics g, int x, int y, double angle, int length)
  3. drawAt(final Graphics2D g, final double x, final double y, final Shape s)
  4. drawAutoCompleteMarker(Graphics2D g2, int x, int y, int iconSize)
  5. drawBeamsplit(Graphics g, int midx, int midy, Color cup, Color cdown, Color cright, boolean showMirror, boolean isDichroic)