ShapeType enumeration
ShapeType enumeration
Specifies the type of shape in a Microsoft Word document.
Members
| Name | Description |
|---|---|
| IMAGE | The shape is an image. |
| TEXT_BOX | The 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. |
| GROUP | The shape is a group shape. |
| OLE_OBJECT | The shape is an OLE object. You cannot create shapes of this type in the document. |
| OLE_CONTROL | The shape is an ActiveX control. You cannot create shapes of this type in the document. |
| NON_PRIMITIVE | A 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. |
| RECTANGLE | Rectangle. |
| ROUND_RECTANGLE | Round rectangle. |
| ELLIPSE | Ellipse. |
| DIAMOND | Diamond. |
| TRIANGLE | Triangle. |
| RIGHT_TRIANGLE | Right triangle. |
| PARALLELOGRAM | Parallelogram. |
| TRAPEZOID | Trapezoid. |
| HEXAGON | Hexagon. |
| OCTAGON | Octagon. |
| PLUS | Plus. |
| STAR | Star. |
| ARROW | Arrow. |
| THICK_ARROW | Thick arrow. |
| HOME_PLATE | Home plate. |
| CUBE | Cube. |
| BALLOON | Balloon. |
| SEAL | Seal. |
| ARC | Arc. |
| LINE | Line. |
| PLAQUE | Plaque. |
| CAN | Can. |
| DONUT | Donut. |
| TEXT_SIMPLE | Text simple. |
| TEXT_OCTAGON | Text octagon. |
| TEXT_HEXAGON | Text hexagon. |
| TEXT_CURVE | Text curve. |
| TEXT_WAVE | Text wave. |
| TEXT_RING | Text ring. |
| TEXT_ON_CURVE | Text on curve. |
| TEXT_ON_RING | Text on ring. |
| STRAIGHT_CONNECTOR1 | A straight connector shape. |
| BENT_CONNECTOR2 | A bent connector shape with two segments. |
| BENT_CONNECTOR3 | A bent connector shape with three segments. |
| BENT_CONNECTOR4 | A bent connector shape with four segments. |
| BENT_CONNECTOR5 | A bent connector shape with five segments. |
| CURVED_CONNECTOR2 | A curved connector shape with two segments. |
| CURVED_CONNECTOR3 | A curved connector shape with three segments. |
| CURVED_CONNECTOR4 | A curved connector shape with four segments. |
| CURVED_CONNECTOR5 | A curved connector shape with five segments. |
| CALLOUT1 | A callout shape with one arrow. |
| CALLOUT2 | A callout shape with two arrows. |
| CALLOUT3 | A callout shape with three arrows. |
| ACCENT_CALLOUT1 | An accent callout shape with one arrow. |
| ACCENT_CALLOUT2 | An accent callout shape with two arrows. |
| ACCENT_CALLOUT3 | An accent callout shape with three arrows. |
| BORDER_CALLOUT1 | Border callout 1. |
| BORDER_CALLOUT2 | Border callout 2. |
| BORDER_CALLOUT3 | Border callout 3. |
| ACCENT_BORDER_CALLOUT1 | Accent border callout 1. |
| ACCENT_BORDER_CALLOUT2 | Accent border callout 2. |
| ACCENT_BORDER_CALLOUT3 | Accent border callout 3. |
| RIBBON | Ribbon. |
| RIBBON2 | Ribbon 2. |
| CHEVRON | Chevron. |
| PENTAGON | Pentagon. |
| NO_SMOKING | NoSmoking. |
| SEAL8 | Eight-pointed star. |
| SEAL16 | 16-pointed star. |
| SEAL32 | 32-pointed star. |
| WEDGE_RECT_CALLOUT | Wedge rect callout. |
| WEDGE_R_RECT_CALLOUT | Wedge R rect callout. |
| WEDGE_ELLIPSE_CALLOUT | Wedge ellipse callout. |
| WAVE | Wave. |
| FOLDED_CORNER | Folded corner. |
| LEFT_ARROW | Left arrow. |
| DOWN_ARROW | Down arrow. |
| UP_ARROW | Up arrow. |
| LEFT_RIGHT_ARROW | Left right arrow. |
| UP_DOWN_ARROW | Up down arrow. |
| IRREGULAR_SEAL1 | Irregular seal 1. |
| IRREGULAR_SEAL2 | Irregular seal 2. |
| LIGHTNING_BOLT | Lightning bolt. |
| HEART | Heart. |
| QUAD_ARROW | Quad arrow. |
| LEFT_ARROW_CALLOUT | Left arrow callout. |
| RIGHT_ARROW_CALLOUT | Right arrow callout |
| UP_ARROW_CALLOUT | Up arrow callout. |
| DOWN_ARROW_CALLOUT | Down arrow callout. |
| LEFT_RIGHT_ARROW_CALLOUT | Left right arrow callout. |
| UP_DOWN_ARROW_CALLOUT | Up down arrow callout. |
| QUAD_ARROW_CALLOUT | Quad arrow callout. |
| BEVEL | Bevel. |
| LEFT_BRACKET | Left bracket. |
| RIGHT_BRACKET | Right bracket. |
| LEFT_BRACE | Left brace. |
| RIGHT_BRACE | Right brace. |
| LEFT_UP_ARROW | Left up arrow. |
| BENT_UP_ARROW | Bent up arrow. |
| BENT_ARROW | Bent arrow. |
| SEAL24 | 24-pointed star. |
| STRIPED_RIGHT_ARROW | Striped right arrow. |
| NOTCHED_RIGHT_ARROW | Notched right arrow. |
| BLOCK_ARC | Block arc. |
| SMILEY_FACE | Smiley face. |
| VERTICAL_SCROLL | Vertical scroll. |
| HORIZONTAL_SCROLL | Horizontal scroll. |
| CIRCULAR_ARROW | Circular arrow. |
| CUSTOM_SHAPE | This 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. |
| UTURN_ARROW | Uturn arrow. |
| CURVED_RIGHT_ARROW | Curved right arrow. |
| CURVED_LEFT_ARROW | Curved left arrow. |
| CURVED_UP_ARROW | Curved up arrow |
| CURVED_DOWN_ARROW | Curved down arrow. |
| CLOUD_CALLOUT | Cloud callout. |
| ELLIPSE_RIBBON | Ellipse ribbon. |
| ELLIPSE_RIBBON2 | Ellipse ribbon 2. |
| FLOW_CHART_PROCESS | Flow chart process. |
| FLOW_CHART_DECISION | Flow chart decision. |
| FLOW_CHART_INPUT_OUTPUT | Flow chart input output. |
| FLOW_CHART_PREDEFINED_PROCESS | Flow chart predefined process |
| FLOW_CHART_INTERNAL_STORAGE | Flow chart internal storage. |
| FLOW_CHART_DOCUMENT | Flow chart document. |
| FLOW_CHART_MULTIDOCUMENT | Flow chart multi document. |
| FLOW_CHART_TERMINATOR | Flow chart terminator. |
| FLOW_CHART_PREPARATION | Flow chart preparation. |
| FLOW_CHART_MANUAL_INPUT | Flow chart manual input. |
| FLOW_CHART_MANUAL_OPERATION | Flow chart manual operation. |
| FLOW_CHART_CONNECTOR | Flow chart connector. |
| FLOW_CHART_PUNCHED_CARD | Flow chart punched card. |
| FLOW_CHART_PUNCHED_TAPE | Flow chart punched tape. |
| FLOW_CHART_SUMMING_JUNCTION | Flow chart summing junction. |
| FLOW_CHART_OR | Flow chart or. |
| FLOW_CHART_COLLATE | Flow chart collate. |
| FLOW_CHART_SORT | Flow chart sort. |
| FLOW_CHART_EXTRACT | Flow chart extract. |
| FLOW_CHART_MERGE | Flow chart merge. |
| FLOW_CHART_OFFLINE_STORAGE | Flow chart off-line storage. |
| FLOW_CHART_ONLINE_STORAGE | Flow chart on-line storage. |
| FLOW_CHART_MAGNETIC_TAPE | Flow char magnetic tape. |
| FLOW_CHART_MAGNETIC_DISK | Flow chart magnetic disk. |
| FLOW_CHART_MAGNETIC_DRUM | Flow chart magnetic drum. |
| FLOW_CHART_DISPLAY | Flow chart display. |
| FLOW_CHART_DELAY | Flow chart delay. |
| TEXT_PLAIN_TEXT | Plain-text, WordArt object. |
| TEXT_STOP | Stop, WordArt object. |
| TEXT_TRIANGLE | Triangle, WordArt object. |
| TEXT_TRIANGLE_INVERTED | Triangle inverted, WordArt object. |
| TEXT_CHEVRON | Chevron, WordArt object. |
| TEXT_CHEVRON_INVERTED | Chevron inverted, WordArt object. |
| TEXT_RING_INSIDE | Ring inside, WordArt object. |
| TEXT_RING_OUTSIDE | Ring outside, WordArt object. |
| TEXT_ARCH_UP_CURVE | Arch up curve, WordArt object. |
| TEXT_ARCH_DOWN_CURVE | Arch down curve, WordArt object. |
| TEXT_CIRCLE_CURVE | Circle curve, WordArt object. |
| TEXT_BUTTON_CURVE | Button curve, WordArt object. |
| TEXT_ARCH_UP_POUR | Arch up pour, WordArt object. |
| TEXT_ARCH_DOWN_POUR | Arch down pour, WordArt object. |
| TEXT_CIRCLE_POUR | Circle pour, WordArt object. |
| TEXT_BUTTON_POUR | Button pour, WordArt object. |
| TEXT_CURVE_UP | Curve up, WordArt object. |
| TEXT_CURVE_DOWN | Curve down, WordArt object. |
| TEXT_CASCADE_UP | Cascade up, WordArt object. |
| TEXT_CASCADE_DOWN | Cascade down, WordArt object. |
| TEXT_WAVE1 | Wave 1, WordArt object. |
| TEXT_WAVE2 | Wave 2, WordArt object. |
| TEXT_WAVE3 | Wave 3, WordArt object. |
| TEXT_WAVE4 | Wave 4, WordArt object. |
| TEXT_INFLATE | Inflate, WordArt object. |
| TEXT_DEFLATE | Deflate, WordArt object. |
| TEXT_INFLATE_BOTTOM | Inflate bottom, WordArt object. |
| TEXT_DEFLATE_BOTTOM | Deflate bottom, WordArt object. |
| TEXT_INFLATE_TOP | Inflate top, WordArt object. |
| TEXT_DEFLATE_TOP | Deflate top, WordArt object. |
| TEXT_DEFLATE_INFLATE | Deflate inflate, WordArt object. |
| TEXT_DEFLATE_INFLATE_DEFLATE | Deflate inflate deflate, WordArt object. |
| TEXT_FADE_RIGHT | Fade right, WordArt object. |
| TEXT_FADE_LEFT | Fade left, WordArt object. |
| TEXT_FADE_UP | Fade up, WordArt object. |
| TEXT_FADE_DOWN | Fade down, WordArt object. |
| TEXT_SLANT_UP | Slant up, WordArt object. |
| TEXT_SLANT_DOWN | Slant down, WordArt object. |
| TEXT_CAN_UP | Can up, WordArt object. |
| TEXT_CAN_DOWN | Can down, WordArt object. |
| FLOW_CHART_ALTERNATE_PROCESS | Flow chart alternate process. |
| FLOW_CHART_OFFPAGE_CONNECTOR | Flow chart off page connector. |
| CALLOUT90 | Callout 90. |
| ACCENT_CALLOUT90 | Accent callout 90. |
| BORDER_CALLOUT90 | Border callout 90. |
| ACCENT_BORDER_CALLOUT90 | Accent border callout 90. |
| LEFT_RIGHT_UP_ARROW | Left right up arrow. |
| SUN | Sun. |
| MOON | Moon. |
| BRACKET_PAIR | Bracket pair. |
| BRACE_PAIR | Brace pair |
| SEAL4 | Four-pointed star. |
| DOUBLE_WAVE | Double wave. |
| ACTION_BUTTON_BLANK | Action button blank. |
| ACTION_BUTTON_HOME | Action button home. |
| ACTION_BUTTON_HELP | Action button help. |
| ACTION_BUTTON_INFORMATION | Action button information. |
| ACTION_BUTTON_FORWARD_NEXT | Action button forward next. |
| ACTION_BUTTON_BACK_PREVIOUS | Action button back previous. |
| ACTION_BUTTON_END | Action button end. |
| ACTION_BUTTON_BEGINNING | Action button beginning. |
| ACTION_BUTTON_RETURN | Action button return. |
| ACTION_BUTTON_DOCUMENT | Action button document. |
| ACTION_BUTTON_SOUND | Action button sound. |
| ACTION_BUTTON_MOVIE | Action button movie. |
| SINGLE_CORNER_SNIPPED | Snip single corner rectangle object. |
| TOP_CORNERS_SNIPPED | Snip same side corner rectangle. |
| DIAGONAL_CORNERS_SNIPPED | Snip diagonal corner rectangle. |
| TOP_CORNERS_ONE_ROUNDED_ONE_SNIPPED | Snip and round single corner rectangle. |
| SINGLE_CORNER_ROUNDED | Round single corner rectangle. |
| TOP_CORNERS_ROUNDED | Round same side corner rectangle. |
| DIAGONAL_CORNERS_ROUNDED | Round diagonal corner rectangle. |
| HEPTAGON | Heptagon. |
| CLOUD | Cloud. |
| SEAL6 | Six-pointed star. |
| SEAL7 | Seven-pointed star. |
| SEAL10 | Ten-pointed star. |
| SEAL12 | Twelve-pointed star. |
| SWOOSH_ARROW | Swoosh arrow. |
| TEARDROP | Teardrop. |
| SQUARE_TABS | Square tabs. |
| PLAQUE_TABS | Plaque tabs. |
| PIE | Pie. |
| WEDGE_PIE | Wedge pie. |
| INVERSE_LINE | Inverse line. |
| MATH_PLUS | Math plus. |
| MATH_MINUS | Math minus. |
| MATH_MULTIPLY | Math multiply. |
| MATH_DIVIDE | Math divide. |
| MATH_EQUAL | Math equal. |
| MATH_NOT_EQUAL | Math not equal. |
| NON_ISOSCELES_TRAPEZOID | Non-isosceles trapezoid. |
| LEFT_RIGHT_CIRCULAR_ARROW | Left-right circular arrow. |
| LEFT_RIGHT_RIBBON | Left-right ribbon. |
| LEFT_CIRCULAR_ARROW | Left circular arrow. |
| FRAME | Frame. |
| HALF_FRAME | Half frame. |
| FUNNEL | Funnel. |
| GEAR6 | Six-tooth gear. |
| GEAR9 | Nine-tooth gear. |
| DECAGON | Decagon. |
| DODECAGON | Dodecagon. |
| DIAGONAL_STRIPE | Diagonal stripe. |
| CORNER | Corner. |
| CORNER_TABS | Corner tabs. |
| CHORD | Chord. |
| CHART_PLUS | Chart plus. |
| CHART_STAR | Chart star. |
| CHART_X | Chart X. |
| MIN_VALUE | Reserved for the system use. |
Examples
Shows how to insert a shape with an image from the local file system into a document.
doc = aw.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.
shape = aw.drawing.Shape(doc, aw.drawing.ShapeType.IMAGE)
shape.image_data.set_image(file_name=IMAGE_DIR + 'Windows MetaFile.wmf')
shape.width = 100
shape.height = 100
doc.first_section.body.first_paragraph.append_child(shape)
doc.save(file_name=ARTIFACTS_DIR + 'Image.FromFile.docx')
Shows how Aspose.Words identify shapes.
doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
builder.insert_shape(shape_type=aw.drawing.ShapeType.HEPTAGON, horz_pos=aw.drawing.RelativeHorizontalPosition.PAGE, left=0, vert_pos=aw.drawing.RelativeVerticalPosition.PAGE, top=0, width=0, height=0, wrap_type=aw.drawing.WrapType.NONE)
builder.insert_shape(shape_type=aw.drawing.ShapeType.CLOUD, horz_pos=aw.drawing.RelativeHorizontalPosition.RIGHT_MARGIN, left=0, vert_pos=aw.drawing.RelativeVerticalPosition.PAGE, top=0, width=0, height=0, wrap_type=aw.drawing.WrapType.NONE)
builder.insert_shape(shape_type=aw.drawing.ShapeType.MATH_PLUS, horz_pos=aw.drawing.RelativeHorizontalPosition.RIGHT_MARGIN, left=0, vert_pos=aw.drawing.RelativeVerticalPosition.PAGE, top=0, width=0, height=0, wrap_type=aw.drawing.WrapType.NONE)
# To correct identify shape types you need to work with shapes as DML.
save_options = aw.saving.OoxmlSaveOptions(aw.SaveFormat.DOCX)
# "Strict" or "Transitional" compliance allows to save shape as DML.
save_options.compliance = aw.saving.OoxmlCompliance.ISO29500_2008_TRANSITIONAL
doc.save(file_name=ARTIFACTS_DIR + 'Shape.ShapeTypes.docx', save_options=save_options)
doc = aw.Document(file_name=ARTIFACTS_DIR + 'Shape.ShapeTypes.docx')
shapes = list(filter(lambda a: a is not None, map(lambda b: system_helper.linq.Enumerable.of_type(lambda x: x.as_shape(), b), list(doc.get_child_nodes(aw.NodeType.SHAPE, True)))))
for shape in shapes:
print(shape.shape_type)
See Also
- module aspose.words.drawing
- property ShapeBase.shape_type