summaryrefslogtreecommitdiff
path: root/graphics/epix/doc/objects.xp
blob: d0828f0b94d1ac8f069d152d981c10c6d80b8503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*-ePiX-*- */
#include "epix.h"
using namespace ePiX;

int main()
{
  picture(P(0,0), P(5,2), "3.75 x 1.5in");

  begin();

  // roof
  triangle(P(0.9, 1), P(3.1, 1), P(2, 1.5)); // vertices

  // sun
  circle(P(4,1.5), 0.25); // center and radius

  // house
  rect(P(1,0), P(3,1)); // opposite corners
  // grid(P(1,0), P(3,1), 1, 10); // corners, numbers of subdivisions 

  // door
  fill(Black(0.1));
  rect(P(2.3,0), P(2.7,0.8)); // corners

  fill(White());
  // window
  rect(P(1.4,0.2), P(2, 0.6));
  bold();
  grid(P(1.4,0.2), P(2, 0.6), 2, 2);

  line(P(xmin(),0), P(xmax(),0));
  end();
}