adjustContrast()

Description

Adjusts the contrast of a document in the editor.

Syntax

DocumentEditorObject.document.adjustContrast(contrast);

Parameters

<int> contrast: the amount to increase/decrease the contrast by, ranging from -100 to 100. Negative values indicate decreasing contrast while positive values indicate increasing contrast. Each adjustment made to the document is based on the current contrast.

Return value

bool

true indicates success. false indicates failure.

Example

if (DCSObject) {
    var documenteditor = DCSObject.getDocumentEditor("DocumentEditorContainer");
    documenteditor.document.adjustContrast(10);
}

Remarks

If there is no document in the document editor, when you check getErrorString(), you will get an error "There is no document in the document editor.".

If the value you set is not between -100 and 100, when you check getErrorString(), you will get an error "The value of parameter [parameter name] is out of range.".

When false is returned, check getErrorCode() or getErrorString() for error information.

See Also

.document.adjustBrightness()

Is this page helpful?

Leave a Reply

Your email address will not be published.