Aspose::Words::Drawing::ShapeType enum

ShapeType enum

Specifies the type of shape in a Microsoft Word document.

enum class ShapeType : int

Values

NameValueDescription
AccentBorderCallout150Accent border callout 1.
AccentBorderCallout251Accent border callout 2.
AccentBorderCallout352Accent border callout 3.
AccentBorderCallout90181Accent border callout 90.
AccentCallout144An accent callout shape with one arrow.
AccentCallout245An accent callout shape with two arrows.
AccentCallout346An accent callout shape with three arrows.
AccentCallout90179Accent callout 90.
ActionButtonBackPrevious194Action button back previous.
ActionButtonBeginning196Action button beginning.
ActionButtonBlank189Action button blank.
ActionButtonDocument198Action button document.
ActionButtonEnd195Action button end.
ActionButtonForwardNext193Action button forward next.
ActionButtonHelp191Action button help.
ActionButtonHome190Action button home.
ActionButtonInformation192Action button information.
ActionButtonMovie200Action button movie.
ActionButtonReturn197Action button return.
ActionButtonSound199Action button sound.
Arc19Arc.
Arrow13Arrow.
Balloon17Balloon.
BentArrow91Bent arrow.
BentConnector233A bent connector shape with two segments.
BentConnector334A bent connector shape with three segments.
BentConnector435A bent connector shape with four segments.
BentConnector536A bent connector shape with five segments.
BentUpArrow90Bent up arrow.
Bevel84Bevel.
BlockArc95Block arc.
BorderCallout147Border callout 1.
BorderCallout248Border callout 2.
BorderCallout349Border callout 3.
BorderCallout90180Border callout 90.
BracePair186Brace pair
BracketPair185Bracket pair.
Callout141A callout shape with one arrow.
Callout242A callout shape with two arrows.
Callout343A callout shape with three arrows.
Callout90178Callout 90.
Can22Can.
ChartPlus244Chart plus.
ChartStar245Chart star.
ChartX246Chart X.
Chevron55Chevron.
Chord243Chord.
CircularArrow99Circular arrow.
Cloud211Cloud.
CloudCallout106Cloud callout.
Corner241Corner.
CornerTabs242Corner tabs.
Cube16Cube.
CurvedConnector237A curved connector shape with two segments.
CurvedConnector338A curved connector shape with three segments.
CurvedConnector439A curved connector shape with four segments.
CurvedConnector540A curved connector shape with five segments.
CurvedDownArrow105Curved down arrow.
CurvedLeftArrow103Curved left arrow.
CurvedRightArrow102Curved right arrow.
CurvedUpArrow104Curved up arrow
CustomShape100This shape type seems to be set for shapes that are not part of the standard set of the auto shapes in Microsoft Word. For example, if you insert a new auto shape from ClipArt.
You cannot create shapes of this type in the document.
Decagon238Decagon.
DiagonalCornersRounded209Round diagonal corner rectangle.
DiagonalCornersSnipped205Snip diagonal corner rectangle.
DiagonalStripe240Diagonal stripe.
Diamond4Diamond.
Dodecagon239Dodecagon.
Donut23Donut.
DoubleWave188Double wave.
DownArrow67Down arrow.
DownArrowCallout80Down arrow callout.
Ellipse3Ellipse.
EllipseRibbon107Ellipse ribbon.
EllipseRibbon2108Ellipse ribbon 2.
FlowChartAlternateProcess176Flow chart alternate process.
FlowChartCollate125Flow chart collate.
FlowChartConnector120Flow chart connector.
FlowChartDecision110Flow chart decision.
FlowChartDelay135Flow chart delay.
FlowChartDisplay134Flow chart display.
FlowChartDocument114Flow chart document.
FlowChartExtract127Flow chart extract.
FlowChartInputOutput111Flow chart input output.
FlowChartInternalStorage113Flow chart internal storage.
FlowChartMagneticDisk132Flow chart magnetic disk.
FlowChartMagneticDrum133Flow chart magnetic drum.
FlowChartMagneticTape131Flow char magnetic tape.
FlowChartManualInput118Flow chart manual input.
FlowChartManualOperation119Flow chart manual operation.
FlowChartMerge128Flow chart merge.
FlowChartMultidocument115Flow chart multi document.
FlowChartOfflineStorage129Flow chart off-line storage.
FlowChartOffpageConnector177Flow chart off page connector.
FlowChartOnlineStorage130Flow chart on-line storage.
FlowChartOr124Flow chart or.
FlowChartPredefinedProcess112Flow chart predefined process
FlowChartPreparation117Flow chart preparation.
FlowChartProcess109Flow chart process.
FlowChartPunchedCard121Flow chart punched card.
FlowChartPunchedTape122Flow chart punched tape.
FlowChartSort126Flow chart sort.
FlowChartSummingJunction123Flow chart summing junction.
FlowChartTerminator116Flow chart terminator.
FoldedCorner65Folded corner.
Frame233Frame.
Funnel235Funnel.
Gear6236Six-tooth gear.
Gear9237Nine-tooth gear.
Group-1The shape is a group shape.
HalfFrame234Half frame.
Heart74Heart.
Heptagon210Heptagon.
Hexagon9Hexagon.
HomePlate15Home plate.
HorizontalScroll98Horizontal scroll.
Image75The shape is an image.
InverseLine222Inverse line.
IrregularSeal171Irregular seal 1.
IrregularSeal272Irregular seal 2.
LeftArrow66Left arrow.
LeftArrowCallout77Left arrow callout.
LeftBrace87Left brace.
LeftBracket85Left bracket.
LeftCircularArrow232Left circular arrow.
LeftRightArrow69Left right arrow.
LeftRightArrowCallout81Left right arrow callout.
LeftRightCircularArrow230Left-right circular arrow.
LeftRightRibbon231Left-right ribbon.
LeftRightUpArrow182Left right up arrow.
LeftUpArrow89Left up arrow.
LightningBolt73Lightning bolt.
Line20Line.
MathDivide226Math divide.
MathEqual227Math equal.
MathMinus224Math minus.
MathMultiply225Math multiply.
MathNotEqual228Math not equal.
MathPlus223Math plus.
MinValue-2Reserved for the system use.
Moon184Moon.
NoSmoking57NoSmoking.
NonIsoscelesTrapezoid229Non-isosceles trapezoid.
NonPrimitive0A shape drawn by user and consisting of multiple segments and/or vertices (curve, freeform or scribble).
You cannot create shapes of this type in the document.
NotchedRightArrow94Notched right arrow.
Octagon10Octagon.
OleControl201The shape is an ActiveX control.
You cannot create shapes of this type in the document.
OleObject-2The shape is an OLE object.
You cannot create shapes of this type in the document.
Parallelogram7Parallelogram.
Pentagon56Pentagon.
Pie220Pie.
Plaque21Plaque.
PlaqueTabs219Plaque tabs.
Plus11Plus.
QuadArrow76Quad arrow.
QuadArrowCallout83Quad arrow callout.
Rectangle1Rectangle.
Ribbon53Ribbon.
Ribbon254Ribbon 2.
RightArrowCallout78Right arrow callout
RightBrace88Right brace.
RightBracket86Right bracket.
RightTriangle6Right triangle.
RoundRectangle2Round rectangle.
Seal18Seal.
Seal10214Ten-pointed star.
Seal12215Twelve-pointed star.
Seal165916-pointed star.
Seal249224-pointed star.
Seal326032-pointed star.
Seal4187Four-pointed star.
Seal6212Six-pointed star.
Seal7213Seven-pointed star.
Seal858Eight-pointed star.
SingleCornerRounded207Round single corner rectangle.
SingleCornerSnipped203Snip single corner rectangle object.
SmileyFace96Smiley face.
SquareTabs218Square tabs.
Star12Star.
StraightConnector132A straight connector shape.
StripedRightArrow93Striped right arrow.
Sun183Sun.
SwooshArrow216Swoosh arrow.
Teardrop217Teardrop.
TextArchDownCurve145Arch down curve, WordArt object.
TextArchDownPour149Arch down pour, WordArt object.
TextArchUpCurve144Arch up curve, WordArt object.
TextArchUpPour148Arch up pour, WordArt object.
TextBox202The shape is a textbox. Note that shapes of many other types can also have text inside them too. A shape does not have to have this type to contain text.
TextButtonCurve147Button curve, WordArt object.
TextButtonPour151Button pour, WordArt object.
TextCanDown175Can down, WordArt object.
TextCanUp174Can up, WordArt object.
TextCascadeDown155Cascade down, WordArt object.
TextCascadeUp154Cascade up, WordArt object.
TextChevron140Chevron, WordArt object.
TextChevronInverted141Chevron inverted, WordArt object.
TextCircleCurve146Circle curve, WordArt object.
TextCirclePour150Circle pour, WordArt object.
TextCurve27Text curve.
TextCurveDown153Curve down, WordArt object.
TextCurveUp152Curve up, WordArt object.
TextDeflate161Deflate, WordArt object.
TextDeflateBottom163Deflate bottom, WordArt object.
TextDeflateInflate166Deflate inflate, WordArt object.
TextDeflateInflateDeflate167Deflate inflate deflate, WordArt object.
TextDeflateTop165Deflate top, WordArt object.
TextFadeDown171Fade down, WordArt object.
TextFadeLeft169Fade left, WordArt object.
TextFadeRight168Fade right, WordArt object.
TextFadeUp170Fade up, WordArt object.
TextHexagon26Text hexagon.
TextInflate160Inflate, WordArt object.
TextInflateBottom162Inflate bottom, WordArt object.
TextInflateTop164Inflate top, WordArt object.
TextOctagon25Text octagon.
TextOnCurve30Text on curve.
TextOnRing31Text on ring.
TextPlainText136Plain-text, WordArt object.
TextRing29Text ring.
TextRingInside142Ring inside, WordArt object.
TextRingOutside143Ring outside, WordArt object.
TextSimple24Text simple.
TextSlantDown173Slant down, WordArt object.
TextSlantUp172Slant up, WordArt object.
TextStop137Stop, WordArt object.
TextTriangle138Triangle, WordArt object.
TextTriangleInverted139Triangle inverted, WordArt object.
TextWave28Text wave.
TextWave1156Wave 1, WordArt object.
TextWave2157Wave 2, WordArt object.
TextWave3158Wave 3, WordArt object.
TextWave4159Wave 4, WordArt object.
ThickArrow14Thick arrow.
TopCornersOneRoundedOneSnipped206Snip and round single corner rectangle.
TopCornersRounded208Round same side corner rectangle.
TopCornersSnipped204Snip same side corner rectangle.
Trapezoid8Trapezoid.
Triangle5Triangle.
UpArrow68Up arrow.
UpArrowCallout79Up arrow callout.
UpDownArrow70Up down arrow.
UpDownArrowCallout82Up down arrow callout.
UturnArrow101Uturn arrow.
VerticalScroll97Vertical scroll.
Wave64Wave.
WedgeEllipseCallout63Wedge ellipse callout.
WedgePie221Wedge pie.
WedgeRRectCallout62Wedge R rect callout.
WedgeRectCallout61Wedge rect callout.

Examples

Shows how to insert a shape with an image from the local file system into a document.

auto doc = System::MakeObject<Aspose::Words::Document>();

// The "Shape" class's public constructor will create a shape with "ShapeMarkupLanguage.Vml" markup type.
// If you need to create a shape of a non-primitive type, such as SingleCornerSnipped, TopCornersSnipped, DiagonalCornersSnipped,
// TopCornersOneRoundedOneSnipped, SingleCornerRounded, TopCornersRounded, or DiagonalCornersRounded,
// please use DocumentBuilder.InsertShape.
auto shape = System::MakeObject<Aspose::Words::Drawing::Shape>(doc, ShapeType::Image);
shape->get_ImageData()->SetImage(get_ImageDir() + u"Windows MetaFile.wmf");
shape->set_Width(100);
shape->set_Height(100);

doc->get_FirstSection()->get_Body()->get_FirstParagraph()->AppendChild<System::SharedPtr<Aspose::Words::Drawing::Shape>>(shape);

doc->Save(get_ArtifactsDir() + u"Image.FromFile.docx");

Shows how Aspose.Words identify shapes.

auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

builder->InsertShape(ShapeType::Heptagon, RelativeHorizontalPosition::Page, static_cast<double>(0), RelativeVerticalPosition::Page, static_cast<double>(0), static_cast<double>(0), static_cast<double>(0), WrapType::None);

builder->InsertShape(ShapeType::Cloud, RelativeHorizontalPosition::RightMargin, static_cast<double>(0), RelativeVerticalPosition::Page, static_cast<double>(0), static_cast<double>(0), static_cast<double>(0), WrapType::None);

builder->InsertShape(ShapeType::MathPlus, RelativeHorizontalPosition::RightMargin, static_cast<double>(0), RelativeVerticalPosition::Page, static_cast<double>(0), static_cast<double>(0), static_cast<double>(0), WrapType::None);

// To correct identify shape types you need to work with shapes as DML.
auto saveOptions = System::MakeObject<Aspose::Words::Saving::OoxmlSaveOptions>(SaveFormat::Docx);
// "Strict" or "Transitional" compliance allows to save shape as DML.
saveOptions->set_Compliance(OoxmlCompliance::Iso29500_2008_Transitional);

doc->Save(get_ArtifactsDir() + u"Shape.ShapeTypes.docx", saveOptions);
doc = System::MakeObject<Aspose::Words::Document>(System::String(get_ArtifactsDir() + u"Shape.ShapeTypes.docx"));

System::ArrayPtr<System::SharedPtr<Aspose::Words::Drawing::Shape>> shapes = doc->GetChildNodes(NodeType::Shape, true)->LINQ_OfType<System::SharedPtr<Aspose::Words::Drawing::Shape>>()->LINQ_ToArray();

for (System::SharedPtr<Aspose::Words::Drawing::Shape> shape : shapes)
{
    std::cout << System::EnumGetName(shape->get_ShapeType()) << std::endl;
}

See Also