/*** first with custom dimensions providing upper left and lower right corner */
var picture1 = new Object();
picture1.fileName = "bugs.png"

/*** the upper left corner is needed for positioning */
picture1.p1 = new Object();
picture1.p1.x = 1000;
picture1.p1.y = 1100;

/*** if useOriginalRatio is not set, p2 is mandatory */
/*** if useOriginalRatio is set, p2 is only needed to determine horizontal and/or vertical flipping */
/*** it will be recalculated for correct dimensions using the scale factor */
/*** try changing 1101 to 1099. The image will flip vertically */
picture1.p2 = new Object();
picture1.p2.x = 1001;
picture1.p2.y = 1101;

/** The scale value is only used when useOriginalRatio is set. */
picture1.scale = 0.5; // defaults to 1
picture1.useOriginalRatio = true; // default is false

winfig.drawPicture(picture1);


/*** now horizontally flipped */
var picture2 = new Object();
picture2.fileName = "bugs.png"

picture2.p1 = new Object();
picture2.p1.x = 2000;
picture2.p1.y = 2700;

picture2.p2 = new Object();
picture2.p2.x = 100;
picture2.p2.y = 3800;

winfig.drawPicture(picture2);


/*** now vertically flipped ***/
var picture3 = new Object();
picture3.fileName = "bugs.png"

picture3.p1 = new Object();
picture3.p1.x = 2100;
picture3.p1.y = 3800;

picture3.p2 = new Object();
picture3.p2.x = 4000;
picture3.p2.y = 2700;

winfig.drawPicture(picture3);
