WImage [doc]

A WImage corresponds to an HTML <img> element, and displays an image.

An image:

Like an anchor, you may set the image URL directly, or point the image to a WResource to perhaps generate an image on the fly.

There are alternative methods to display or generate graphics in Wt:

  • You may use the CSS background-image property when using images as styling objects (see Style and Layout).
  • You can also use the vector graphics API to use graphics primitives to paint graphics (see Vector Graphics)

Since WImage derives from WInteractWidget, it provides the usual keyboard and mouse event handling. But images also have support for a more fine-grained event by defining interactive areas (see Event areas).

Related topics: Event areas.

Events will be shown here.