| Package | com.yworks.graph.drawing |
| Class | public class ImageIcon |
| Inheritance | ImageIcon Object |
| Implements | IIcon |
IIcon interface that paints an image.
| Property | Defined By | ||
|---|---|---|---|
| className : String [read-only]
The name of the image class
| ImageIcon | ||
| height : Number
The height of the icon. | ImageIcon | ||
| image : DisplayObject [read-only]
The displayed image. | ImageIcon | ||
| loaded : Boolean [read-only]
Whether the image associated with this style is completely loaded. | ImageIcon | ||
| url : String
The URL this image is to be loaded from. | ImageIcon | ||
| width : Number
The width of the icon. | ImageIcon | ||
| Method | Defined By | ||
|---|---|---|---|
ImageIcon(image:Object, width:Number = -1, height:Number = -1)
Creates a new Icon with the given image. | ImageIcon | ||
Paint the icon onto the graphics context at the given position. | ImageIcon | ||
| className | property |
className:String [read-only] The name of the image class
public function get className():String| height | property |
height:NumberThe height of the icon.
public function get height():Number public function set height(value:Number):void| image | property |
image:DisplayObject [read-only] The displayed image.
public function get image():DisplayObject| loaded | property |
loaded:Boolean [read-only] Whether the image associated with this style is completely loaded.
public function get loaded():Boolean| url | property |
url:StringThe URL this image is to be loaded from.
Setting an image url causes this style to load the image from the given url.
public function get url():String public function set url(value:String):void| width | property |
width:NumberThe width of the icon.
public function get width():Number public function set width(value:Number):void| ImageIcon | () | Constructor |
public function ImageIcon(image:Object, width:Number = -1, height:Number = -1)Creates a new Icon with the given image.
Parametersimage:Object — An object which specifies an image.
The following types are allowed to specify the image that will be displayed be the style:
If a DisplayObject instance is passed that does not extend SpriteAsset or BitmapAsset and that does not implement ICloneable, the style instance can not be shared and printing may not work properly.
If a | |
width:Number (default = -1) | |
height:Number (default = -1) |
| paint | () | method |
public function paint(g:YGraphics, x:Number, y:Number):voidPaint the icon onto the graphics context at the given position.
Parameters
g:YGraphics — The graphics to render into.
| |
x:Number — The top left x coordinate of the icon.
| |
y:Number — The top left y coordinate of the icon.
|