Skip to main content

Interface: SocialCropOptions

Defined in: packages/sdvtables/src/export/index.ts:43

Options for socialCrop; defaults are Python gt_social_crop's (whitespace 60).

Extends​

Properties​

aspect?​

optional aspect?: Aspect

Defined in: packages/sdvtables/src/export/index.ts:44


background?​

optional background?: string

Defined in: packages/sdvtables/src/export/index.ts:34

the color around the content; default "white"

Inherited from​

PNGOptions.background


deviceScaleFactor?​

optional deviceScaleFactor?: number

Defined in: packages/sdvtables/src/export/index.ts:32

the rendering zoom (Python zoom); default 2, a sharp (retina) image

Inherited from​

PNGOptions.deviceScaleFactor


file?​

optional file?: string

Defined in: packages/sdvtables/src/export/index.ts:40

also write the PNG here (must end in .png)

Inherited from​

PNGOptions.file


optional fontLinks?: readonly string[]

Defined in: packages/sdvtables/src/export/index.ts:38

stylesheet URLs (Google Fonts) awaited via document.fonts.ready

Inherited from​

PNGOptions.fontLinks


gravity?​

optional gravity?: Gravity

Defined in: packages/sdvtables/src/export/index.ts:45


whitespace?​

optional whitespace?: number

Defined in: packages/sdvtables/src/export/index.ts:36

image pixels of background left around the trimmed content (Python whitespace, truncated to an integer); default 50

Inherited from​

PNGOptions.whitespace


width?​

optional width?: number

Defined in: packages/sdvtables/src/export/index.ts:30

the final image width in pixels, the height following (Python width); absent: the rendered width

Inherited from​

PNGOptions.width