Pixso Open Documentation
guide
  • 中文
  • English
guide
  • 中文
  • English
  • Plugin API

    • Brief Introduction
    • Prerequisites
    • manifest
    • Development Guide
    • Change Log
    • Plugin API Documentation

      • Overview
      • Global Object

        • pixso
        • pixso.ui
        • pixso.host
        • pixso.mouse
        • pixso.editor
        • pixso.keyboard
        • pixso.fieldset
        • pixso.viewport
        • pixso.vectorEditor
        • pixso.clientStorage
        • pixso.serverStorage
      • Node Types

        • BooleanOperationNode
        • ComponentNode
        • ComponentSetNode
        • DocumentNode
        • EllipseNode
        • FrameNode
        • GroupNode
        • InstanceNode
        • LineNode
        • PageNode
        • PolygonNode
        • RectangleNode
        • SectionNode
        • SliceNode
        • StarNode
        • TextNode
        • VectorNode
      • Data Types

        • Action
        • ArcData
        • BlendMode
        • CommandItem
        • ComponentProperties-Related
        • Constraints
        • DialogType
        • DocumentationLink
        • Effect
        • EmbedData
        • ExportSettings
        • FontName
        • Guide
        • HandleMirroring
        • HyperlinkTarget
        • Image
        • LayoutGrid
        • LetterSpacing
        • Library
        • LineHeight
        • NodeChangeProperty
        • OverflowDirection
        • Overlay
        • Paint
        • PublishStatus
        • Reaction
        • Rect-related
        • RGB & RGBA
        • StrokeCap
        • StrokeJoin
        • StyleChangeProperty
        • TextCase
        • TextDecoration
        • TextListOptions
        • ThemeType
        • ToolType
        • Transition
        • Trigger
        • Vector
    • Host API Documentation

      • Overview
      • Host API
  • Open API

    • OpenAPI Doc

ExportSettings

declare type ExportSettings = ExportSettingsImage | ExportSettingsSVG;

ExportSettingsImage

interface ExportSettingsImage {
  readonly format: "JPG" | "PNG";
  readonly contentsOnly?: boolean;
  readonly useAbsoluteBounds?: boolean;
  readonly suffix?: string;
  readonly constraint?: ExportSettingsConstraints;
}

interface ExportSettingsConstraints {
  readonly type: "SCALE" | "WIDTH" | "HEIGHT";
  readonly value: number;
}

ExportSettingsSVG

interface ExportSettingsSVG {
  readonly format: "SVG";
  readonly contentsOnly?: boolean;
  readonly useAbsoluteBounds?: boolean;
  readonly suffix?: string;
  readonly svgIdAttribute?: boolean;
}
  • contentsOnly: Whether to export only the contents of the node, the default is true.

  • useAbsoluteBounds: Use the full size of the node, regardless of whether it is clipped or the space around it is empty, defaults to false.

  • suffix: The suffix appended to the file name when exporting, defaults to an empty string.

  • constraint: Limit on image size when exporting. Default is { type: "SCALE", value: 1 }

    • SCALE: The size of the exported image is proportional to the size of the exported layer in Pixso. A value of 1 means exporting at 100% of the layer size.
    • WIDTH: The exported image is scaled to have a fixed width value.
    • HEIGHT: The exported image is scaled to have a fixed height value.
  • svgIdAttribute: Whether to include the layer name as an ID attribute in SVG.

Prev
EmbedData
Next
FontName