Skip to content

API / geotoolkit / renderer / IFilter / IFilter

Class: IFilter

renderer.IFilter.IFilter

Define an interface that controls whether or not to render a particular nodes

Interface

Implemented by

Table of contents

Constructors
  • [new IFilter()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.renderer.ifilter.ifilter.md#new ifilter())
Methods

Contents

Constructors

new IFilter()

• new IFilter()

Methods

begin

▸ 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);
}

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

IFilter

this


end

▸ 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);
}

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

IFilter

this


filter

▸ Abstract filter(node, context?): boolean

Checks if the node should be drawn. <p> All children nodes will be given the chance to render or not to render. </p>

Parameters

Name Type Description
nodeNodenode to check
Optional contextRenderingContextrendering context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)


getClassName

▸ getClassName(): string

Returns

string


getClassName

▸ Static getClassName(): string

Returns

string