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