adjustBrightness()

Description

Adjusts the brightness of a document in the editor.

Syntax

DocumentEditorObject.document.adjustBrightness(brightness);

Parameters

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

Return value

bool

true indicates success. false indicates failure.

Example

if (DCSObject) {
    var documenteditor = DCSObject.getDocumentEditor("DocumentEditorContainer");
    documenteditor.document.adjustBrightness(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.adjustContrast()