Class Index | File Index

Classes


Class pv.Image

Extends pv.Bar.

Represents an image. Images share the same layout and style properties as bars, in conjunction with an external image such as PNG or JPEG. The image is specified via the #url property. The fill, if specified, appears beneath the image, while the optional stroke appears above the image.

TODO Restore support for dynamic images (such as heatmaps). These were supported in the canvas implementation using the pixel buffer API; although SVG does not support pixel manipulation, it is possible to embed a canvas element in SVG using foreign objects.

TODO Allow different modes of image placement: "scale" -- scale and preserve aspect ratio, "tile" -- repeat the image, "center" -- center the image, "fill" -- scale without preserving aspect ratio.

See pv.Bar for details on positioning properties.

Defined in: Image.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new dot mark with default properties.
Field Summary
Field Attributes Field Name and Description
 
Default properties for images.
 
url
The URL of the image to display.
Fields borrowed from class pv.Bar:
fillStyle, height, lineWidth, strokeStyle, width
Fields borrowed from class pv.Mark:
bottom, childIndex, cursor, data, index, left, parent, proto, reverse, right, root, scene, title, top, type, visible
Methods borrowed from class pv.Bar:
anchor
Methods borrowed from class pv.Mark:
add, anchorTarget, cousin, def, event, extend, first, last, mouse, render, sibling
Class Detail
pv.Image()

Constructs a new dot mark with default properties. Images are not typically constructed directly, but by adding to a panel or an existing mark via pv.Mark#add.

Field Detail
{pv.Image} defaults

Default properties for images. By default, there is no stroke or fill style.


{string} url

The URL of the image to display. The set of supported image types is browser-dependent; PNG and JPEG are recommended.


Documentation generated by JsDoc Toolkit 2.3.0 on Sat Sep 19 2009 10:26:36 GMT-0700 (PDT)