Word.ThreeDimensionalFormat class

代表形状的三维格式。

扩展

注解

API 集:WordApiDesktop 1.3

使用方

示例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/apply-bevel-to-text.yaml

if (!Office.context.requirements.isSetSupported("WordApiDesktop", "1.3")) {
  console.error("This sample requires WordApiDesktop 1.3 or later.");
  return;
}

await Word.run(async (context) => {
  const paragraph: Word.Paragraph = context.document.body.insertParagraph(
    "Beveled text",
    Word.InsertLocation.start,
  );
  paragraph.font.size = 48;
  paragraph.font.bold = true;

  const threeDimensionalFormat: Word.ThreeDimensionalFormat = paragraph.font.threeDimensionalFormat;
  threeDimensionalFormat.isVisible = true;
  threeDimensionalFormat.bevelTopType = Word.BevelType.circle;
  threeDimensionalFormat.bevelTopDepth = 6;
  threeDimensionalFormat.bevelTopInset = 6;
  threeDimensionalFormat.load("bevelTopType,bevelTopDepth,bevelTopInset");

  await context.sync();

  console.log("Applied bevel formatting:", {
    type: threeDimensionalFormat.bevelTopType,
    depth: threeDimensionalFormat.bevelTopDepth,
    inset: threeDimensionalFormat.bevelTopInset,
  });
});

属性

bevelBottomDepth

指定底部棱台的深度。

bevelBottomInset

指定底部棱台的插图大小。

bevelBottomType

指定一个 BevelType 值,该值表示下斜面的棱台类型。

bevelTopDepth

指定顶部棱台的深度。

bevelTopInset

指定顶部棱台的插图大小。

bevelTopType

指定表示 BevelType 顶部棱台类型的值。

context

与对象关联的请求上下文。 这将加载项的进程连接到 Office 主机应用程序的进程。

contourColor

返回 ColorFormat 表示形状轮廓颜色的对象。

contourWidth

指定形状轮廓的宽度。

depth

指定形状压模的深度。

extrusionColor

返回 ColorFormat 表示形状压模颜色的对象。

extrusionColorType

指定延伸区域的颜色是否基于原图形的填充(延伸区域的正面),并随着图形填充的改变而自动改变,或者延伸区域的颜色是否与图形填充无关。

fieldOfView

指定形状的透视量。

isPerspective

true指定延伸是否以透视方式显示 - 即,如果延伸的壁向消失点变窄,false如果延伸是平行或正交投影,即墙是否不向消失点变窄。

isVisible

指定指定对象或应用于它的格式是否可见。

lightAngle

指定照明角度。

presetCamera

返回表示 PresetCamera 相机预设的值。

presetExtrusionDirection

返回延伸经过的路径前导离延伸形状 (延伸的正面) 的方向。

presetLighting

指定表示 LightRigType 照明预设的值。

presetLightingDirection

指定光源相对于拉伸的位置。

presetLightingSoftness

指定压模照明的强度。

presetMaterial

指定延伸表面的材料。

presetThreeDimensionalFormat

返回预设的延伸格式。

projectText

指定形状上的文本是否随形状旋转。 true 旋转文本。

rotationX

指定压模形状绕 x 轴的旋转角度(以度为单位)。

rotationY

指定压模形状绕 y 轴的旋转角度(以度为单位)。

rotationZ

指定相机的 z 轴旋转。

z

指定形状在 z 轴上的位置。

方法

incrementRotationHorizontal(increment)

在 x 轴上水平旋转形状。 旋转角度数。

incrementRotationVertical(increment)

在 y 轴上垂直旋转形状。 旋转角度数。

incrementRotationX(increment)

更改围绕 x 轴的旋转。 旋转角度数。

incrementRotationY(increment)

更改围绕 y 轴的旋转。 旋转角度数。

incrementRotationZ(increment)

在 z 轴上旋转形状。 旋转角度数。

load(options)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

load(propertyNames)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

load(propertyNamesAndPaths)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

resetRotation()

将围绕 x 轴、y 轴和 z 轴的压模旋转重置为 0。

set(properties, options)

同时设置对象的多个属性。 可以传递具有相应属性的纯文本对象,也可以传递另一个相同类型的 API 对象。

set(properties)

基于现有加载的对象,同时在对象上设置多个属性。

setExtrusionDirection(presetExtrusionDirection)

设置拉伸的扫描路径的方向。

setExtrusionDirection(presetExtrusionDirection)

设置拉伸的扫描路径的方向。

setPresetCamera(presetCamera)

设置形状的相机预设。 预设相机类型。

setPresetCamera(presetCamera)

设置形状的相机预设。 预设相机类型。

setThreeDimensionalFormat(presetThreeDimensionalFormat)

返回预设的延伸格式。 预设格式。

setThreeDimensionalFormat(presetThreeDimensionalFormat)

返回预设的延伸格式。 预设格式。

toJSON()

覆盖 JavaScript toJSON() 方法,以便在将 API 对象传递给 JSON.stringify()时提供更有用的输出。 (JSON.stringify反过来调用 toJSON 传递给它的对象的方法。) 虽然原始 Word.ThreeDimensionalFormat 对象是 API 对象, toJSON 但该方法返回一个纯 JavaScript 对象, (类型化为 Word.Interfaces.ThreeDimensionalFormatData) ,其中包含从原始对象加载的任何子属性的浅层副本。

track()

根据文档中的相应更改来跟踪对象,以便进行自动调整。 此调用是 context.trackedObjects.add (thisObject) 的简写。 如果在调用中 .sync 使用此对象,并且在“.run”批处理的顺序执行之外使用此对象,并且在设置属性或对对象调用方法时收到“InvalidObjectPath”错误,则需要在首次创建对象时将对象添加到跟踪对象集合。 如果此对象是集合的一部分,您还应跟踪父集合。

untrack()

释放与此对象关联的内存(如果先前已跟踪过)。 此调用是 context.trackedObjects.remove (thisObject) 的简写。 拥有许多跟踪对象会降低主机应用程序的速度,因此请在使用完毕后释放所添加的任何对象。 需要在内存释放生效之前调用 context.sync()

属性详细信息

bevelBottomDepth

指定底部棱台的深度。

bevelBottomDepth: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

bevelBottomInset

指定底部棱台的插图大小。

bevelBottomInset: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

bevelBottomType

指定一个 BevelType 值,该值表示下斜面的棱台类型。

bevelBottomType: Word.BevelType | "mixed" | "none" | "relaxedInset" | "circle" | "slope" | "cross" | "angle" | "softRound" | "convex" | "coolSlant" | "divot" | "riblet" | "hardEdge" | "artDeco";

属性值

Word.BevelType | "mixed" | "none" | "relaxedInset" | "circle" | "slope" | "cross" | "angle" | "softRound" | "convex" | "coolSlant" | "divot" | "riblet" | "hardEdge" | "artDeco"

注解

API 集:WordApiDesktop 1.3

bevelTopDepth

指定顶部棱台的深度。

bevelTopDepth: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

bevelTopInset

指定顶部棱台的插图大小。

bevelTopInset: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

bevelTopType

指定表示 BevelType 顶部棱台类型的值。

bevelTopType: Word.BevelType | "mixed" | "none" | "relaxedInset" | "circle" | "slope" | "cross" | "angle" | "softRound" | "convex" | "coolSlant" | "divot" | "riblet" | "hardEdge" | "artDeco";

属性值

Word.BevelType | "mixed" | "none" | "relaxedInset" | "circle" | "slope" | "cross" | "angle" | "softRound" | "convex" | "coolSlant" | "divot" | "riblet" | "hardEdge" | "artDeco"

注解

API 集:WordApiDesktop 1.3

context

与对象关联的请求上下文。 这将加载项的进程连接到 Office 主机应用程序的进程。

context: RequestContext;

属性值

contourColor

返回 ColorFormat 表示形状轮廓颜色的对象。

readonly contourColor: Word.ColorFormat;

属性值

注解

API 集:WordApiDesktop 1.3

contourWidth

指定形状轮廓的宽度。

contourWidth: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

depth

指定形状压模的深度。

depth: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

extrusionColor

返回 ColorFormat 表示形状压模颜色的对象。

readonly extrusionColor: Word.ColorFormat;

属性值

注解

API 集:WordApiDesktop 1.3

extrusionColorType

指定延伸区域的颜色是否基于原图形的填充(延伸区域的正面),并随着图形填充的改变而自动改变,或者延伸区域的颜色是否与图形填充无关。

extrusionColorType: Word.ExtrusionColorType | "mixed" | "automatic" | "custom";

属性值

Word.ExtrusionColorType | "mixed" | "automatic" | "custom"

注解

API 集:WordApiDesktop 1.3

fieldOfView

指定形状的透视量。

fieldOfView: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

isPerspective

true指定延伸是否以透视方式显示 - 即,如果延伸的壁向消失点变窄,false如果延伸是平行或正交投影,即墙是否不向消失点变窄。

isPerspective: boolean;

属性值

boolean

注解

API 集:WordApiDesktop 1.3

isVisible

指定指定对象或应用于它的格式是否可见。

isVisible: boolean;

属性值

boolean

注解

API 集:WordApiDesktop 1.3

lightAngle

指定照明角度。

lightAngle: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

presetCamera

返回表示 PresetCamera 相机预设的值。

readonly presetCamera: Word.PresetCamera | "Mixed" | "LegacyObliqueTopLeft" | "LegacyObliqueTop" | "LegacyObliqueTopRight" | "LegacyObliqueLeft" | "LegacyObliqueFront" | "LegacyObliqueRight" | "LegacyObliqueBottomLeft" | "LegacyObliqueBottom" | "LegacyObliqueBottomRight" | "LegacyPerspectiveTopLeft" | "LegacyPerspectiveTop" | "LegacyPerspectiveTopRight" | "LegacyPerspectiveLeft" | "LegacyPerspectiveFront" | "LegacyPerspectiveRight" | "LegacyPerspectiveBottomLeft" | "LegacyPerspectiveBottom" | "LegacyPerspectiveBottomRight" | "OrthographicFront" | "IsometricTopUp" | "IsometricTopDown" | "IsometricBottomUp" | "IsometricBottomDown" | "IsometricLeftUp" | "IsometricLeftDown" | "IsometricRightUp" | "IsometricRightDown" | "IsometricOffAxis1Left" | "IsometricOffAxis1Right" | "IsometricOffAxis1Top" | "IsometricOffAxis2Left" | "IsometricOffAxis2Right" | "IsometricOffAxis2Top" | "IsometricOffAxis3Left" | "IsometricOffAxis3Right" | "IsometricOffAxis3Bottom" | "IsometricOffAxis4Left" | "IsometricOffAxis4Right" | "IsometricOffAxis4Bottom" | "ObliqueTopLeft" | "ObliqueTop" | "ObliqueTopRight" | "ObliqueLeft" | "ObliqueRight" | "ObliqueBottomLeft" | "ObliqueBottom" | "ObliqueBottomRight" | "PerspectiveFront" | "PerspectiveLeft" | "PerspectiveRight" | "PerspectiveAbove" | "PerspectiveBelow" | "PerspectiveAboveLeftFacing" | "PerspectiveAboveRightFacing" | "PerspectiveContrastingLeftFacing" | "PerspectiveContrastingRightFacing" | "PerspectiveHeroicLeftFacing" | "PerspectiveHeroicRightFacing" | "PerspectiveHeroicExtremeLeftFacing" | "PerspectiveHeroicExtremeRightFacing" | "PerspectiveRelaxed" | "PerspectiveRelaxedModerately";

属性值

Word.PresetCamera | "Mixed" | "LegacyObliqueTopLeft" | "LegacyObliqueTop" | "LegacyObliqueTopRight" | "LegacyObliqueLeft" | "LegacyObliqueFront" | "LegacyObliqueRight" | "LegacyObliqueBottomLeft" | "LegacyObliqueBottom" | "LegacyObliqueBottomRight" | "LegacyPerspectiveTopLeft" | "LegacyPerspectiveTop" | "LegacyPerspectiveTopRight" | "LegacyPerspectiveLeft" | "LegacyPerspectiveFront" | "LegacyPerspectiveRight" | "LegacyPerspectiveBottomLeft" | "LegacyPerspectiveBottom" | "LegacyPerspectiveBottomRight" | "OrthographicFront" | "IsometricTopUp" | "IsometricTopDown" | "IsometricBottomUp" | "IsometricBottomDown" | "IsometricLeftUp" | "IsometricLeftDown" | "IsometricRightUp" | "IsometricRightDown" | "IsometricOffAxis1Left" | "IsometricOffAxis1Right" | "IsometricOffAxis1Top" | "IsometricOffAxis2Left" | "IsometricOffAxis2Right" | "IsometricOffAxis2Top" | "IsometricOffAxis3Left" | "IsometricOffAxis3Right" | "IsometricOffAxis3Bottom" | "IsometricOffAxis4Left" | "IsometricOffAxis4Right" | "IsometricOffAxis4Bottom" | "ObliqueTopLeft" | "ObliqueTop" | "ObliqueTopRight" | "ObliqueLeft" | "ObliqueRight" | "ObliqueBottomLeft" | "ObliqueBottom" | "ObliqueBottomRight" | "PerspectiveFront" | "PerspectiveLeft" | "PerspectiveRight" | "PerspectiveAbove" | "PerspectiveBelow" | "PerspectiveAboveLeftFacing" | "PerspectiveAboveRightFacing" | "PerspectiveContrastingLeftFacing" | "PerspectiveContrastingRightFacing" | "PerspectiveHeroicLeftFacing" | "PerspectiveHeroicRightFacing" | "PerspectiveHeroicExtremeLeftFacing" | "PerspectiveHeroicExtremeRightFacing" | "PerspectiveRelaxed" | "PerspectiveRelaxedModerately"

注解

API 集:WordApiDesktop 1.3

presetExtrusionDirection

返回延伸经过的路径前导离延伸形状 (延伸的正面) 的方向。

readonly presetExtrusionDirection: Word.PresetExtrusionDirection | "Mixed" | "BottomRight" | "Bottom" | "BottomLeft" | "Right" | "None" | "Left" | "TopRight" | "Top" | "TopLeft";

属性值

Word.PresetExtrusionDirection | "Mixed" | "BottomRight" | "Bottom" | "BottomLeft" | "Right" | "None" | "Left" | "TopRight" | "Top" | "TopLeft"

注解

API 集:WordApiDesktop 1.3

presetLighting

指定表示 LightRigType 照明预设的值。

presetLighting: Word.LightRigType | "Mixed" | "LegacyFlat1" | "LegacyFlat2" | "LegacyFlat3" | "LegacyFlat4" | "LegacyNormal1" | "LegacyNormal2" | "LegacyNormal3" | "LegacyNormal4" | "LegacyHarsh1" | "LegacyHarsh2" | "LegacyHarsh3" | "LegacyHarsh4" | "ThreePoint" | "Balanced" | "Soft" | "Harsh" | "Flood" | "Contrasting" | "Morning" | "Sunrise" | "Sunset" | "Chilly" | "Freezing" | "Flat" | "TwoPoint" | "Glow" | "BrightRoom";

属性值

Word.LightRigType | "Mixed" | "LegacyFlat1" | "LegacyFlat2" | "LegacyFlat3" | "LegacyFlat4" | "LegacyNormal1" | "LegacyNormal2" | "LegacyNormal3" | "LegacyNormal4" | "LegacyHarsh1" | "LegacyHarsh2" | "LegacyHarsh3" | "LegacyHarsh4" | "ThreePoint" | "Balanced" | "Soft" | "Harsh" | "Flood" | "Contrasting" | "Morning" | "Sunrise" | "Sunset" | "Chilly" | "Freezing" | "Flat" | "TwoPoint" | "Glow" | "BrightRoom"

注解

API 集:WordApiDesktop 1.3

presetLightingDirection

指定光源相对于拉伸的位置。

presetLightingDirection: Word.PresetLightingDirection | "Mixed" | "TopLeft" | "Top" | "TopRight" | "Left" | "None" | "Right" | "BottomLeft" | "Bottom" | "BottomRight";

属性值

Word.PresetLightingDirection | "Mixed" | "TopLeft" | "Top" | "TopRight" | "Left" | "None" | "Right" | "BottomLeft" | "Bottom" | "BottomRight"

注解

API 集:WordApiDesktop 1.3

presetLightingSoftness

指定压模照明的强度。

presetLightingSoftness: Word.PresetLightingSoftness | "Mixed" | "Dim" | "Normal" | "Bright";

属性值

Word.PresetLightingSoftness | "Mixed" | "Dim" | "Normal" | "Bright"

注解

API 集:WordApiDesktop 1.3

presetMaterial

指定延伸表面的材料。

presetMaterial: Word.PresetMaterial | "Mixed" | "Matte" | "Plastic" | "Metal" | "WireFrame" | "Matte2" | "Plastic2" | "Metal2" | "WarmMatte" | "TranslucentPowder" | "Powder" | "DarkEdge" | "SoftEdge" | "Clear" | "Flat" | "SoftMetal";

属性值

Word.PresetMaterial | "Mixed" | "Matte" | "Plastic" | "Metal" | "WireFrame" | "Matte2" | "Plastic2" | "Metal2" | "WarmMatte" | "TranslucentPowder" | "Powder" | "DarkEdge" | "SoftEdge" | "Clear" | "Flat" | "SoftMetal"

注解

API 集:WordApiDesktop 1.3

presetThreeDimensionalFormat

返回预设的延伸格式。

readonly presetThreeDimensionalFormat: Word.PresetThreeDimensionalFormat | "Mixed" | "Format1" | "Format2" | "Format3" | "Format4" | "Format5" | "Format6" | "Format7" | "Format8" | "Format9" | "Format10" | "Format11" | "Format12" | "Format13" | "Format14" | "Format15" | "Format16" | "Format17" | "Format18" | "Format19" | "Format20";

属性值

Word.PresetThreeDimensionalFormat | "Mixed" | "Format1" | "Format2" | "Format3" | "Format4" | "Format5" | "Format6" | "Format7" | "Format8" | "Format9" | "Format10" | "Format11" | "Format12" | "Format13" | "Format14" | "Format15" | "Format16" | "Format17" | "Format18" | "Format19" | "Format20"

注解

API 集:WordApiDesktop 1.3

projectText

指定形状上的文本是否随形状旋转。 true 旋转文本。

projectText: boolean;

属性值

boolean

注解

API 集:WordApiDesktop 1.3

rotationX

指定压模形状绕 x 轴的旋转角度(以度为单位)。

rotationX: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

rotationY

指定压模形状绕 y 轴的旋转角度(以度为单位)。

rotationY: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

rotationZ

指定相机的 z 轴旋转。

rotationZ: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

z

指定形状在 z 轴上的位置。

z: number;

属性值

number

注解

API 集:WordApiDesktop 1.3

方法详细信息

incrementRotationHorizontal(increment)

在 x 轴上水平旋转形状。 旋转角度数。

incrementRotationHorizontal(increment: number): void;

参数

increment

number

返回

void

注解

API 集:WordApiDesktop 1.3

incrementRotationVertical(increment)

在 y 轴上垂直旋转形状。 旋转角度数。

incrementRotationVertical(increment: number): void;

参数

increment

number

返回

void

注解

API 集:WordApiDesktop 1.3

incrementRotationX(increment)

更改围绕 x 轴的旋转。 旋转角度数。

incrementRotationX(increment: number): void;

参数

increment

number

返回

void

注解

API 集:WordApiDesktop 1.3

incrementRotationY(increment)

更改围绕 y 轴的旋转。 旋转角度数。

incrementRotationY(increment: number): void;

参数

increment

number

返回

void

注解

API 集:WordApiDesktop 1.3

incrementRotationZ(increment)

在 z 轴上旋转形状。 旋转角度数。

incrementRotationZ(increment: number): void;

参数

increment

number

返回

void

注解

API 集:WordApiDesktop 1.3

load(options)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

load(options?: Word.Interfaces.ThreeDimensionalFormatLoadOptions): Word.ThreeDimensionalFormat;

参数

options
Word.Interfaces.ThreeDimensionalFormatLoadOptions

为要加载的对象属性提供选项。

返回

load(propertyNames)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

load(propertyNames?: string | string[]): Word.ThreeDimensionalFormat;

参数

propertyNames

string | string[]

指定要加载的属性的逗号分隔的字符串或字符串数组。

返回

load(propertyNamesAndPaths)

将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): Word.ThreeDimensionalFormat;

参数

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select 是指定要加载的属性的逗号分隔字符串,以及 propertyNamesAndPaths.expand 指定要加载的导航属性的逗号分隔字符串。

返回

resetRotation()

将围绕 x 轴、y 轴和 z 轴的压模旋转重置为 0。

resetRotation(): void;

返回

void

注解

API 集:WordApiDesktop 1.3

set(properties, options)

同时设置对象的多个属性。 可以传递具有相应属性的纯文本对象,也可以传递另一个相同类型的 API 对象。

set(properties: Interfaces.ThreeDimensionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void;

参数

properties
Word.Interfaces.ThreeDimensionalFormatUpdateData

一个 JavaScript 对象,其属性与调用该方法的对象的属性同构结构。

options
OfficeExtension.UpdateOptions

提供一个选项,用于在 properties 对象尝试设置任何只读属性时禁止错误。

返回

void

set(properties)

基于现有加载的对象,同时在对象上设置多个属性。

set(properties: Word.ThreeDimensionalFormat): void;

参数

返回

void

setExtrusionDirection(presetExtrusionDirection)

设置拉伸的扫描路径的方向。

setExtrusionDirection(presetExtrusionDirection: Word.PresetExtrusionDirection): void;

参数

presetExtrusionDirection
Word.PresetExtrusionDirection

预设方向。

返回

void

注解

API 集:WordApiDesktop 1.3

setExtrusionDirection(presetExtrusionDirection)

设置拉伸的扫描路径的方向。

setExtrusionDirection(presetExtrusionDirection: "Mixed" | "BottomRight" | "Bottom" | "BottomLeft" | "Right" | "None" | "Left" | "TopRight" | "Top" | "TopLeft"): void;

参数

presetExtrusionDirection

"Mixed" | "BottomRight" | "Bottom" | "BottomLeft" | "Right" | "None" | "Left" | "TopRight" | "Top" | "TopLeft"

预设方向。

返回

void

注解

API 集:WordApiDesktop 1.3

setPresetCamera(presetCamera)

设置形状的相机预设。 预设相机类型。

setPresetCamera(presetCamera: Word.PresetCamera): void;

参数

presetCamera
Word.PresetCamera

返回

void

注解

API 集:WordApiDesktop 1.3

setPresetCamera(presetCamera)

设置形状的相机预设。 预设相机类型。

setPresetCamera(presetCamera: "Mixed" | "LegacyObliqueTopLeft" | "LegacyObliqueTop" | "LegacyObliqueTopRight" | "LegacyObliqueLeft" | "LegacyObliqueFront" | "LegacyObliqueRight" | "LegacyObliqueBottomLeft" | "LegacyObliqueBottom" | "LegacyObliqueBottomRight" | "LegacyPerspectiveTopLeft" | "LegacyPerspectiveTop" | "LegacyPerspectiveTopRight" | "LegacyPerspectiveLeft" | "LegacyPerspectiveFront" | "LegacyPerspectiveRight" | "LegacyPerspectiveBottomLeft" | "LegacyPerspectiveBottom" | "LegacyPerspectiveBottomRight" | "OrthographicFront" | "IsometricTopUp" | "IsometricTopDown" | "IsometricBottomUp" | "IsometricBottomDown" | "IsometricLeftUp" | "IsometricLeftDown" | "IsometricRightUp" | "IsometricRightDown" | "IsometricOffAxis1Left" | "IsometricOffAxis1Right" | "IsometricOffAxis1Top" | "IsometricOffAxis2Left" | "IsometricOffAxis2Right" | "IsometricOffAxis2Top" | "IsometricOffAxis3Left" | "IsometricOffAxis3Right" | "IsometricOffAxis3Bottom" | "IsometricOffAxis4Left" | "IsometricOffAxis4Right" | "IsometricOffAxis4Bottom" | "ObliqueTopLeft" | "ObliqueTop" | "ObliqueTopRight" | "ObliqueLeft" | "ObliqueRight" | "ObliqueBottomLeft" | "ObliqueBottom" | "ObliqueBottomRight" | "PerspectiveFront" | "PerspectiveLeft" | "PerspectiveRight" | "PerspectiveAbove" | "PerspectiveBelow" | "PerspectiveAboveLeftFacing" | "PerspectiveAboveRightFacing" | "PerspectiveContrastingLeftFacing" | "PerspectiveContrastingRightFacing" | "PerspectiveHeroicLeftFacing" | "PerspectiveHeroicRightFacing" | "PerspectiveHeroicExtremeLeftFacing" | "PerspectiveHeroicExtremeRightFacing" | "PerspectiveRelaxed" | "PerspectiveRelaxedModerately"): void;

参数

presetCamera

"Mixed" | "LegacyObliqueTopLeft" | "LegacyObliqueTop" | "LegacyObliqueTopRight" | "LegacyObliqueLeft" | "LegacyObliqueFront" | "LegacyObliqueRight" | "LegacyObliqueBottomLeft" | "LegacyObliqueBottom" | "LegacyObliqueBottomRight" | "LegacyPerspectiveTopLeft" | "LegacyPerspectiveTop" | "LegacyPerspectiveTopRight" | "LegacyPerspectiveLeft" | "LegacyPerspectiveFront" | "LegacyPerspectiveRight" | "LegacyPerspectiveBottomLeft" | "LegacyPerspectiveBottom" | "LegacyPerspectiveBottomRight" | "OrthographicFront" | "IsometricTopUp" | "IsometricTopDown" | "IsometricBottomUp" | "IsometricBottomDown" | "IsometricLeftUp" | "IsometricLeftDown" | "IsometricRightUp" | "IsometricRightDown" | "IsometricOffAxis1Left" | "IsometricOffAxis1Right" | "IsometricOffAxis1Top" | "IsometricOffAxis2Left" | "IsometricOffAxis2Right" | "IsometricOffAxis2Top" | "IsometricOffAxis3Left" | "IsometricOffAxis3Right" | "IsometricOffAxis3Bottom" | "IsometricOffAxis4Left" | "IsometricOffAxis4Right" | "IsometricOffAxis4Bottom" | "ObliqueTopLeft" | "ObliqueTop" | "ObliqueTopRight" | "ObliqueLeft" | "ObliqueRight" | "ObliqueBottomLeft" | "ObliqueBottom" | "ObliqueBottomRight" | "PerspectiveFront" | "PerspectiveLeft" | "PerspectiveRight" | "PerspectiveAbove" | "PerspectiveBelow" | "PerspectiveAboveLeftFacing" | "PerspectiveAboveRightFacing" | "PerspectiveContrastingLeftFacing" | "PerspectiveContrastingRightFacing" | "PerspectiveHeroicLeftFacing" | "PerspectiveHeroicRightFacing" | "PerspectiveHeroicExtremeLeftFacing" | "PerspectiveHeroicExtremeRightFacing" | "PerspectiveRelaxed" | "PerspectiveRelaxedModerately"

返回

void

注解

API 集:WordApiDesktop 1.3

setThreeDimensionalFormat(presetThreeDimensionalFormat)

返回预设的延伸格式。 预设格式。

setThreeDimensionalFormat(presetThreeDimensionalFormat: Word.PresetThreeDimensionalFormat): void;

参数

presetThreeDimensionalFormat
Word.PresetThreeDimensionalFormat

返回

void

注解

API 集:WordApiDesktop 1.3

setThreeDimensionalFormat(presetThreeDimensionalFormat)

返回预设的延伸格式。 预设格式。

setThreeDimensionalFormat(presetThreeDimensionalFormat: "Mixed" | "Format1" | "Format2" | "Format3" | "Format4" | "Format5" | "Format6" | "Format7" | "Format8" | "Format9" | "Format10" | "Format11" | "Format12" | "Format13" | "Format14" | "Format15" | "Format16" | "Format17" | "Format18" | "Format19" | "Format20"): void;

参数

presetThreeDimensionalFormat

"Mixed" | "Format1" | "Format2" | "Format3" | "Format4" | "Format5" | "Format6" | "Format7" | "Format8" | "Format9" | "Format10" | "Format11" | "Format12" | "Format13" | "Format14" | "Format15" | "Format16" | "Format17" | "Format18" | "Format19" | "Format20"

返回

void

注解

API 集:WordApiDesktop 1.3

toJSON()

覆盖 JavaScript toJSON() 方法,以便在将 API 对象传递给 JSON.stringify()时提供更有用的输出。 (JSON.stringify反过来调用 toJSON 传递给它的对象的方法。) 虽然原始 Word.ThreeDimensionalFormat 对象是 API 对象, toJSON 但该方法返回一个纯 JavaScript 对象, (类型化为 Word.Interfaces.ThreeDimensionalFormatData) ,其中包含从原始对象加载的任何子属性的浅层副本。

toJSON(): Word.Interfaces.ThreeDimensionalFormatData;

返回

track()

根据文档中的相应更改来跟踪对象,以便进行自动调整。 此调用是 context.trackedObjects.add (thisObject) 的简写。 如果在调用中 .sync 使用此对象,并且在“.run”批处理的顺序执行之外使用此对象,并且在设置属性或对对象调用方法时收到“InvalidObjectPath”错误,则需要在首次创建对象时将对象添加到跟踪对象集合。 如果此对象是集合的一部分,您还应跟踪父集合。

track(): Word.ThreeDimensionalFormat;

返回

untrack()

释放与此对象关联的内存(如果先前已跟踪过)。 此调用是 context.trackedObjects.remove (thisObject) 的简写。 拥有许多跟踪对象会降低主机应用程序的速度,因此请在使用完毕后释放所添加的任何对象。 需要在内存释放生效之前调用 context.sync()

untrack(): Word.ThreeDimensionalFormat;

返回