ShapeType
内容
[
隐藏
]ShapeType enumeration
指定 Microsoft Word 文档中的形状类型。
public enum ShapeType
价值观
姓名 | 价值 | 描述 |
---|---|---|
Image | 75 | 该形状是一张图片。 |
TextBox | 202 | 该形状是一个文本框。请注意,许多其他类型的形状也可以包含文本。 形状不必是此类型即可包含文本。 |
Group | -1 | 形状为群形。 |
OleObject | -2 | 该形状是一个 OLE 对象。 |
OleControl | 201 | 该形状是一个 ActiveX 控件。 |
NonPrimitive | 0 | 用户绘制的形状,由多个线段和/或顶点组成(曲线、自由形状或涂鸦)。 |
Rectangle | 1 | 矩形. |
RoundRectangle | 2 | 圆角矩形. |
Ellipse | 3 | 椭圆. |
Diamond | 4 | 钻石. |
Triangle | 5 | 三角形. |
RightTriangle | 6 | 直角三角形。 |
Parallelogram | 7 | 平行四边形. |
Trapezoid | 8 | 梯形. |
Hexagon | 9 | 六边形. |
Octagon | 10 | 八边形。 |
Plus | 11 | 加. |
Star | 12 | 星星. |
Arrow | 13 | 箭头. |
ThickArrow | 14 | 粗箭头。 |
HomePlate | 15 | 本垒板。 |
Cube | 16 | 立方体. |
Balloon | 17 | 气球. |
Seal | 18 | 印章. |
Arc | 19 | 弧. |
Line | 20 | 行. |
Plaque | 21 | 牌匾. |
Can | 22 | 可以。 |
Donut | 23 | 甜甜圈. |
TextSimple | 24 | 文本简单。 |
TextOctagon | 25 | 文本八边形。 |
TextHexagon | 26 | 文本六边形. |
TextCurve | 27 | 文本曲线. |
TextWave | 28 | 文本波形。 |
TextRing | 29 | 短信铃声。 |
TextOnCurve | 30 | 曲线上的文字。 |
TextOnRing | 31 | 戒指上的文字。 |
StraightConnector1 | 32 | 直连接器形状。 |
BentConnector2 | 33 | 具有两段的弯曲连接器形状。 |
BentConnector3 | 34 | 具有三个段的弯曲连接器形状。 |
BentConnector4 | 35 | 具有四个段的弯曲连接器形状。 |
BentConnector5 | 36 | 具有五个段的弯曲连接器形状。 |
CurvedConnector2 | 37 | 具有两段的弯曲连接器形状。 |
CurvedConnector3 | 38 | 具有三个段的弯曲连接器形状。 |
CurvedConnector4 | 39 | 具有四个段的弯曲连接器形状。 |
CurvedConnector5 | 40 | 具有五个段的弯曲连接器形状。 |
Callout1 | 41 | 带有一个箭头的标注形状。 |
Callout2 | 42 | 带有两个箭头的标注形状。 |
Callout3 | 43 | 带有三个箭头的标注形状。 |
AccentCallout1 | 44 | 带有一个箭头的重音标注形状。 |
AccentCallout2 | 45 | 带有两个箭头的重音标注形状。 |
AccentCallout3 | 46 | 带有三个箭头的重音标注形状。 |
BorderCallout1 | 47 | 边框标注 1. |
BorderCallout2 | 48 | 边框标注 2. |
BorderCallout3 | 49 | 边框标注 3. |
AccentBorderCallout1 | 50 | 重音边框标注 1. |
AccentBorderCallout2 | 51 | 重音边框标注 2. |
AccentBorderCallout3 | 52 | 重音边框标注 3. |
Ribbon | 53 | 丝带. |
Ribbon2 | 54 | 丝带 2. |
Chevron | 55 | 雪佛龙. |
Pentagon | 56 | 五角大楼。 |
NoSmoking | 57 | 禁止吸烟。 |
Seal8 | 58 | 八角星。 |
Seal16 | 59 | 十六角星。 |
Seal32 | 60 | 三十二角星。 |
WedgeRectCallout | 61 | 楔形矩形标注。 |
WedgeRRectCallout | 62 | 楔形右矩形标注。 |
WedgeEllipseCallout | 63 | 楔形椭圆标注。 |
Wave | 64 | 挥手。 |
FoldedCorner | 65 | 折角。 |
LeftArrow | 66 | 左箭头。 |
DownArrow | 67 | 向下箭头。 |
UpArrow | 68 | 向上箭头。 |
LeftRightArrow | 69 | 左右箭头。 |
UpDownArrow | 70 | 上下箭头。 |
IrregularSeal1 | 71 | 不规则印章 1. |
IrregularSeal2 | 72 | 不规则印章 2. |
LightningBolt | 73 | 闪电。 |
Heart | 74 | 心. |
QuadArrow | 76 | 四箭。 |
LeftArrowCallout | 77 | 左箭头标注。 |
RightArrowCallout | 78 | 右箭头标注 |
UpArrowCallout | 79 | 向上箭头标注。 |
DownArrowCallout | 80 | 向下箭头标注。 |
LeftRightArrowCallout | 81 | 左右箭头标注。 |
UpDownArrowCallout | 82 | 上下箭头标注。 |
QuadArrowCallout | 83 | 四箭头标注。 |
Bevel | 84 | 斜角. |
LeftBracket | 85 | 左括号. |
RightBracket | 86 | 右括号。 |
LeftBrace | 87 | 左括号。 |
RightBrace | 88 | 右括号。 |
LeftUpArrow | 89 | 左上箭头。 |
BentUpArrow | 90 | 向上弯曲的箭头。 |
BentArrow | 91 | 弯曲的箭头。 |
Seal24 | 92 | 二十四角星。 |
StripedRightArrow | 93 | 条纹右箭头。 |
NotchedRightArrow | 94 | 带缺口的右箭头。 |
BlockArc | 95 | 阻止弧。 |
SmileyFace | 96 | 笑脸。 |
VerticalScroll | 97 | 垂直滚动。 |
HorizontalScroll | 98 | 水平滚动。 |
CircularArrow | 99 | 圆形箭头。 |
CustomShape | 100 | 此形状类型似乎是为 Microsoft Word 中不属于标准自动形状集的形状设置的。例如,如果您从剪贴画插入一个新的自动形状。 |
UturnArrow | 101 | 掉头箭头。 |
CurvedRightArrow | 102 | 向右弯曲的箭头。 |
CurvedLeftArrow | 103 | 向左弯曲的箭头。 |
CurvedUpArrow | 104 | 向上弯曲的箭头 |
CurvedDownArrow | 105 | 向下弯曲的箭头。 |
CloudCallout | 106 | 云标注。 |
EllipseRibbon | 107 | 椭圆丝带. |
EllipseRibbon2 | 108 | 椭圆丝带 2. |
FlowChartProcess | 109 | 流程图流程。 |
FlowChartDecision | 110 | 流程图决策。 |
FlowChartInputOutput | 111 | 流程图输入输出。 |
FlowChartPredefinedProcess | 112 | 流程图预定义流程 |
FlowChartInternalStorage | 113 | 流程图内部存储。 |
FlowChartDocument | 114 | 流程图文档。 |
FlowChartMultidocument | 115 | 流程图多文档。 |
FlowChartTerminator | 116 | 流程图终止符。 |
FlowChartPreparation | 117 | 流程图准备。 |
FlowChartManualInput | 118 | 流程图手动输入。 |
FlowChartManualOperation | 119 | 流程图手动操作。 |
FlowChartConnector | 120 | 流程图连接器。 |
FlowChartPunchedCard | 121 | 流程图穿孔卡。 |
FlowChartPunchedTape | 122 | 流程图穿孔纸带。 |
FlowChartSummingJunction | 123 | 流程图求和连接点。 |
FlowChartOr | 124 | 流程图或. |
FlowChartCollate | 125 | 流程图整理。 |
FlowChartSort | 126 | 流程图排序。 |
FlowChartExtract | 127 | 流程图摘录。 |
FlowChartMerge | 128 | 流程图合并。 |
FlowChartOfflineStorage | 129 | 流程图离线存储。 |
FlowChartOnlineStorage | 130 | 流程图在线存储。 |
FlowChartMagneticTape | 131 | 流动炭磁带。 |
FlowChartMagneticDisk | 132 | 流程图磁盘。 |
FlowChartMagneticDrum | 133 | 磁鼓流程图。 |
FlowChartDisplay | 134 | 流程图显示。 |
FlowChartDelay | 135 | 流程图延迟。 |
TextPlainText | 136 | 纯文本,艺术字对象。 |
TextStop | 137 | 停止,艺术字对象。 |
TextTriangle | 138 | 三角形,艺术字对象。 |
TextTriangleInverted | 139 | 倒三角形,艺术字对象。 |
TextChevron | 140 | 雪佛龙,艺术字对象。 |
TextChevronInverted | 141 | 倒置的 V 形,艺术字对象。 |
TextRingInside | 142 | 内有环,艺术字对象。 |
TextRingOutside | 143 | 外部环,艺术字对象。 |
TextArchUpCurve | 144 | 拱起曲线,艺术字对象。 |
TextArchDownCurve | 145 | 拱起的曲线,艺术字对象。 |
TextCircleCurve | 146 | 圆形曲线,艺术字对象。 |
TextButtonCurve | 147 | 按钮曲线,艺术字对象。 |
TextArchUpPour | 148 | 拱起,艺术字对象。 |
TextArchDownPour | 149 | 拱形下倾,艺术字对象。 |
TextCirclePour | 150 | 圆形倾倒,艺术字对象。 |
TextButtonPour | 151 | 按钮倾倒,艺术字对象。 |
TextCurveUp | 152 | 曲线向上,艺术字对象。 |
TextCurveDown | 153 | 向下曲线,艺术字对象。 |
TextCascadeUp | 154 | 向上层叠,艺术字对象。 |
TextCascadeDown | 155 | 向下层叠,艺术字对象。 |
TextWave1 | 156 | Wave 1,艺术字对象。 |
TextWave2 | 157 | Wave 2,艺术字对象。 |
TextWave3 | 158 | Wave 3,艺术字对象。 |
TextWave4 | 159 | Wave 4,艺术字对象。 |
TextInflate | 160 | 膨胀,艺术字对象。 |
TextDeflate | 161 | 缩小,艺术字对象。 |
TextInflateBottom | 162 | 膨胀底部,艺术字对象。 |
TextDeflateBottom | 163 | 缩小底部,艺术字对象。 |
TextInflateTop | 164 | 膨胀顶部,艺术字对象。 |
TextDeflateTop | 165 | 放气顶部,艺术字对象。 |
TextDeflateInflate | 166 | 放气膨胀,艺术字对象。 |
TextDeflateInflateDeflate | 167 | 放气 充气 放气,艺术字对象。 |
TextFadeRight | 168 | 向右淡入淡出,艺术字对象。 |
TextFadeLeft | 169 | 向左淡出,艺术字对象。 |
TextFadeUp | 170 | 淡入淡出,艺术字对象。 |
TextFadeDown | 171 | 淡入淡出,艺术字对象。 |
TextSlantUp | 172 | 向上倾斜,艺术字对象。 |
TextSlantDown | 173 | 向下倾斜,艺术字对象。 |
TextCanUp | 174 | 可以向上,艺术字对象。 |
TextCanDown | 175 | 可以下载,艺术字对象。 |
FlowChartAlternateProcess | 176 | 流程图替代流程。 |
FlowChartOffpageConnector | 177 | 流程图页外连接器。 |
Callout90 | 178 | 标注 90. |
AccentCallout90 | 179 | 重音标注 90. |
BorderCallout90 | 180 | 边框标注 90. |
AccentBorderCallout90 | 181 | 重音边框标注 90. |
LeftRightUpArrow | 182 | 左右向上箭头。 |
Sun | 183 | 星期日 |
Moon | 184 | 月亮. |
BracketPair | 185 | 括号对. |
BracePair | 186 | 括号对 |
Seal4 | 187 | 四角星。 |
DoubleWave | 188 | 双波。 |
ActionButtonBlank | 189 | 操作按钮空白。 |
ActionButtonHome | 190 | 操作按钮主页。 |
ActionButtonHelp | 191 | 操作按钮帮助。 |
ActionButtonInformation | 192 | 操作按钮信息。 |
ActionButtonForwardNext | 193 | 操作按钮前进下一个。 |
ActionButtonBackPrevious | 194 | 操作按钮返回上一个。 |
ActionButtonEnd | 195 | 操作按钮结束。 |
ActionButtonBeginning | 196 | 操作按钮开始。 |
ActionButtonReturn | 197 | 操作按钮返回。 |
ActionButtonDocument | 198 | 操作按钮文档。 |
ActionButtonSound | 199 | 操作按钮声音。 |
ActionButtonMovie | 200 | 动作按钮电影。 |
SingleCornerSnipped | 203 | 剪掉矩形对象的单个角。 |
TopCornersSnipped | 204 | 剪掉同一侧角矩形。 |
DiagonalCornersSnipped | 205 | 剪掉对角矩形。 |
TopCornersOneRoundedOneSnipped | 206 | 剪掉并圆化单角矩形。 |
SingleCornerRounded | 207 | 圆角单角矩形。 |
TopCornersRounded | 208 | 圆角同边矩形。 |
DiagonalCornersRounded | 209 | 圆角对角矩形。 |
Heptagon | 210 | 七边形。 |
Cloud | 211 | 云. |
Seal6 | 212 | 六角星。 |
Seal7 | 213 | 七角星。 |
Seal10 | 214 | 十角星。 |
Seal12 | 215 | 十二角星。 |
SwooshArrow | 216 | 嗖嗖箭头。 |
Teardrop | 217 | 泪珠. |
SquareTabs | 218 | 方形标签。 |
PlaqueTabs | 219 | 斑块标签。 |
Pie | 220 | 饼图. |
WedgePie | 221 | 楔形饼。 |
InverseLine | 222 | 反向线。 |
MathPlus | 223 | 数学加法。 |
MathMinus | 224 | 数学减法。 |
MathMultiply | 225 | 数学乘法。 |
MathDivide | 226 | 数学除法。 |
MathEqual | 227 | 数学相等。 |
MathNotEqual | 228 | 数学不等于。 |
NonIsoscelesTrapezoid | 229 | 非等腰梯形。 |
LeftRightCircularArrow | 230 | 左右环形箭头。 |
LeftRightRibbon | 231 | 左右丝带。 |
LeftCircularArrow | 232 | 左环形箭头。 |
Frame | 233 | 框架. |
HalfFrame | 234 | 半帧。 |
Funnel | 235 | 漏斗. |
Gear6 | 236 | 六齿齿轮。 |
Gear9 | 237 | 九齿齿轮。 |
Decagon | 238 | 十边形. |
Dodecagon | 239 | 十二边形. |
DiagonalStripe | 240 | 对角条纹。 |
Corner | 241 | 角落. |
CornerTabs | 242 | 角标签。 |
Chord | 243 | 和弦. |
ChartPlus | 244 | 图表加. |
ChartStar | 245 | 图表之星。 |
ChartX | 246 | 图表 X. |
MinValue | -2 | 保留供系统使用。 |
例子
展示如何将带有本地文件系统中图像的形状插入到文档中。
Document doc = new Document();
// “Shape”类的公共构造函数将创建一个具有“ShapeMarkupLanguage.Vml”标记类型的形状。
// 如果需要创建非原始类型的形状,例如 SingleCornerSnipped、TopCornersSnipped、DiagonalCornersSnipped,
// TopCornersOneRoundedOneSnipped、SingleCornerRounded、TopCornersRounded 或 DiagonalCornersRounded,
// 请使用 DocumentBuilder.InsertShape。
Shape shape = new Shape(doc, ShapeType.Image);
shape.ImageData.SetImage(ImageDir + "Windows MetaFile.wmf");
shape.Width = 100;
shape.Height = 100;
doc.FirstSection.Body.FirstParagraph.AppendChild(shape);
doc.Save(ArtifactsDir + "Image.FromFile.docx");
展示 Aspose.Words 如何识别形状。
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertShape(ShapeType.Heptagon, RelativeHorizontalPosition.Page, 0,
RelativeVerticalPosition.Page, 0, 0, 0, WrapType.None);
builder.InsertShape(ShapeType.Cloud, RelativeHorizontalPosition.RightMargin, 0,
RelativeVerticalPosition.Page, 0, 0, 0, WrapType.None);
builder.InsertShape(ShapeType.MathPlus, RelativeHorizontalPosition.RightMargin, 0,
RelativeVerticalPosition.Page, 0, 0, 0, WrapType.None);
// 要正确识别形状类型,您需要将形状用作 DML。
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.Docx)
{
// “严格”或“过渡”合规性允许将形状保存为 DML。
Compliance = OoxmlCompliance.Iso29500_2008_Transitional
};
doc.Save(ArtifactsDir + "Shape.ShapeTypes.docx", saveOptions);
doc = new Document(ArtifactsDir + "Shape.ShapeTypes.docx");
Shape[] shapes = doc.GetChildNodes(NodeType.Shape, true).OfType<Shape>().ToArray();
foreach (Shape shape in shapes)
{
Console.WriteLine(shape.ShapeType);
}
也可以看看
- property ShapeType
- 命名空间 Aspose.Words.Drawing
- 部件 Aspose.Words