Skip to content
Last updated

API / geotoolkit / scene / filters / Composite / Composite

Class: Composite

filters.Composite.Composite

Define a composite filter to apply a several filters

Implements

Table of contents

Constructors
  • [new Composite(filters)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.scene.filters.composite.composite.md#new composite(filters))
Methods

Contents

Constructors

new Composite(filters)

• new Composite(filters?)

Parameters

Name Type Description
Optional filtersIFilter[]an array of filters
Methods

addFilter

▸ addFilter(filter): Composite

Add filter to be applied

Parameters

Name Type Description
filterIFilterfilter to add

Returns

Composite


begin

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

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

Composite

this

Implementation of

IFilter.begin


end

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

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

Composite

this

Implementation of

IFilter.end


filter

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

Implementation of

IFilter.filter


getClassName

▸ getClassName(): string

Returns

string

Implementation of

IFilter.getClassName


removeFilter

▸ removeFilter(filter): Composite

Remove an instance of the filter

Parameters

Name Type Description
filterIFilterfilter to remove

Returns

Composite


getClassName

▸ Static getClassName(): string

Returns

string