Core Function - Imageservice funktion library
The core functions of the imageservice provide the fundamental basic tools for working on pictures in the onion.net Template System. The namespace referencing of http://onionworks.net/2006/imageservice is necessary for using these functions.
Namespace: http://onionworks.net/2006/imageservice
| Name | Parameter | Return type | Description |
|---|---|---|---|
| addPaletteColor | workspace:nodeset index:number color:nodeset |
number | Adds a colour at a certain position in the colour table of a picture. |
| applyCommand | workspaceOrImage:nodeset imageCommand:nodeset |
void | Executes commands for changing the picture information or form. |
| createColor | [alpha:number] red:number green:number blue:number |
nodeset | Creates a colour on the basis of the hexadecimal colour code or of an RGB value. |
| createFont | familyName:string size:number |
nodeset | Specifies a character font. |
| createImage | target:xlink [fromDataSource:boolean] |
nodeset | Creates an image object from the picture data. |
| createPen | nodeset | Creates a pen as a drawing element. | |
| createPoint | x:number y:number |
nodeset | Creates points. |
| createRectangle | x:number y:number width:number height:number |
nodeset | Creates rectangles. |
| createSize | width:number height:number |
nodeset | Creates a size object. |
| createSolidFill | [alpha:number] red:number green:number blue:number |
nodeset | Creates a full colour for filling drawing elements. |
| createTextFormat | alignment:string angle:number interCharacterSpace:number |
nodeset | Aligns text elements which can be drawn with the method “drawText” of the Canvas Library. |
| createWorkspace | target:xlink | nodeset | Creates a workspace on the basis of existing picture data or via a space indication. |
| extractMetadata | target:xlink type:string [fromDataSource:boolean] |
nodeset | Reads out the meta data from picture data. |
| getColorFromPosition | target:xlink [fromDataSource:boolean] x:number y:number |
nodeset | Reads out the colour of a pixel from an existing picture. |
| getPixel | workspace:nodeset x:number y:number |
nodeset | Determines the colour of a certain pixel of a workspace. |
| getPixelIndex | workspace:nodeset x:number y:number |
nodeset | Determines the colour palette index of the colour at a certain pixel. |
| loadFont | target:xlink fromDataSource:boolean size:number |
nodeset | Loads a character font from a file. |
| setPixel | workspace:nodeset x:number y:number color:nodeset |
void | Allocates a colour value to a pixel in a workspace. |
| setPixelIndex | workspace:nodeset x:number y:number index:number |
void | Sets the colour palette index of the colour at a certain pixel. |
| setProperty | obj:nodeset propertyName:string value:any |
void | Sets or overwrites the properties of objects. |
| writeWorkspace | workspace:nodeset encoder:nodeset |
void | Writes the content of a workspace into the binary output stream. |
