Skip to content
Last updated

API / geotoolkit / scene / exports / DocumentElement / DocumentElement

Class: DocumentElement

exports.DocumentElement.DocumentElement

Document Element class that is used to layout the pdf document

Hierarchy

Table of contents

Constructors
  • [new DocumentElement(node, isScaledVertically, isScaledHorizontally)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.scene.exports.documentelement.documentelement.md#new documentelement(node, isscaledvertically, isscaledhorizontally))
Methods

Contents

Constructors

new DocumentElement(node, isScaledVertically, isScaledHorizontally)

• new DocumentElement(node, isScaledVertically, isScaledHorizontally)

Parameters

Name Type Description
nodeGroup<Node&gt;node
isScaledVerticallybooleanflag to scale vertically
isScaledHorizontallybooleanflag to scale horizontally

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


getClassName

▸ getClassName(): string

Returns

string

Inherited from

AbstractDocumentElement.getClassName


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


getNode

▸ getNode(): Group<Node&gt;

get the Element node

Returns

Group<Node&gt;

node


isScaledHorizontally

▸ isScaledHorizontally(): boolean

get if the document element is scaled horizontally

Returns

boolean

isScaledHorizontally


isScaledVertically

▸ isScaledVertically(): boolean

get if the document element is scaled vertically

Returns

boolean

isScaledVertically


render

▸ render(context, position): void

render the document in the context

Parameters

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

Returns

void

Overrides

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


setScale

▸ setScale(sx, sy): DocumentElement

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

DocumentElement

this

Overrides

AbstractDocumentElement.setScale


setTranslation

▸ setTranslation(x, y): DocumentElement

set the document translation

Parameters

Name Type Description
xnumberoffset x coordinate
ynumberoffset y coordinate

Returns

DocumentElement

this

Overrides

AbstractDocumentElement.setTranslation


updateLayout

▸ updateLayout(): void

Set the document bounds

Returns

void

Overrides

AbstractDocumentElement.updateLayout


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

AbstractDocumentElement.getClassName