API / geotoolkit / scene / exports / CompositeDocumentElement / CompositeDocumentElement
exports.CompositeDocumentElement.CompositeDocumentElement
CompositeDocumentElement class contains layouts as children for PDF rendering
↳
CompositeDocumentElement
Constructors
Methods
Constructors
• new CompositeDocumentElement(list, layout?)
| Name | Type | Description |
|---|---|---|
list | any[] | of DocumentElement |
Optional layout | Layout | LinearLayout | AnnotatedLayout | FreeLayout | layout of elements |
AbstractDocumentElement.constructor
Methods
▸ addChild(child): any
Add DocumentElement as child
| Name | Type | Description |
|---|---|---|
child | any | Document Element |
any
▸ beginExport(): void
Used to prepare object before exporting
void
AbstractDocumentElement.beginExport
▸ clearChild(): void
Clear all children
void
▸ endExport(): void
Used to restore object's state after exporting
void
AbstractDocumentElement.endExport
▸ getBounds(): Rect
Return bounds
▸ getChild(index): any
Get child at index.
| Name | Type | Description |
|---|---|---|
index | number | index where to get the child |
any
child DocumentElement at index.
▸ getChildrenCount(): number
Get the number of children in the composite document element.
number
count
▸ getClassName(): string
string
AbstractDocumentElement.getClassName
▸ getIndex(element): number
Get index of a specified element.
| Name | Type | Description |
|---|---|---|
element | any | document element |
number
index
▸ getLayoutStyle(): LayoutStyle<string | number>
Return desired layout style
LayoutStyle<string | number>
▸ getLayoutedDimension(): LayoutedDimension
Compute dimensions in the layout, this dimension is described by a fixed dimension and a scaled dimension.
layoutedDimension object contains fixed and scaled dimensions
AbstractDocumentElement.getLayoutedDimension
▸ getList(): any[]
Gets the list of children.
any[]
list
▸ getPreferredSize(rect?): Rect
Return preferred size to layout children
| Name | Type | Description |
|---|---|---|
Optional rect | Rect | layout area of document |
▸ insertChildAtIndex(index, child): void
Add child at specific index
| Name | Type | Description |
|---|---|---|
index | number | index where to insert the child |
child | any | Document Element |
void
▸ render(context, position?): void
Render the document in the context.
| Name | Type | Description |
|---|---|---|
context | DocumentRenderingContext | rendering context |
Optional position | Point | position of the current document 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): CompositeDocumentElement
Sets bounds of the document if it is a part of layout
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node |
this
▸ setChild(index, child): CompositeDocumentElement
Set child at specific index
| Name | Type | Description |
|---|---|---|
index | number | index where to set the child |
child | any | Document Element |
this
▸ setLayout(layout): CompositeDocumentElement
set the layout
| Name | Type | Description |
|---|---|---|
layout | Layout | LinearLayout | AnnotatedLayout | FreeLayout | current layout |
this
▸ setLayoutStyle(layoutStyle): CompositeDocumentElement
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
▸ setScale(sx, sy): CompositeDocumentElement
set the document scale depending on the parameters isScaledVertically and isScaledHorizontally
| Name | Type | Description |
|---|---|---|
sx | number | scale factor if scaledVertically |
sy | number | scale factor if ScaledHorizontally |
this
AbstractDocumentElement.setScale
▸ setTranslation(x, y): CompositeDocumentElement
set the document translation
| Name | Type | Description |
|---|---|---|
x | number | offset x coordinate |
y | number | offset y coordinate |
this
AbstractDocumentElement.setTranslation
▸ updateLayout(rect?): void
update the layout of the document
| Name | Type | Description |
|---|---|---|
Optional rect | Rect | layout area of document |
void
AbstractDocumentElement.updateLayout
▸ updatePageLayout(pageInfo): Rect
Return Layouted bounds
| Name | Type | Description |
|---|---|---|
pageInfo | PageSettings | page settings |
IExportLayoutable.updatePageLayout
▸ Static getClassName(): string
string