Skip to main content

Class: CornerFinder

Defined in: finders/cornerFinder.ts:32

Extends

Constructors

Constructor

new CornerFinder(): CornerFinder;

Defined in: finders/definitions.ts:36

Returns

CornerFinder

Inherited from

Finder<Corner, Blueprint>.constructor

Filter

atDistance()

atDistance(distance, point): this;

Defined in: finders/cornerFinder.ts:57

Filter to find elements that are at a specified distance from a point.

Parameters

distance

number

point

Point2D = ...

Returns

this


atPoint()

atPoint(point): this;

Defined in: finders/cornerFinder.ts:70

Filter to find elements that contain a certain point

Parameters

point

Point2D

Returns

this


inBox()

inBox(corner1, corner2): CornerFinder;

Defined in: finders/cornerFinder.ts:83

Filter to find elements that are within a box

Parameters

corner1

Point2D

corner2

Point2D

Returns

CornerFinder


inList()

inList(elementList): this;

Defined in: finders/cornerFinder.ts:44

Filter to find corner that have their point are in the list.

Parameters

elementList

Point2D[]

Returns

this


ofAngle()

ofAngle(angle): CornerFinder;

Defined in: finders/cornerFinder.ts:107

Filter to find corner that a certain angle between them - only between 0 and 180.

Parameters

angle

number

Returns

CornerFinder

Filter Combination

and()

and(findersList): this;

Defined in: finders/definitions.ts:55

Combine logically a set of filter with an AND operation.

You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.

Note that by default filters are applied with and AND operation, but in some case you might want to create them dynamically and use this method.

Parameters

findersList

(f) => this[]

Returns

this

Inherited from

Finder.and

either()

either(findersList): this;

Defined in: finders/definitions.ts:87

Combine logically a set of filter with an OR operation.

You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.

Parameters

findersList

(f) => this[]

Returns

this

Inherited from

Finder.either

not()

not(finderFun): this;

Defined in: finders/definitions.ts:68

Invert the result of a particular finder

You need to pass a function that take a finder as a argument and return the same finder with some filters applied to it.

Parameters

finderFun

(f) => this

Returns

this

Inherited from

Finder.not

Other

clone()

clone(): CornerFinder;

Defined in: finders/cornerFinder.ts:33

Returns

CornerFinder


delete()

delete(): void;

Defined in: finders/definitions.ts:40

Returns

void

Inherited from

Finder.delete

find()

Call Signature

find(shape, options): Corner;

Defined in: finders/definitions.ts:108

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters
shape

Blueprint

options
unique

true

Returns

Corner

Inherited from
Finder.find

Call Signature

find(shape): Corner[];

Defined in: finders/definitions.ts:109

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters
shape

Blueprint

Returns

Corner[]

Inherited from
Finder.find

Call Signature

find(shape, options): Corner[];

Defined in: finders/definitions.ts:110

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters
shape

Blueprint

options
unique?

false

Returns

Corner[]

Inherited from
Finder.find

shouldKeep()

shouldKeep(element): boolean;

Defined in: finders/cornerFinder.ts:124

Check if a particular element should be filtered or not according to the current finder

Parameters

element

Corner

Returns

boolean

Overrides

Finder.shouldKeep