mxImageShape

Extends mxShape to implement an image shape.  This shape is registered under mxConstants.SHAPE_IMAGE in mxCellRenderer.

Summary
mxImageShapeExtends mxShape to implement an image shape.
Functions
mxImageShapeConstructs a new image shape.
Variables
crispDisables crisp rendering via attributes.
preserveImageAspectSwitch to preserve image aspect.
Functions
applyOverrides mxShape.apply to replace the fill and stroke colors with the respective values from mxConstants.STYLE_IMAGE_BACKGROUND and mxConstants.STYLE_IMAGE_BORDER.
createOverride to create HTML regardless of gradient and rounded property.
updateAspectUpdates the aspect of the image for the given image width and height.
scheduleUpdateAspectSchedules an asynchronous updateAspect using the current <image>.
redrawOverrides mxShape.redraw to preserve the aspect ratio of images.
configureTransparentBackgroundWorkaround for security warning in IE if this is used in the overlay pane of a diagram.
redrawSvgUpdates the SVG node(s) to reflect the latest bounds and scale.
configureSvgShapeExtends method to set opacity on images.

Functions

mxImageShape

function mxImageShape(bounds,
image,
fill,
stroke,
strokewidth)

Constructs a new image shape.

Parameters

boundsmxRectangle that defines the bounds.  This is stored in mxShape.bounds.
imageString that specifies the URL of the image.  This is stored in <image>.
fillString that defines the fill color.  This is stored in <fill>.
strokeString that defines the stroke color.  This is stored in <stroke>.
strokewidthOptional integer that defines the stroke width.  Default is 0.  This is stored in <strokewidth>.

Variables

crisp

mxImageShape.prototype.crisp

Disables crisp rendering via attributes.  Image quality defines the rendering quality.  Default is false.

preserveImageAspect

mxImageShape.prototype.preserveImageAspect

Switch to preserve image aspect.  Default is true.

Functions

apply

mxImageShape.prototype.apply = function(state)

Overrides mxShape.apply to replace the fill and stroke colors with the respective values from mxConstants.STYLE_IMAGE_BACKGROUND and mxConstants.STYLE_IMAGE_BORDER.

Applies the style of the given mxCellState to the shape.  This implementation assigns the following styles to local fields:

Parameters

statemxCellState of the corresponding cell.

create

mxImageShape.prototype.create = function()

Override to create HTML regardless of gradient and rounded property.

updateAspect

mxImageShape.prototype.updateAspect = function(w,
h)

Updates the aspect of the image for the given image width and height.

scheduleUpdateAspect

mxImageShape.prototype.scheduleUpdateAspect = function()

Schedules an asynchronous updateAspect using the current <image>.

redraw

mxImageShape.prototype.redraw = function()

Overrides mxShape.redraw to preserve the aspect ratio of images.

configureTransparentBackground

mxImageShape.prototype.configureTransparentBackground = function(node)

Workaround for security warning in IE if this is used in the overlay pane of a diagram.

redrawSvg

mxImageShape.prototype.redrawSvg = function()

Updates the SVG node(s) to reflect the latest bounds and scale.

configureSvgShape

mxImageShape.prototype.configureSvgShape = function(node)

Extends method to set opacity on images.

Base class for all shapes.
function mxImageShape(bounds,
image,
fill,
stroke,
strokewidth)
Constructs a new image shape.
mxImageShape.prototype.crisp
Disables crisp rendering via attributes.
mxImageShape.prototype.preserveImageAspect
Switch to preserve image aspect.
mxImageShape.prototype.apply = function(state)
Overrides mxShape.apply to replace the fill and stroke colors with the respective values from mxConstants.STYLE_IMAGE_BACKGROUND and mxConstants.STYLE_IMAGE_BORDER.
mxShape.prototype.apply = function(state)
Applies the style of the given mxCellState to the shape.
Defines the key for the image background color.
Defines the key for the image border color.
mxImageShape.prototype.create = function()
Override to create HTML regardless of gradient and rounded property.
mxImageShape.prototype.updateAspect = function(w,
h)
Updates the aspect of the image for the given image width and height.
mxImageShape.prototype.scheduleUpdateAspect = function()
Schedules an asynchronous updateAspect using the current image.
mxImageShape.prototype.redraw = function()
Overrides mxShape.redraw to preserve the aspect ratio of images.
mxShape.prototype.redraw = function()
Invokes redrawSvg, redrawVml or redrawHtml depending on the dialect of the shape.
mxImageShape.prototype.configureTransparentBackground = function(node)
Workaround for security warning in IE if this is used in the overlay pane of a diagram.
mxImageShape.prototype.redrawSvg = function()
Updates the SVG node(s) to reflect the latest bounds and scale.
mxImageShape.prototype.configureSvgShape = function(node)
Extends method to set opacity on images.
Name under which mxImageShape is registered in mxCellRenderer.
Renders cells into a document object model.
Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.
mxShape.prototype.bounds
Holds the mxRectangle that specifies the bounds of this shape.
Represents the current state of a cell in a given mxGraphView.
Close