Skip to main content

Class: Property<T>

Type parameters​

NameType
Tunknown

Constructors​

constructor​

• new Property<T>(document, name, value)

Type parameters​

NameType
Tunknown

Parameters​

NameType
documentDocument
namestring
valueT

Defined in​

src/Property.ts:36

Properties​

textBaselineMapping​

â–ª Static Readonly textBaselineMapping: Record<string, string>

Defined in​

src/Property.ts:20


isNormalizedColor​

• Private isNormalizedColor: boolean = false

Defined in​

src/Property.ts:34


document​

• Private Readonly document: Document

Defined in​

src/Property.ts:37


name​

• Private Readonly name: string

Defined in​

src/Property.ts:38


value​

• Private value: T

Defined in​

src/Property.ts:39

Methods​

empty​

â–¸ Static empty(document): Property<string>

Parameters​

NameType
documentDocument

Returns​

Property<string>

Defined in​

src/Property.ts:16


split​

â–¸ split(separator?): Property<string>[]

Parameters​

NameTypeDefault value
separatorstring' '

Returns​

Property<string>[]

Defined in​

src/Property.ts:42


hasValue​

â–¸ hasValue(zeroIsValue?): boolean

Parameters​

NameType
zeroIsValue?boolean

Returns​

boolean

Defined in​

src/Property.ts:54


isString​

â–¸ isString(regexp?): boolean

Parameters​

NameType
regexp?RegExp

Returns​

boolean

Defined in​

src/Property.ts:63


isUrlDefinition​

â–¸ isUrlDefinition(): boolean

Returns​

boolean

Defined in​

src/Property.ts:74


isPixels​

â–¸ isPixels(): boolean

Returns​

boolean

Defined in​

src/Property.ts:78


setValue​

â–¸ setValue(value): Property<T>

Parameters​

NameType
valueT

Returns​

Property<T>

Defined in​

src/Property.ts:95


getValue​

â–¸ getValue(def?): T

Parameters​

NameType
def?T

Returns​

T

Defined in​

src/Property.ts:100


getNumber​

â–¸ getNumber(def?): number

Parameters​

NameType
def?T

Returns​

number

Defined in​

src/Property.ts:108


getString​

â–¸ getString(def?): string

Parameters​

NameType
def?T

Returns​

string

Defined in​

src/Property.ts:129


getColor​

â–¸ getColor(def?): string

Parameters​

NameType
def?T

Returns​

string

Defined in​

src/Property.ts:139


getDpi​

â–¸ getDpi(): number

Returns​

number

Defined in​

src/Property.ts:153


getRem​

â–¸ getRem(): number

Returns​

number

Defined in​

src/Property.ts:157


getEm​

â–¸ getEm(): number

Returns​

number

Defined in​

src/Property.ts:161


getUnits​

â–¸ getUnits(): string

Returns​

string

Defined in​

src/Property.ts:165


getPixels​

â–¸ getPixels(axis?, processPercent?): number

Parameters​

NameType
axis?Axis
processPercent?boolean

Returns​

number

Defined in​

src/Property.ts:169

â–¸ getPixels(isFontSize?): number

Parameters​

NameType
isFontSize?boolean

Returns​

number

Defined in​

src/Property.ts:170


getMilliseconds​

â–¸ getMilliseconds(): number

Returns​

number

Defined in​

src/Property.ts:253


getRadians​

â–¸ getRadians(): number

Returns​

number

Defined in​

src/Property.ts:265


getDefinition​

â–¸ getDefinition<T>(): T

Type parameters​

NameType
Textends Element<T>

Returns​

T

Defined in​

src/Property.ts:285


getFillStyleDefinition​

â–¸ getFillStyleDefinition(element, opacity): string | CanvasGradient | CanvasPattern

Parameters​

NameType
elementElement | PathElement
opacityProperty<unknown>

Returns​

string | CanvasGradient | CanvasPattern

Defined in​

src/Property.ts:293


getTextBaseline​

â–¸ getTextBaseline(): string

Returns​

string

Defined in​

src/Property.ts:329


addOpacity​

â–¸ addOpacity(opacity): Property<string>

Parameters​

NameType
opacityProperty<unknown>

Returns​

Property<string>

Defined in​

src/Property.ts:339