Skip to content

API / geotoolkit / attributes / ClipStyle / ClipStyle

Class: ClipStyle

attributes.ClipStyle.ClipStyle

Defines style to be used as model clipping style.

Hierarchy

Table of contents

Constructors
  • [new ClipStyle(geometry, evenodd)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.attributes.clipstyle.clipstyle.md#new clipstyle(geometry, evenodd))
Methods
Css Properties
Name Type Description
evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
geometryGraphicsPathClipping geometry
geometry-boundsRectBounds
geometry-bounds-heightnumberHeight
geometry-bounds-readonlybooleanReadonly
geometry-bounds-widthnumberWidth
geometry-bounds-xnumberLeft
geometry-bounds-ynumberTop

Contents

Constructors

new ClipStyle(geometry, evenodd)

• new ClipStyle(geometry?, evenodd?)

Create ClipStyle

Parameters

Name Type Description
Optional geometryGraphicsPath | Optionsclipping geometry or options object
Optional evenoddbooleantrue if evenodd mode is on ('nonzero' mode otherwise)

Overrides

Style.constructor

Methods

clone

▸ clone(): ClipStyle

All inheritors should implement copy constructor or provide custom implementation for this method

Returns

ClipStyle

this

Overrides

Style.clone


copyConstructor

▸ Protected copyConstructor(src): ClipStyle

copy constructor

Parameters

Name Type Description
srcClipStyleSource to copy from

Returns

ClipStyle

Overrides

Style.copyConstructor


dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

Style.dispose


getClassName

▸ getClassName(): string

Returns

string

Inherited from

Style.getClassName


getEvenOdd

▸ getEvenOdd(): boolean

Returns true if evenodd clipping mode is on

Returns

boolean


getGeometry

▸ getGeometry(): GraphicsPath

Gets clipping geometry

Returns

GraphicsPath


getProperties

▸ getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

Overrides

Style.getProperties


getTimeStamp

▸ getTimeStamp(): number

Gets time stamp

Returns

number

timeStamp

Inherited from

Style.getTimeStamp


hasEventListener

▸ hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

Style.hasEventListener


invalidate

▸ invalidate(): ClipStyle

notify the node that the style is invalidated

Returns

ClipStyle

this

Inherited from

Style.invalidate


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Style.isDisposed


isSilent

▸ isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

Style.isSilent


notify

▸ notify<E&gt;(type, source, args?): ClipStyle

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceStyleof the event
Optional argsEventMap[E]arguments of the event

Returns

ClipStyle

this

Inherited from

Style.notify


off

▸ off<E&gt;(type?, callback?): ClipStyle

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: ClipStyle, args: EventMap[E]) => voidfunction to be called

Returns

ClipStyle

this

Inherited from

Style.off


on

▸ on<E&gt;(type, callback): ClipStyle

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target. </p>

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: ClipStyle, args: EventMap[E]) => voidto be called

Returns

ClipStyle

this

Inherited from

Style.on


setEvenOdd

▸ setEvenOdd(bool): ClipStyle

Sets evenodd clipping mode

Parameters

Name Type Description
boolbooleantrue if evenodd mode is on

Returns

ClipStyle

this


setGeometry

▸ setGeometry(geometry): ClipStyle

Sets clipping geometry

Parameters

Name Type Description
geometryGraphicsPathregion or area

Returns

ClipStyle


setProperties

▸ setProperties(properties?): ClipStyle

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

ClipStyle

Overrides

Style.setProperties


setSilent

▸ setSilent(bool, force?): ClipStyle

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode
Optional forcebooleantrue if parent should be invalidated immediately

Returns

ClipStyle

this

Inherited from

Style.setSilent


updateTimeStamp

▸ updateTimeStamp(silent?): ClipStyle

Update time stamp to indicate that style has been changed.

Parameters

Name Type Description
Optional silentbooleansilent mode. If this parameter equals to true then style doesn't send invalidate event

Returns

ClipStyle

this

Inherited from

Style.updateTimeStamp


fromObject

▸ Static fromObject(object?): ClipStyle

Create or get clipping style from object

Parameters

Name Type Description
Optional objectGraphicsPath | ClipStyle | Optionsobject can be in format of constructor of ClipStyle

Returns

ClipStyle

clipping style


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

Style.getClassName


isStyleNotificationEnabled

▸ Static isStyleNotificationEnabled(): boolean

Return status of the global notification for all styles.

Returns

boolean

Inherited from

Style.isStyleNotificationEnabled