Last updated

API / geotoolkit / scene / exports / NodeAdapter / NodeAdapter

Class: NodeAdapter

exports.NodeAdapter.NodeAdapter

Document Element class that is used to layout the pdf document

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new NodeAdapter(node, exportLimits)

new NodeAdapter(node, exportLimits)

Parameters

Name Type Description
nodeGroup<Node> | Layer<Node>node
exportLimitsRectexport limits in the bounds coordinates

Overrides

AbstractNodeAdapter.constructor

Methods

beginExport

beginExport(): void

Used to prepare object before exporting

Returns

void

Inherited from

AbstractNodeAdapter.beginExport


endExport

endExport(): void

Used to restore object's state after exporting

Returns

void

Inherited from

AbstractNodeAdapter.endExport


getBounds

getBounds(): Rect

Return bounds

Returns

Rect

Inherited from

AbstractNodeAdapter.getBounds


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractNodeAdapter.getClassName


getExportLimits

getExportLimits(): Rect

Returns export limits

Returns

Rect

Inherited from

AbstractNodeAdapter.getExportLimits


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Return desired layout style

Returns

LayoutStyle<string | number>

Inherited from

AbstractNodeAdapter.getLayoutStyle


getLayoutedDimension

getLayoutedDimension(): LayoutedDimension

Compute the dimension in the layout, this dimension is described by a fixed dimension and a scaled dimension

Returns

LayoutedDimension

Inherited from

AbstractNodeAdapter.getLayoutedDimension


getLocalTransformation

getLocalTransformation(): Transformation

return local transformation

Returns

Transformation

Inherited from

AbstractNodeAdapter.getLocalTransformation


getNode

getNode(): Group<Node> | Layer<Node>

Returns the Element node

Returns

Group<Node> | Layer<Node>

node


getScaleMode

getScaleMode(): ScaleMode

Returns node adapter scale mode

Returns

ScaleMode

scale mode

Inherited from

AbstractNodeAdapter.getScaleMode


isHorizontalFlip

isHorizontalFlip(): boolean

Return true if the representation is flipped horizontally

Returns

boolean

flip

Inherited from

AbstractNodeAdapter.isHorizontalFlip


isVerticalFlip

isVerticalFlip(): boolean

Return true if the representation is flipped vertically

Returns

boolean

flip

Inherited from

AbstractNodeAdapter.isVerticalFlip


render

render(context, position): void

render the document in the context

Parameters

Name Type Description
contextDocumentRenderingContextrendering context
positionPointposition of the current document relative to the parent document

Returns

void

Overrides

AbstractNodeAdapter.render


renderAsync

renderAsync(context, position, callback): void

render the document in the context

Parameters

Name Type Description
contextDocumentRenderingContextrendering context
positionPointposition of the current document relative to the parent document
callback() => voidcallback function

Returns

void

Overrides

AbstractNodeAdapter.renderAsync


setBounds

setBounds(bounds): NodeAdapter

Parameters

Name Type
boundsRect

Returns

NodeAdapter

Inherited from

AbstractNodeAdapter.setBounds


setExportLimits

setExportLimits(exportLimits): NodeAdapter

Sets export limits of the node

Parameters

Name Type Description
exportLimitsRectbound of the node

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setExportLimits


setHorizontalFlip

setHorizontalFlip(enable): NodeAdapter

Set horizontal flip of the representation

Parameters

Name Type Description
enablebooleanenable flip

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setHorizontalFlip


setLayoutStyle

setLayoutStyle(layoutStyle): NodeAdapter

Specify desired layout style

Parameters

Name Type Description
layoutStyleLayoutStyle<string | number> | Options<string | number>desired layout style

Returns

NodeAdapter

Inherited from

AbstractNodeAdapter.setLayoutStyle


setLocalTransformation

setLocalTransformation(localTransformation): NodeAdapter

set local transformation

Parameters

Name Type Description
localTransformationTransformationlocal transformation

Returns

NodeAdapter

Inherited from

AbstractNodeAdapter.setLocalTransformation


setScale

setScale(sx, sy): NodeAdapter

set the document scale depending on the parameters isScaledVertically and isScaledHorizontally

Parameters

Name Type Description
sxnumberscale factor in x direction
synumberscale factor in y direction

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setScale


setScaleMode

setScaleMode(scaleMode): NodeAdapter

Set node adapter scale mode

Parameters

Name Type Description
scaleModeScaleModescale mode

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setScaleMode


setTranslation

setTranslation(x, y): NodeAdapter

set the document translation

Parameters

Name Type Description
xnumberoffset x coordinate
ynumberoffset y coordinate

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setTranslation


setVerticalFlip

setVerticalFlip(enable): NodeAdapter

Set vertical flip of the representation

Parameters

Name Type Description
enablebooleanenable flip

Returns

NodeAdapter

this

Inherited from

AbstractNodeAdapter.setVerticalFlip


updateLayout

updateLayout(rect?): void

Set the document bounds

Parameters

Name Type Description
Optional rectRectdocument bounds

Returns

void

Inherited from

AbstractNodeAdapter.updateLayout


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractNodeAdapter.getClassName