FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
OverlayComparisonOptionsService Class Reference

Public Member Functions

CombinePixelsOptions extractAllOptions ()
 Extract all options as plain objects described by the CombinePixelsOptions interface. More...
 
Function onChange (type:CombinePixelsOptionsKey, callback:OnOptionChangeCallback)
 Monitoring option changes. More...
 
void setBlendColorResolver (BlendColorResolver blendColorResolver)
 Customize the blend color resolver, and changes can be monitored through `OverlayComparisonOptionsService.onChange('blendColorResolver', callback)`. More...
 
void setShowDiffColor (boolean showDiffColor)
 Set whether to display the difference color, and changes can be monitored through `OverlayComparisonOptionsService.onChange('showDiffColor', callback)`. More...
 
void setSourceDiffColor (DiffColor sourceDiffColor)
 Set the diff-color of the source document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('sourceDiffColor', callback)`. More...
 
void setSourceOpacity (number sourceOpacity)
 Set the opacity of the source document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('sourceDocumentOpacity', callback)`. More...
 
void setTargetDiffColor (DiffColor targetDiffColor)
 Set the diff-color of the target document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('targetDiffColor', callback)`. More...
 
void setTargetOpacity (number targetOpacity)
 Set the opacity of the target document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('targetDocumentOpacity', callback)`. More...
 

Detailed Description

Member Function Documentation

◆ extractAllOptions()

CombinePixelsOptions OverlayComparisonOptionsService::extractAllOptions ( )

Extract all options as plain objects described by the CombinePixelsOptions interface.

Returns
CombinePixelsOptions - A object copy of CombinePixelsOptions
Since
9.0.0

◆ onChange()

Function OverlayComparisonOptionsService::onChange ( type:CombinePixelsOptionsKey  ,
callback:OnOptionChangeCallback   
)

Monitoring option changes.

Parameters
typeCombinePixelsOptionsKey - The event type, should be the key of CombinePixelsOptions.
callbackOnOptionChangeCallback - A callback to handle the changes of CombinePixelsOptions.
Returns
()=>void - A function used to remove event listener.
Since
9.0.0

◆ setBlendColorResolver()

void OverlayComparisonOptionsService::setBlendColorResolver ( BlendColorResolver  blendColorResolver)

Customize the blend color resolver, and changes can be monitored through `OverlayComparisonOptionsService.onChange('blendColorResolver', callback)`.

Parameters
blendColorResolverBlendColorResolver - The blend color algorithm function, which will be override the built-in blend color algorithm implementation.
See also
onChange
Since
9.0.0

◆ setShowDiffColor()

void OverlayComparisonOptionsService::setShowDiffColor ( boolean  showDiffColor)

Set whether to display the difference color, and changes can be monitored through `OverlayComparisonOptionsService.onChange('showDiffColor', callback)`.

Parameters
showDiffColorboolean - If true, the difference color will be calculated based on targetDiffColor and sourceDiffColor.
See also
BlendColorResolver
Since
9.0.0

◆ setSourceDiffColor()

void OverlayComparisonOptionsService::setSourceDiffColor ( DiffColor  sourceDiffColor)

Set the diff-color of the source document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('sourceDiffColor', callback)`.

Parameters
sourceDiffColorDiffColor - Enumeration item of DiffColor
Since
9.0.0

◆ setSourceOpacity()

void OverlayComparisonOptionsService::setSourceOpacity ( number  sourceOpacity)

Set the opacity of the source document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('sourceDocumentOpacity', callback)`.

Parameters
sourceOpacitynumber - An integer values between 0 and 255 (inclusive).
Since
9.0.0

◆ setTargetDiffColor()

void OverlayComparisonOptionsService::setTargetDiffColor ( DiffColor  targetDiffColor)

Set the diff-color of the target document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('targetDiffColor', callback)`.

Parameters
targetDiffColorDiffColor - Enumeration item of DiffColor.
Since
9.0.0

◆ setTargetOpacity()

void OverlayComparisonOptionsService::setTargetOpacity ( number  targetOpacity)

Set the opacity of the target document displayed on the comparison result image, and changes can be monitored through `OverlayComparisonOptionsService.onChange('targetDocumentOpacity', callback)`.

Parameters
targetOpacitynumber - An integer values between 0 and 255 (inclusive).
Since
9.0.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.