Example usage for java.awt Rectangle outcode

List of usage examples for java.awt Rectangle outcode

Introduction

In this page you can find the example usage for java.awt Rectangle outcode.

Prototype

public int outcode(double x, double y) 

Source Link

Usage

From source file:Main.java

public void paint(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;

    Rectangle r = new Rectangle(10, 10, 50, 40);

    System.out.println(r.outcode(40D, 40D));

    g2.fill(r);//from  w  ww . j a va 2s .c o m
}