var instance = new Vintasoft.Shared.WebImageJS(imageSource, pageIndex); var value; // Type: object // Parameters var tileRenderingSettings; // Type: object var successFunc; // Type: function var errorFunc; // Type: function value = instance.renderTile(tileRenderingSettings, successFunc, errorFunc);
function renderTile(
tileRenderingSettingsSettings for rendering of image tile.: object,
An object with following properties:
- x (number): X coordinate of tile on source image (X coordinate without scale). Required parameter.
- y (number): Y coordinate of tile on source image (Y coordinate without scale). Required parameter.
- width (number): The width, in pixels, of scaled tile. Required parameter.
- height (number): The height, in pixels, of scaled tile. Required parameter.
- scale (object): The scale (horizontal and vertical) of image tile. Supported values: 0.1 - 10%, 1 - 100%, etc. Optional parameter, default value is {x:1,y:1}.
- useCache (boolean): Value indicating whether rendered image tile must be saved on server. Optional parameter, default value is true.
- format (object): An instance of WebImageTypeEnumJS class that defines a format in which an image tile must be returned. Optional parameter, default value is WebImageTypeEnumJS.Url.
- renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is WebImageJS.get_RenderingSettings of image.
- decodingSettings (object): WebDecodingSettingsJS object. Optional parameter, default value is WebImageJS.get_DecodingSettings of image.
successFuncFunction that will be executed if request is executed successfully.: Function,
Here is function prototype "function __success(data)".
The data parameter has the following properties:
- fileId (string): Image file identifier.
- pos (object): Tile position on source image.
- size (object): Tile size.
- useCache (boolean): Indicates that the rendered image tile is saved on server.
- scale (object): The scale (horizontal and vertical) of image tile.
- image (object): An instance of WebImageJS class that represents the source image.
errorFuncFunction that will be executed if request is failed.: Function
Here is function prototype "function __error(data)".
The data parameter can be:
- An object with following properties:
if exception is catched inside web service.
- errorMessage (string): Error message.
- blocked (boolean): Indicates that the requested action is blocked by another request.
- Otherwise, jqXHR object.
) : object;
Parameters
- tileRenderingSettings
- Settings for rendering of image tile.
An object with following properties:
- x (number): X coordinate of tile on source image (X coordinate without scale). Required parameter.
- y (number): Y coordinate of tile on source image (Y coordinate without scale). Required parameter.
- width (number): The width, in pixels, of scaled tile. Required parameter.
- height (number): The height, in pixels, of scaled tile. Required parameter.
- scale (object): The scale (horizontal and vertical) of image tile. Supported values: 0.1 - 10%, 1 - 100%, etc. Optional parameter, default value is {x:1,y:1}.
- useCache (boolean): Value indicating whether rendered image tile must be saved on server. Optional parameter, default value is true.
- format (object): An instance of WebImageTypeEnumJS class that defines a format in which an image tile must be returned. Optional parameter, default value is WebImageTypeEnumJS.Url.
- renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is WebImageJS.get_RenderingSettings of image.
- decodingSettings (object): WebDecodingSettingsJS object. Optional parameter, default value is WebImageJS.get_DecodingSettings of image.
- successFunc
- Function that will be executed if request is executed successfully.
Here is function prototype "function __success(data)".
The data parameter has the following properties:
- fileId (string): Image file identifier.
- pos (object): Tile position on source image.
- size (object): Tile size.
- useCache (boolean): Indicates that the rendered image tile is saved on server.
- scale (object): The scale (horizontal and vertical) of image tile.
- image (object): An instance of WebImageJS class that represents the source image.
- errorFunc
- Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
- An object with following properties:
- errorMessage (string): Error message.
- blocked (boolean): Indicates that the requested action is blocked by another request.
- Otherwise, jqXHR object.
- An object with following properties:
Return Value
Request object.