This file is indexed.

/usr/share/mozart/doc/wp/node12.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>3.6 Images</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node11.html#section.widgets-1.label">&lt;&lt; Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="node13.html#section.widgets-1.messages">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="section.widgets-1.images"><H2><A name="section.widgets-1.images">3.6 Images</A></H2><P> <A name="label115"></A>Besides of text and bitmaps labels can display images. Images differ from bitmaps in that they allow for more than two colors to be displayed. </P><P> Images are provided as objects in Oz. These objects are also tickle objects (see <A href="node8.html#section.widgets-1.tickles">Section&nbsp;3.2</A>), but are different from widget objects. </P><P> </P><DIV id="figure.widgets-1.images"><HR><P><A name="figure.widgets-1.images"></A></P><P> </P><DIV align="center"><IMG alt="" src="images-1.gif"></DIV><P> <A name="label117"></A> </P><DL class="anonymous"><DD class="code"><CODE>D&nbsp;=<SPAN class="string">'/usr/share/mozart/doc/wp/'</SPAN>&nbsp;<BR>I&nbsp;={New&nbsp;Tk<SPAN class="keyword">.</SPAN>image&nbsp;tkInit(type:photo&nbsp;format:ppm&nbsp;file:D<SPAN class="keyword">#</SPAN><SPAN class="string">'truck-left.ppm'</SPAN>)}<BR>L1={New&nbsp;Tk<SPAN class="keyword">.</SPAN>label&nbsp;tkInit(parent:W&nbsp;image:I)}<BR>L2={New&nbsp;Tk<SPAN class="keyword">.</SPAN>label&nbsp;tkInit(parent:W&nbsp;image:I)}<BR>L3={New&nbsp;Tk<SPAN class="keyword">.</SPAN>label&nbsp;tkInit(parent:W&nbsp;image:I)}<BR>{Tk<SPAN class="keyword">.</SPAN>send&nbsp;pack(L1&nbsp;L2&nbsp;L3&nbsp;padx:1<SPAN class="keyword">#</SPAN>m&nbsp;pady:1<SPAN class="keyword">#</SPAN>m&nbsp;side:left)}</CODE></DD></DL><P> </P><P class="caption"><STRONG>Figure&nbsp;3.6:</STRONG> Three labels displaying the same image.</P><HR></DIV><P> </P><P> The program in <A href="node12.html#figure.widgets-1.images">Figure&nbsp;3.6</A> creates an image object and displays the image in three labels. Changing the configuration of the image, changes the displayed image in all label widgets. For example, feeding the following expression </P><DL class="anonymous"><DD class="code"><CODE>{I&nbsp;tk(configure&nbsp;file:D<SPAN class="keyword">#</SPAN><SPAN class="string">'truck-right.ppm'</SPAN>)}</CODE></DD></DL><P> replaces all three displayed trucks by trucks heading in the inverse direction. </P><DIV class="apropos"><P class="margin">type and format</P><P> <A name="label118"></A><A name="label119"></A><A name="label120"></A><A name="label121"></A><A name="label122"></A><A name="label123"></A> Images can be of two different types. The value of the <CODE>type</CODE> configuration option can be <CODE>photo</CODE> (as in our example), or <CODE>bitmap</CODE>. If the type is <CODE>photo</CODE>, the image can display files in two different formats. The format is specified by the <CODE>format</CODE> option. Valid values for the <CODE>format</CODE> option are <CODE>gif</CODE> and <CODE>ppm</CODE>. </P></DIV><DIV class="apropos"><P class="margin">bitmap images</P><P> <A name="label124"></A> In case the value for the <CODE>type</CODE> option is <CODE>bitmap</CODE>, the value given for the <CODE>file</CODE> option must be a valid bitmap file. </P></DIV><DIV class="apropos"><P class="margin">referring to images by URLs</P><P> <A name="label125"></A> In addition to files, images can also be referred to by URLs. For example, </P><BLOCKQUOTE class="code"><CODE>{New&nbsp;Tk<SPAN class="keyword">.</SPAN>image&nbsp;tkInit(type:photo&nbsp;format:gif<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url:<SPAN class="string">'http://foo.com/bar.gif'</SPAN>}</CODE></BLOCKQUOTE><P> would have loaded a gif file from the given URL. Note that the graphics engine itself is not capable of handling URLs. Instead, the image object handles URLs by localizing a URL to a local file (see also <A href="../system/node50.html#chapter.resolve">Chapter&nbsp;15 of ``System Modules''</A>). The local file then is used by the graphics engine. </P></DIV><P> In <A href="node45.html#section.tools.images">Section&nbsp;8.4</A> an abstraction is presented that eases the handling of images considerably. </P><P> Reference information on images can be found in <A href="../tcltk/TkCmd/image.htm"><KBD>image</KBD></A>. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node11.html#section.widgets-1.label">&lt;&lt; Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="node13.html#section.widgets-1.messages">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>