Readonly
areaThe area of the field on the canvas as defined by the parameter. If the actual position is required, have a look at FieldBoundingBox and GetBoundingBox.
Flag to control if the field is visible or hidden. Flipped fields will be mirrored horizontally.
Flag to control if the field is vertically flipped or not. Flipped fields will be mirrored vertically.
The height of the field on the canvas. Value in points.
Flag to control if the field is visible or hidden. Hidden fields will not show in the UI and not on the output.
Readonly
page: numberThe index of the page this field is on. The index is zero based.
The rotation of the field on the canvas. Value in degrees. The rotation center is the top left coordinate.
Readonly
subFor spread setups only this is the index of the sub page. The index is zero based.
The width of the field on the canvas. Value in points.
The x coordinate of the field on the canvas. Value in points.
The y coordinate of the field on the canvas. Value in points.
Readonly
zThe z-index of the field on the page. The z-index defines the order of the fields on the page. The higher the z-index, the more on top the field is.
The border object defines the field border settings - which includes not only the border itself but also the background fill of the field. This is available for all field types except path fields.
Readonly
idThe id of the field (GUID) as a unique identifier.
Readonly
imageThe image data object holds information for all image specific settings
The media item set for the field. This can be null if no media item is set.
Readonly
effects: { The effect options applied to the image.
Flag to control if the brightness should be adjusted.
The brightness value to use for adjustment.
Flag to control if the contrast should be adjusted.
The contrast value to use for adjustment.
The effect to apply to the image.
Flag to control if the gamma should be adjusted.
The gamma value to use for adjustment.
Flag to control if the image color values should be inverted.
The opacity of the image.
Flag to control if the image should be pixelated.
The pixelation value to use (controlling the size of the pixelation).
The sharpness adjustment to apply to the image.
Flag to control if the image should be tinted by a color.
The color to use for tinting. This can be any RGB value.
The tint value to use (controlling the amount of tinting).
Readonly
isFlag to control if this image field acts as a clipart or as a media item.
The optional mask item to use for this image.
The image field can rotate the image in addition to the transformation angle by 90° steps.
Readonly
transform: { The transformation of the image being displayed within the field. This will define how the pixel data of the image are transformed to the field outline.
The alignment mode used for the image when it is auto-positioned.
The rotation angle of the image in degrees.
The image blend mode to use
Flag to control if the image is flipped horizontally.
Flag to control if the image is flipped vertically.
Flag to control if the image is scaled automatically to fit the field. This is used when the field gets resized it will adjust the scale factor automatically.
Flag to control if the image is translated horizontally automatically. This is used when the field gets resized.
Flag to control if the image is translated vertically automatically. This is used when the field gets resized.
The scale of the image
The horizontal shift of the image.
The vertical shift of the image.
Readonly
infoThe info or meta data details of the field.
The custom data is an arbitrary object which can be used to store additional information against the field. This is for scripting usage only. Note that there is only a single custom data object per field. So multiple scripts would have to consider a merge or overwrite strategy.
The name of the field. By default empty, this can be used to provide semantic information to the field and will be used for logging, errors and debugging, but can also be helpful for field retrieval. The name of a field doesn't have to be unique and duplicates can happen.
The sequence is used for auto mapping values when applying layouts. In order to determine which field of the new layout should be populated with the value of which field in the old layout the sequence is used. This is independent of creation order or z-index and allows to semantically control this. When generating fields the sequence is automatically set as an incrementing number.
The list of tags. Tags can be also used to retrieve fields and store additional meta data against the field. Note that a tag cannot contain the '|' character.
Readonly
issuesThe issues for this image field.
Readonly
restrictionsThe restrictions set for this image field.
The shadow object defines the field shadow settings. This is available for all field types except path fields.
Readonly
typeThe type of the field. This is always 'ImageField'.
Readonly
uioptionsThe UI options for this image field.
This function will reposition, scale and rotate the current field so that two points of the current image match two points of the target image.
The target image field to align to
The target points to align too. Must have exactly two points.
The source points to use for alignment. Must have exactly two points.
True if the alignment was successful, false otherwise.
Repositions the current field so that the defined pixel location of the target matches the pixel location of the source.
The target image field to align to
The pixel location on the target image field to align to.
The pixel location of the source image to use for alignment.
True if the alignment was successful, false otherwise.
A convenient function to get the global position on the canvas directly using ConvertPixelPositionToRelativeFieldPosition and ConvertRelativeFieldPositionToGlobalLocation.
The pixel position to convert.
The global position of the pixel on the canvas.
Convert a pixel value to a relative field position. This can then be further used for ConvertRelativeFieldPositionToGlobalLocation to understand where in the canvas a certain pixel would sit. Note: this does not work if image angle is used or if the image is flipped.
This can be used to position elements at pixels within the image field.
The pixel position to convert.
The relative position of the pxel within the field.
Converts a relative field position (a position within the field from the top/left corner of the field without the rotation applied) to a global location on the canvas.
The point as the relative position.
The converted point as the global location.
Little helper to calculate the field bounding box - this includes also information about the location of all 4 corner points of the field on teh canvas.
The bounding box of the field. This is the area the field occupies on the canvas.
Rearranges the field on the canvas by adjusting the z-index in relation to the other fields. Updates the field properties.
The z-index change defined by the mode.
Save the changes of the script object back into the editor. This will update the field with the latest changes, but not every change will be reflected directly in the UI. Some changes would require reinitialization.
Note that not all properties can be saved with this function:
Saves the changes of the script back into the editor, while allowing to control certain actions via a save options object. For further information of what can be saved Save
The save options to use for this operation. If the parameter is a boolean, the value is used for the 'addUndo' flag of SaveOptions.
Generated using TypeDoc
An image field will hold a graphical element. The source can be a media item which is uploaded by the user or a clipart item which is part of the product setup. Depending on that, the behaviour will change.