Skip to content

cupertino-files / MaskModel

Class: MaskModel

Defined in: src/tsd/masks.ts:105

A mask drawable, wrapping the geometry that defines the crop window.

Extends

Constructors

Constructor

new MaskModel(store, object): MaskModel

Defined in: src/tsd/drawables.ts:77

Parameters

store

ObjectStore

object

IwaObject

Returns

MaskModel

Inherited from

DrawableModel.constructor

Properties

object

readonly object: IwaObject

Defined in: src/tsd/drawables.ts:75

Inherited from

DrawableModel.object


store

readonly store: ObjectStore

Defined in: src/tsd/drawables.ts:74

Inherited from

DrawableModel.store

Accessors

accessibilityDescription

Get Signature

get accessibilityDescription(): string | undefined

Defined in: src/tsd/drawables.ts:148

Returns

string | undefined

Set Signature

set accessibilityDescription(value): void

Defined in: src/tsd/drawables.ts:152

Parameters
value

string | undefined

Returns

void

Inherited from

DrawableModel.accessibilityDescription


hyperlinkUrl

Get Signature

get hyperlinkUrl(): string | undefined

Defined in: src/tsd/drawables.ts:144

Returns

string | undefined

Inherited from

DrawableModel.hyperlinkUrl


id

Get Signature

get id(): bigint

Defined in: src/tsd/drawables.ts:82

Returns

bigint

Inherited from

DrawableModel.id


isRectangular

Get Signature

get isRectangular(): boolean

Defined in: src/tsd/masks.ts:124

True when the path traces a rectangle in its own space.

Not "a rectangle the size of the frame": the path is stretched to naturalSize when drawn, so its own dimensions are arbitrary. The only shape any corpus file uses, and the only one setSize will touch — resizing an instant-alpha outline would distort the cut-out.

Returns

boolean


type

Get Signature

get type(): number

Defined in: src/tsd/drawables.ts:86

Returns

number

Inherited from

DrawableModel.type


typeName

Get Signature

get typeName(): string | undefined

Defined in: src/tsd/drawables.ts:90

Returns

string | undefined

Inherited from

DrawableModel.typeName

Methods

geometry()

geometry(): GeometryInfo | undefined

Defined in: src/tsd/drawables.ts:98

Returns

GeometryInfo | undefined

Inherited from

DrawableModel.geometry


naturalSize()

naturalSize(): { height: number; width: number; } | undefined

Defined in: src/tsd/masks.ts:146

The size the path is stretched to, which is what sizes the crop.

Returns

{ height: number; width: number; } | undefined


pathSize()

pathSize(): { height: number; width: number; } | undefined

Defined in: src/tsd/masks.ts:138

The rectangle the path traces, in the path's own coordinates.

Rarely interesting on its own — the drawn size is naturalSize — but it is what isRectangular tests, so it is worth being able to see.

Returns

{ height: number; width: number; } | undefined


pathSource()

pathSource(): RawMessage | undefined

Defined in: src/tsd/masks.ts:107

The mask's path source, if it has one.

Returns

RawMessage | undefined


setGeometry()

setGeometry(update): void

Defined in: src/tsd/drawables.ts:115

Move and/or resize. Only the provided components are changed.

Parameters

update
angle?

number

height?

number

width?

number

x?

number

y?

number

Returns

void

Inherited from

DrawableModel.setGeometry


setSize()

setSize(width, height): void

Defined in: src/tsd/masks.ts:161

Resize the crop window.

Changes the frame and naturalSize together — they are equal in every corpus file, and naturalSize is what the path is stretched to. The path itself is left alone: it already describes a rectangle, and its own dimensions do not reach the rendered result.

Parameters

width

number

height

number

Returns

void


style()

style(): DrawableStyleHandle | undefined

Defined in: src/tsd/drawables.ts:166

Visual style — fill, stroke, opacity, shadow, reflection.

This is where drawable shadows live. Cell and table styles have no shadow field at all, so a shadow on a table means a shadow on the shape or image, not on its cells.

Returns

DrawableStyleHandle | undefined

Inherited from

DrawableModel.style

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.