1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Displaying Images With Shoes


3 of 4

Using Images as Backgrounds
Displaying Images With Shoes

The filename of an image can be used as the background for any stack or flow. The image will be tiled to take up all the space in the stack or flow. Note that when using the background method, always use it first thing in the stack or flow. If the background method is called after other elements, the background will paint over those other elements.

Shoes.app :width => 350, :height => 310 do
  background 'background.jpg'
  para "This is a paragraph that will ",
    "be displayed over the background image.",
    "A different color was selected to make ",
    "the text stand out better against the ",
    "background", :stroke => yellow
  1. About.com
  2. Technology
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Using Images as Backgrounds

©2014 About.com. All rights reserved.