get_invert();
set_invert(value);
!MISSING Scrap '_RTJavaScript_PROPERTY_SYNTAX'!
Type | Description |
---|---|
boolean | true to invert the image; otherwise, it is false. Default value is false. |
Changing the value of this property will fire the PropertyChanged event and calls Invalidate.
When the value of this property is flipped between true and false, the image in BackCanvas will be inverted. Unlike Flip, Reverse and RotateAngle, the image data will change.
Note that the viewer will use HTML 5 getImageData on the back canvas. If the URL of the image is not in the same domain, a security error might occur. For more information, refer to getImageData.
Start with the ImageViewer example, remove all the code inside the example function (search for the // TODO: add example code here comment) and insert the following code:
Open the HTML page in your browser, now when you click the Example button, the image will invert and invert back.
example: function SiteLibrary_DefaultPage$example(viewer) { // Flip the state of invert viewer.set_invert(!viewer.get_invert()); },