void drawPolygon(int x[], int y[], int numOfPoints): Draws an outline polygon as per the coordinates specified in the x[] and y[] arrays. The numOfPoints gives the number of points (or to say, number of elements in the array) to join.
Syntax:drawPolygon(int x[ ], int y[ ], int n)
Example:import java.awt.*; import java.applet.*; public class DrawingPolygons extends Applet { public void paint(Graphics g) { int x[] = { 70, 150, 190, 80, 100 }; int y[] = { 80, 110, 160, 190, 100 }; g.drawPolygon (x, y, 5); int x1[] = { 210, 280, 330, 210, 230 }; int y1[] = { 70, 110, 160, 190, 100 }; g.fillPolygon (x1, y1, 5); } }
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 237 / 159170820. Delta: 0.02485 с