API / geotoolkit / scene / exports / DocumentElement / DocumentElement
exports.DocumentElement.DocumentElement
Document Element class that is used to layout the pdf document
↳
DocumentElement
Methods
Constructors
• new DocumentElement(node, isScaledVertically, isScaledHorizontally)
| Name | Type | Description |
|---|---|---|
node | Group<Node> | node |
isScaledVertically | boolean | flag to scale vertically |
isScaledHorizontally | boolean | flag to scale horizontally |
AbstractDocumentElement.constructor
Methods
▸ beginExport(): void
Used to prepare object before exporting
void
AbstractDocumentElement.beginExport
▸ endExport(): void
Used to restore object's state after exporting
void
AbstractDocumentElement.endExport
▸ getClassName(): string
string
AbstractDocumentElement.getClassName
▸ getLayoutedDimension(): LayoutedDimension
Compute the dimension in the layout, this dimension is described by a fixed dimension and a scaled dimension
AbstractDocumentElement.getLayoutedDimension
get the Element node
node
▸ isScaledHorizontally(): boolean
get if the document element is scaled horizontally
boolean
isScaledHorizontally
▸ isScaledVertically(): boolean
get if the document element is scaled vertically
boolean
isScaledVertically
▸ render(context, position): void
render the document in the context
| Name | Type | Description |
|---|---|---|
context | DocumentRenderingContext | rendering context |
position | Point | position of current document element relative to the parent document |
void
AbstractDocumentElement.render
▸ renderAsync(context, position, callback): void
Render document in asynchronous mode. Default implementation creates call method "render" inside
| Name | Type | Description |
|---|---|---|
context | DocumentRenderingContext | rendering context |
position | Point | position of current document element relative to the parent document |
callback | () => void | callback function |
void
AbstractDocumentElement.renderAsync
▸ setScale(sx, sy): DocumentElement
set the document scale depending on the parameters isScaledVertically and isScaledHorizontally
| Name | Type | Description |
|---|---|---|
sx | number | scale factor in x direction |
sy | number | scale factor in y direction |
this
AbstractDocumentElement.setScale
▸ setTranslation(x, y): DocumentElement
set the document translation
| Name | Type | Description |
|---|---|---|
x | number | offset x coordinate |
y | number | offset y coordinate |
this
AbstractDocumentElement.setTranslation
▸ updateLayout(): void
Set the document bounds
void
AbstractDocumentElement.updateLayout
▸ Static getClassName(): string
string