API / geotoolkit / renderer / IFilter / IFilter
Define an interface that controls whether or not to render a particular nodes
Interface
Constructors
Methods
▸ Abstract begin(context?): IFilter
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
▸ Abstract end(context?): IFilter
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
▸ Abstract 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
▸ Static getClassName(): string
string