Pixso 开放文档
插件 API
官方工具集
  • 中文
  • English
插件 API
官方工具集
  • 中文
  • English
  • 插件 API

    • 简介
    • 预备知识
    • manifest
    • 开发指南
    • 更新日志
    • Plugin API 文档

      • 概述
      • 全局对象

        • pixso
        • pixso.ui
        • pixso.host
        • pixso.mouse
        • pixso.editor
        • pixso.keyboard
        • pixso.fieldset
        • pixso.viewport
        • pixso.vectorEditor
        • pixso.stickyToolbar
        • pixso.clientStorage
        • pixso.serverStorage
      • 节点类型

        • BooleanOperationNode
        • ComponentNode
        • ComponentSetNode
        • DocumentNode
        • EllipseNode
        • FrameNode
        • GroupNode
        • InstanceNode
        • LineNode
        • PageNode
        • PolygonNode
        • RectangleNode
        • SectionNode
        • SliceNode
        • StarNode
        • TextNode
        • VectorNode
      • 样式类型

        • PaintStyle
        • TextStyle
        • EffectStyle
        • GridStyle
      • 数据类型

        • 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
        • StickyToolbar
        • StrokeCap
        • StrokeJoin
        • StyleChangeProperty
        • TextCase
        • TextDecoration
        • TextListOptions
        • ThemeType
        • ToolType
        • Transition
        • Trigger
        • Vector
    • Host API 文档

      • 概述
      • Host API
  • 服务端 API

    • OpenAPI 文档
    • OpenAPI 文档
    • 事件订阅
    • 事件订阅
  • 客户端 API

    • 简介
    • 唤醒客户端
    • Web API
    • 更新日志

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: 是否仅导出节点的内容,默认为 true。

  • useAbsoluteBounds: 使用节点的完整尺寸,无论它是否被裁剪或其周围的空间是否为空,默认为 false。

  • suffix: 导出时附加到文件名的后缀。 默认为空字符串。

  • constraint: 导出时对图像大小的限制。默认为{ type: "SCALE", value: 1 }

    • SCALE: 导出图像的大小与 Pixso 中导出图层的大小成正比。值为 1 表示导出为图层大小的 100%。
    • WIDTH: 导出的图像被缩放为具有固定的宽度值。
    • HEIGHT:导出的图像被缩放为具有固定的高度值。
  • svgIdAttribute: 是否将图层名称作为 ID 属性包含在 SVG 中。

Prev
EmbedData
Next
FontName