background compositions


Description

diputree, labels and tips can have a background. A background can have a color and/or an image. 

Diagram

diagram of <background>


Color background

<diputree>
 <hasbackground>
  <background>
   <hascolor>
    <rgb>
     <i>0xCCCCCC</i>
    </rgb>
   </hascolor>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>

Explanation

<diputree>

the hasbackground relation between diputree and background

 <hasbackground>
  <background>

the hascolor relation between background and rgb

   <hascolor>
    <rgb>
     <i>0xCCCCCC</i>
    </rgb>
   </hascolor>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>


background image

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/diputreebig.gif</s>
    </uri>
   </hasimage>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>

Explanation

<diputree>

the hasbackground relation between diputree and background

 <hasbackground>
  <background>

the hasimage relation between background and the uri

   <hasimage>
    <uri>
     <s>../../images/diputreebig.gif</s>
    </uri>
   </hasimage>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>


background image at bottom right corner

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/diputreenormal.gif</s>
    </uri>
   </hasimage>
  <hasposition>
    <offset>
     <hasorigin>
      <bottom/>
      <right/>
     </hasorigin>
     <hasdistance>
      <pixelcount>
       <i>0</i>
      </pixelcount>
     </hasdistance>
    </offset>
   </hasposition>
   <hasdrawmode>
    <single/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>

Explanation

<diputree>

the hasbackground relation between diputree and background

 <hasbackground>
  <background>

the hasimage relation between background and the uri

   <hasimage>
    <uri>
     <s>../../images/diputreenormal.gif</s>
    </uri>
   </hasimage>

the hasposition relation between background and the offset

  <hasposition>
    <offset>

the hasorigin relation between offset and bottom and between offset and right (compressed)

     <hasorigin>
      <bottom/>
      <right/>
     </hasorigin>

the hasdistance relation between offset and pixelcount

     <hasdistance>
      <pixelcount>
       <i>0</i>
      </pixelcount>
     </hasdistance>
    </offset>
   </hasposition>

the hasposition relation between background and single

   <hasdrawmode>
    <single/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>


scaled background image

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/diputreesmall.gif</s>
    </uri>
   </hasimage>
   <hasdrawmode>
    <scale/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/diputreesmall.gif</s>
    </uri>
   </hasimage>

the hasdrawmode relation between background and scale

   <hasdrawmode>
    <scale/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>


repeated background image

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/clouds.jpg</s>
    </uri>
   </hasimage>
   <hasdrawmode>
    <repeat/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <hasbackground>
  <background>
   <hasimage>
    <uri>
     <s>../../images/clouds.jpg</s>
    </uri>
   </hasimage>

the hasdrawmode relation between background and repeat.

    <repeat/>
   </hasdrawmode>
  </background>
 </hasbackground>
 <has>
  <l>
   <lt>a leaf</lt>
  </l>
 </has>
</diputree>


animated label background image

<diputree>
 <has>
  <l>
   <lt>a leaf</lt>
   <haslabel>
    <label>
     <when>
      <closed/>
     </when>
     <hasbackground>
      <background>
       <hasimage>
        <uri>
         <s>../../images/bglabelani.gif</s>
        </uri>
       </hasimage>
      </background>
     </hasbackground>
    </label>
   </haslabel>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <has>
  <l>
   <lt>a leaf</lt>
   <haslabel>
    <label>
     <when>
      <closed/>
     </when>

the hasbackground relation between label and background.

     <hasbackground>
      <background>

the hasimage relation between background and uri.

       <hasimage>
        <uri>
         <s>../../images/bglabelani.gif</s>
        </uri>
       </hasimage>
      </background>
     </hasbackground>
    </label>
   </haslabel>
  </l>
 </has>
</diputree>


diputree documentation © 2000 dipu