API / geotoolkit / scene / filters / Composite / Composite
Define a composite filter to apply a several filters
Constructors
Constructors
• new Composite(filters?)
| Name | Type | Description |
|---|---|---|
Optional filters | IFilter[] | an array of filters |
Methods
▸ addFilter(filter): Composite
Add filter to be applied
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to add |
▸ begin(context?): Composite
Begin filtering. If a filter should be applied to children nodes it needs to be added to context and removed in the method end
Example
// Implementation of the filter to be applied for children
begin (context?: RenderingContext) {
context.addFilter(this);
}| Name | Type | Description |
|---|---|---|
Optional context | RenderingContext | rendering context |
this
▸ end(context?): Composite
End filtering. If a filter should be applied to children nodes it needs to be added to context and removed in the method end
Example
// Implementation of the filter to be applied for children
end (context?: RenderingContext) {
context.removeFilter(this);
}| Name | Type | Description |
|---|---|---|
Optional context | RenderingContext | rendering context |
this
▸ filter(node, context?): boolean
Checks if the node should be drawn.
All children nodes will be given the chance to render or not to render.
| Name | Type | Description |
|---|---|---|
node | Node | node to check |
Optional context | RenderingContext | rendering context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getClassName(): string
string
▸ removeFilter(filter): Composite
Remove an instance of the filter
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to remove |
▸ Static getClassName(): string
string