0% found this document useful (0 votes)
5 views2 pages

Java Graphics: Drawing Food Items

The document draws various shapes and colors to create an image of food on a plate including a salt shaker, pepper shaker, rectangles, arcs, an oval plate, a rectangle plate rim, oval food items like leaves and mashed potatoes.

Uploaded by

Sivani P
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Java Graphics: Drawing Food Items

The document draws various shapes and colors to create an image of food on a plate including a salt shaker, pepper shaker, rectangles, arcs, an oval plate, a rectangle plate rim, oval food items like leaves and mashed potatoes.

Uploaded by

Sivani P
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

/salt

Color salt = new Color (211,211,211);


Polygon saltp = new Polygon();
[Link](120,80);
[Link](220,80);
[Link](140,180);
[Link](200,180);
[Link](saltp);

//pepper
Color pepp = new Color (179,179,179);
Polygon pep = new Polygon();
[Link](280,180);
[Link](380,180);
[Link](300,280);
[Link](360,280);
[Link](pep);

//rectangles
Color saltr = new Color (243,243,243);
[Link](saltr);
[Link](120,60,100,20);

Color pepr = new Color (155,142,142);


[Link](pepr);
[Link](280,160,100,20);

//arcs
Color sArc = new Color (195,188,188);
[Link](sArc);
[Link](140,160,60,40,180,180);

Color pArc = new Color (134,127,127);


[Link](pArc);
[Link](300,260,60,40,180,180);

//food...
//plate

[Link]([Link]);
[Link](40,360,400,100);

[Link](150,450,180,20);

//food on the plate - leaves

Color food1 = new Color (0,100,0);


[Link](food1);
[Link](100,380,60,40);

//mashpotatoes

Color mash = new Color (255,244,198);


[Link](mash);
[Link](140,380,240,60);
Color mashoutline = new Color (232,206,170);
[Link](mashoutline);
[Link](140,380,240,60);

[Link](mash);
[Link](180,370,150,40);
[Link](mashoutline);
[Link](180,370,150,40);

//food2 - leaves
[Link](food1);
[Link](340,390,60,40);

You might also like