Last updated

API / geotoolkit / scene / exports / AbstractNodeAdapter / AbstractNodeAdapter

Class: AbstractNodeAdapter

exports.AbstractNodeAdapter.AbstractNodeAdapter

Document Element class that is used to layout the pdf document

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new AbstractNodeAdapter(bounds, exportLimits)

Protected new AbstractNodeAdapter(bounds, exportLimits)

Parameters

Name Type Description
boundsRectbounds
exportLimitsRectexport limits in the bounds coordinates

Overrides

AbstractDocumentElement.constructor

Methods

beginExport

beginExport(): void

Used to prepare object before exporting

Returns

void

Inherited from

AbstractDocumentElement.beginExport


endExport

endExport(): void

Used to restore object's state after exporting

Returns

void

Inherited from

AbstractDocumentElement.endExport


getBounds

getBounds(): Rect

Return bounds

Returns

Rect


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractDocumentElement.getClassName


getExportLimits

getExportLimits(): Rect

Returns export limits

Returns

Rect


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Return desired layout style

Returns

LayoutStyle<string | number>


getLayoutedDimension

getLayoutedDimension(): LayoutedDimension

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

Returns

LayoutedDimension

Overrides

AbstractDocumentElement.getLayoutedDimension


getLocalTransformation

getLocalTransformation(): Transformation

return local transformation

Returns

Transformation


getScaleMode

getScaleMode(): ScaleMode

Returns node adapter scale mode

Returns

ScaleMode

scale mode


isHorizontalFlip

isHorizontalFlip(): boolean

Return true if the representation is flipped horizontally

Returns

boolean

flip


isVerticalFlip

isVerticalFlip(): boolean

Return true if the representation is flipped vertically

Returns

boolean

flip


render

Abstract render(context, position?): void

render the document in the context

Parameters

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

Returns

void

Inherited from

AbstractDocumentElement.render


renderAsync

renderAsync(context, position, callback): void

Render document in asynchronous mode. Default implementation creates call method "render" inside

Parameters

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

Returns

void

Inherited from

AbstractDocumentElement.renderAsync


setBounds

setBounds(bounds): AbstractNodeAdapter

Parameters

Name Type
boundsRect

Returns

AbstractNodeAdapter


setExportLimits

setExportLimits(exportLimits): AbstractNodeAdapter

Sets export limits of the node

Parameters

Name Type Description
exportLimitsRectbound of the node

Returns

AbstractNodeAdapter

this


setHorizontalFlip

setHorizontalFlip(enable): AbstractNodeAdapter

Set horizontal flip of the representation

Parameters

Name Type Description
enablebooleanenable flip

Returns

AbstractNodeAdapter

this


setLayoutStyle

setLayoutStyle(layoutStyle): AbstractNodeAdapter

Specify desired layout style

Parameters

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

Returns

AbstractNodeAdapter


setLocalTransformation

setLocalTransformation(localTransformation): AbstractNodeAdapter

set local transformation

Parameters

Name Type Description
localTransformationTransformationlocal transformation

Returns

AbstractNodeAdapter


setScale

setScale(sx, sy): AbstractNodeAdapter

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

AbstractNodeAdapter

this

Overrides

AbstractDocumentElement.setScale


setScaleMode

setScaleMode(scaleMode): AbstractNodeAdapter

Set node adapter scale mode

Parameters

Name Type Description
scaleModeScaleModescale mode

Returns

AbstractNodeAdapter

this


setTranslation

setTranslation(x, y): AbstractNodeAdapter

set the document translation

Parameters

Name Type Description
xnumberoffset x coordinate
ynumberoffset y coordinate

Returns

AbstractNodeAdapter

this

Overrides

AbstractDocumentElement.setTranslation


setVerticalFlip

setVerticalFlip(enable): AbstractNodeAdapter

Set vertical flip of the representation

Parameters

Name Type Description
enablebooleanenable flip

Returns

AbstractNodeAdapter

this


updateLayout

updateLayout(rect?): void

Set the document bounds

Parameters

Name Type Description
Optional rectRectdocument bounds

Returns

void

Overrides

AbstractDocumentElement.updateLayout


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractDocumentElement.getClassName