Class: RenderOptionUtils

Kekule.Render. RenderOptionUtils

new RenderOptionUtils()

Help methods to manipulate renderOptions property of a chem structure object.
Source:

Methods

(static) convert2DConfigsToPlainHash(render2DConfigs) → {Hash}

Convert the whole Kekule.Render.Render2DConfigs instance into a one-level hash object.
Parameters:
Name Type Description
render2DConfigs Kekule.Render.Render2DConfigs
Source:
Returns:
Type
Hash

(static) convert3DConfigsToPlainHash(render3DConfigs) → {Hash}

Convert the whole Kekule.Render.Render3DConfigs instance into a one-level hash object.
Parameters:
Name Type Description
render3DConfigs Kekule.Render.Render3DConfigs
Source:
Returns:
Type
Hash

(static) getConnectorDrawParams(renderOptions) → {Hash}

Retrieve params for drawing connectors.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Hash

(static) getConnectorRenderType(renderOptions) → {Int}

Retrieve bond render type from renderOptions of a chem object.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Int

(static) getHydrogenDisplayLevel(renderOptions) → {Int}

Get hydrongen display level of a node.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Int

(static) getMoleculeDisplayType(renderOptions) → {Int}

Get molecule display type from render options.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Int

(static) getNodeDisplayMode(renderOptions) → {Int}

Get display mode of a node.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Int

(static) getNodeLabelDrawOptions(renderOptions) → {Hash}

Retrieve useful options to draw rich text (including font size, font family and so on) from renderOptions.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Hash

(static) getShowCharge(renderOptions) → {Bool}

Check whether charge should be displayed.
Parameters:
Name Type Description
renderOptions Object
Source:
Returns:
Type
Bool

(static) mergeObjLocalRender3DOptions(obj, options) → {Hash}

Create a new options object, inherits settings from options and local renderOptions of obj.
Parameters:
Name Type Description
obj Kekule.ChemObject
options Hash
Source:
Returns:
Type
Hash

(static) mergeObjLocalRenderOptions(obj, options) → {Hash}

Create a new options object, inherits settings from options and local renderOptions of obj.
Parameters:
Name Type Description
obj Kekule.ChemObject
options Hash
Source:
Returns:
Type
Hash

(static) mergeRenderOptions(childOptions, parentOptions) → {Hash}

Merge childOptions into parentOptions.
Parameters:
Name Type Description
childOptions Hash
parentOptions Hash
Source:
Returns:
Type
Hash