NAME

makeimg, setimg - create and set an HTML image

SYNOPSIS

makeimg( )
setimg(
n, src )

DESCRIPTION

makeimg() creates a new img tag with no src on the HTML pop up page. It returns an integer identifier that can be used to refrence the image and set its source.

Like other Tranquility functions that create HTML elements, makeimg() opens a new browser window when called.

setimg() sets the source property of an image. The first argument n should be the return value of an earlier call to makeimg(). The second argument src should be a string specifying the image source.

Images will be placed on the HTML page, left to right, top to bottom in order of being called.

RETURN VALUE

makeimg() returns an integer image identifier.

setimg() does not have a return value.

NOTES

The image specified by src must be publicly visible either through a reliable web URL or an image saved in a public_html directory on tux.

EXAMPLE

fun init () {
     var imgA, imgB
     var labelA, labelB

     imgA : makeimg()
     labelA : makelabel()
     imgB : makeimg()
     labelB : makelabel()


     setimg( .imgA, "dog.png" )
     setlabel( .labelA, "This is a picture of a dog" )
     setimg( .imgB, "cat.png" )
     setlabel( .labelB, "This is a picture of a cat" )
}

AUTHORS

Charlie Stuart cstuart11@protonmail.com
Abigail Hatcher, Fall 21-22
Alex Zavalny, Fall 21-22
Hezekiah Dombach, Fall 21-22

REPORTING BUGS

First, check the Tranquility Programmer’s Manual
https://www.cs.drexel.edu/~bls96/tranquility.pdf
If the problem persists see Dr. Stuart or Charlie Stuart

Dr. Stuart: brian.l.stuart@drexel.edubrian.l.stuart@drexel.edu
Charlie Stuart: cstuart11@protonmail.comcstuart11@protonmail.com

SEE ALSO

html(3), makelabel(3), tranqc(1)

Tranquility Programmer’s Manual
https://www.cs.drexel.edu/~bls96/tranquility.pdf