Image
Represents an image (see example).
| Name | Type | Default | Description | 
|---|---|---|---|
| options | 
 | The configuration of this element. | 
Constructors
Image
(src: string, rect: Rect)
Creates an image instance.
Parameters
src
string
The source image URL.
rect
A rectangle defining the image size and position.
Methods
| bbox | ||||
|---|---|---|---|---|
| Returns the bounding box of the element with applied transformations. | ||||
| 
 | 
| className | ||||
|---|---|---|---|---|
| Gets the class attribute of the element. The class will be rendered only for SVG output. | ||||
| 
 | 
| className | ||||||
|---|---|---|---|---|---|---|
| Sets the class attribute of the element. The class will be rendered only for SVG output. | ||||||
| 
 | 
| clip | ||||||
|---|---|---|---|---|---|---|
| Sets the clipping path for this element. The Path instance will be monitored for changes. Can be replaced by calling the  The following example demonstrates how to set a clipping path on a Circle. Change Theme Theme Loading ... The following example demonstrates how to clear a clipping path. Change Theme Theme Loading ... | ||||||
| 
 | 
| clippedBBox | ||||
|---|---|---|---|---|
| Returns the bounding box of the element with clipping and transformations applied. This is the rectangle that will fit around the actual rendered element. | ||||
| 
 | 
| containsPoint | ||||||
|---|---|---|---|---|---|---|
| Returns  | ||||||
| 
 | ||||||
| 
 | 
| opacity | ||||
|---|---|---|---|---|
| Gets the element opacity. | ||||
| 
 | 
| opacity | ||||||
|---|---|---|---|---|---|---|
| Sets the opacity of the element. Change Theme Theme Loading ... | ||||||
| 
 | 
| rect | ||||
|---|---|---|---|---|
| Gets the rectangle which defines the position and size of the image. | ||||
| 
 | 
| rect | ||||||
|---|---|---|---|---|---|---|
| Sets the rectangle which defines the position and size of the image. | ||||||
| 
 | 
| src | ||||
|---|---|---|---|---|
| Gets the source URL of the image. | ||||
| 
 | 
| src | ||||||
|---|---|---|---|---|---|---|
| Sets the source URL of the image. | ||||||
| 
 | 
| transform | ||||
|---|---|---|---|---|
| Gets the transformation of the element. | ||||
| 
 | 
| transform | ||||||
|---|---|---|---|---|---|---|
| Sets the transformation of the element. Change Theme Theme Loading ... | ||||||
| 
 | 
| visible | ||||
|---|---|---|---|---|
| Gets the visibility of the element. | ||||
| 
 | 
| visible | ||||||
|---|---|---|---|---|---|---|
| Sets the visibility of the element. Change Theme Theme Loading ... | ||||||
| 
 |