FANDOM


<image>Edit

An image object encapsulates all the properties of a particular image.


alignmentEdit

A synonym for hAlign. These days, hAlign is preferred over alignment.

clipRectEdit

The clipRect controls what part of an image is shown. It was created in the days before frames. These days, it's preferable to use frames to clip contents instead, as it's simpler to manage.

Clips the visible image at X, Y, Width, Height.

Possible Values: String "X, Y, width, Height" or "" or null

where X, Y, Width, Height are Integer values. '""' or 'null' clear the clipRect.

If Omitted: The default value of "-1, -1, -1, -1" is used - meaning no clip rectangle.

JavaScript:

myImageName.clipRect = "10, 10, 40, 40";

Example:

<clipRect>10, 10, 40, 40</clipRect>
or
<clipRect="10, 10, 40, 40" />

Questions:

  • How is the clipRect positioned? Does the "X, Y" of the clipRect become the new hOffset, vOffset of the image?

Answer:

  • The clipRect does not affect the position of the image at all. It only controls what is shown. If you clip using the example above, the image will appear to start 10 pixels down and right of where it actually starts, but it's real position has not been affected.

colorizeEdit

contextMenuItemsEdit

fillModeEdit

The fillMode attribute is used to control how an image reacts when the pixel dimensions of the source file are different than the height and width defined for the image object. There are two allowable values: "stretch" and "tile".

Stretch will simply scale the image source up or down to fit the given height and width of the image. Tile will leave the source at its original dimensions and will repeat it both horizontally and/or vertically as needed to meed the width and height defined.

Possible Values: Strings "stretch" or "tile"

If Omitted: The default value of "stretch" is used.

JavaScript:

myObjectName.fillMode = "tile";

Example:

<fillMode>tile</fillMode>

or

<fillMode = "tile" />

See also:

heightEdit

The height attribute controls the vertical dimension of the box model, or how high it looks on the screen.

If Omitted: The height of the box defaults to a value of -1 and the box height is then automatically determined.

JavaScript:

myObjectName.height = 30;

Example:

<height>30</height>

or

<height = "30" />

See also:

hAlignEdit

hAlign will control how the object is aligned, working together with hOffset. hAlign also is a synonym of alignment, so never use both.

Possible values are:

  • left - hOffset correspond to the left edge
  • right - hOffset will correspond to the right edge
  • center - hOffset will correspond to the middle

JavaScript:

myObjectName.hAlign = "center";

Example:

<hAlign>center</hAlign>

See also:


hOffsetEdit

the horizontal offset of the object

JavaScript:

myObjectName.hOffset = 44;

Example:

<hOffset>44</hOffset>

See also:

hRegistrationPointEdit

See also:


hslAdjustmentEdit

hslTintingEdit

nameEdit

The name is used to identify the object in JavaScript.

JavaScript:

object.name = "myObjectName";

Example:

<name>myObjectName</name>

onContextMenuEdit

CommonAttrib:onContextMenu

onDragDropEdit

CommonAttrib:onDragDrop

onDragEnterEdit

CommonAttrib:onDragEnter

onDragExitEdit

CommonAttrib:onDragExit

onMouseDownEdit

CommonAttrib:onMouseDown

onMouseEnterEdit

CommonAttrib:onMouseEnter

onMouseExitEdit

CommonAttrib:onMouseExit

onMouseMoveEdit

CommonAttrib:onMouseMove

onMouseUpEdit

CommonAttrib:onMouseUp

onMultiClickEdit

CommonAttrib:onMultiClick

opacityEdit

opacity controls the opacity =)

It is a range from 0 to 255. 0 being invisible and 255 being completely opaque.

To hide an object, a common practice is to set its opacity to 0. But these days, the 'visible' property is the better thing to use, as you don't have to track the previous opacity to restore it later.

To hide an object but still interact with it, it's common practice to set its opacity to 1. See also: object tracking

JavaScript:

myObjectName.opacity = 200;

Example:

<opacity>200</opacity>

rotationEdit

srcEdit

srcHeightEdit

This is a read only attribute.

See also:


srcWidthEdit

This is a read only attribute.

See also:


tileOriginEdit

useFileIconEdit

When src is set to a path to a file, and useFileIcon == true, Konfabulator will display the icon for the file.

Possible Values: boolean

Returns: a 32x32 image.

Bugs: (2.1.1) won't work with 16 bit icons link

vAlignEdit

vAlign works similar to hAlign, and works with vOffset.

It can take on the values of: top, bottom, or center

See also:

vOffsetEdit

vOffset controls the vertical placement. This works with vAlign and is related to hOffset.

value : integer (floating point just gets rounded)

JavaScript:

myObjectName.vOffset = 100;

Example:

<vOffset>100</vOffset>

See also:

vRegistrationPointEdit

See also:


widthEdit

width controls how wide the object appears to be. Related to height.

value : integer (floating point gets rounded)

See also:

windowEdit

Most widgets only contain one window, however, after version 2.0, widgets could have multiple windows, and the window attribute specifies to which window the object belongs to. However, in version 2.1, a new syntax was introduced that makes this attribute obsolete.

zOrderEdit

Stacking order. Objects with lower zOrders appear below higher zOrders.

value : nonnegative integers

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.