API / geotoolkit / scene / exports / NodeAdapter / NodeAdapter
exports.NodeAdapter.NodeAdapter
Document Element class that is used to layout the pdf document
↳
NodeAdapter
Constructors
Methods
Constructors
• new NodeAdapter(node, exportLimits)
| Name | Type | Description |
|---|---|---|
node | Group<Node> | Layer<Node> | node |
exportLimits | Rect | export limits in the bounds coordinates |
AbstractNodeAdapter.constructor
Methods
▸ beginExport(): void
Used to prepare object before exporting
void
AbstractNodeAdapter.beginExport
▸ endExport(): void
Used to restore object's state after exporting
void
▸ getBounds(): Rect
Return bounds
▸ getClassName(): string
string
AbstractNodeAdapter.getClassName
▸ getExportLimits(): Rect
Returns export limits
AbstractNodeAdapter.getExportLimits
▸ getLayoutStyle(): LayoutStyle<string | number>
Return desired layout style
LayoutStyle<string | number>
AbstractNodeAdapter.getLayoutStyle
▸ getLayoutedDimension(): LayoutedDimension
Compute the dimension in the layout, this dimension is described by a fixed dimension and a scaled dimension
AbstractNodeAdapter.getLayoutedDimension
▸ getLocalTransformation(): Transformation
return local transformation
AbstractNodeAdapter.getLocalTransformation
▸ getNode(): Group<Node> | Layer<Node>
Returns the Element node
node
▸ getScaleMode(): ScaleMode
Returns node adapter scale mode
scale mode
AbstractNodeAdapter.getScaleMode
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
flip
AbstractNodeAdapter.isHorizontalFlip
▸ isVerticalFlip(): boolean
Return true if the representation is flipped vertically
boolean
flip
AbstractNodeAdapter.isVerticalFlip
▸ render(context, position): void
render the document in the context
| Name | Type | Description |
|---|---|---|
context | DocumentRenderingContext | rendering context |
position | Point | position of the current document relative to the parent document |
void
▸ renderAsync(context, position, callback): void
render the document in the context
| Name | Type | Description |
|---|---|---|
context | DocumentRenderingContext | rendering context |
position | Point | position of the current document relative to the parent document |
callback | () => void | callback function |
void
AbstractNodeAdapter.renderAsync
▸ setBounds(bounds): NodeAdapter
| Name | Type |
|---|---|
bounds | Rect |
▸ setExportLimits(exportLimits): NodeAdapter
Sets export limits of the node
| Name | Type | Description |
|---|---|---|
exportLimits | Rect | bound of the node |
this
AbstractNodeAdapter.setExportLimits
▸ setHorizontalFlip(enable): NodeAdapter
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
AbstractNodeAdapter.setHorizontalFlip
▸ setLayoutStyle(layoutStyle): NodeAdapter
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
AbstractNodeAdapter.setLayoutStyle
▸ setLocalTransformation(localTransformation): NodeAdapter
set local transformation
| Name | Type | Description |
|---|---|---|
localTransformation | Transformation | local transformation |
AbstractNodeAdapter.setLocalTransformation
▸ setScale(sx, sy): NodeAdapter
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
▸ setScaleMode(scaleMode): NodeAdapter
Set node adapter scale mode
| Name | Type | Description |
|---|---|---|
scaleMode | ScaleMode | scale mode |
this
AbstractNodeAdapter.setScaleMode
▸ setTranslation(x, y): NodeAdapter
set the document translation
| Name | Type | Description |
|---|---|---|
x | number | offset x coordinate |
y | number | offset y coordinate |
this
AbstractNodeAdapter.setTranslation
▸ setVerticalFlip(enable): NodeAdapter
Set vertical flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
AbstractNodeAdapter.setVerticalFlip
▸ updateLayout(rect?): void
Set the document bounds
| Name | Type | Description |
|---|---|---|
Optional rect | Rect | document bounds |
void
AbstractNodeAdapter.updateLayout
▸ Static getClassName(): string
string