ShapeRawFrame Property

Returns or sets the raw shape frame's properties. Read/write IShapeFrame.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: (20.3)
public IShapeFrame RawFrame { get; set; }

Property Value

Type: IShapeFrame


Code that attempts to assign undefined frame to IShape.Frame doesn't make sence in general case (particulary in case when parent GroupShape is multiple nested into other GroupShape-s). For example: {code}IShape shape = ...; shape.Frame = new ShapeFrame(float.NaN, float.NaN, float.NaN, float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, float.NaN);{code} or {code}slide.Shapes.AddAutoShape(ShapeType.RoundCornerRectangle, float.NaN, float.NaN, float.NaN, float.NaN);{code} Such code can lead to unclear situations. So restrictions had been added for using undefined values for IShape.Frame. Values of x, y, width, height, flipH, flipV and rotationAngle must be defined (not float.NaN or NullableBool.NotDefined). Example code above now throws ArgumentException exception. This applies to these use cases: {code}IShape shape = ...; shape.Frame = ...; // cannot be undefined IShapeCollection shapes = ...; // x, y, width, height parameters cannot be float.NaN: { shapes.AddAudioFrameCD(...); shapes.AddAudioFrameEmbedded(...); shapes.AddAudioFrameLinked(...); shapes.AddAutoShape(...); shapes.AddChart(...); shapes.AddConnector(...); shapes.AddOleObjectFrame(...); shapes.AddPictureFrame(...); shapes.AddSmartArt(...); shapes.AddTable(...); shapes.AddVideoFrame(...); shapes.InsertAudioFrameEmbedded(...); shapes.InsertAudioFrameLinked(...); shapes.InsertAutoShape(...); shapes.InsertChart(...); shapes.InsertConnector(...); shapes.InsertOleObjectFrame(...); shapes.InsertPictureFrame(...); shapes.InsertTable(...); shapes.InsertVideoFrame(...); }{code} But IShape.RawFrame frame properties can be undefined. This make sence when shape is linked to placeholder. Then undefined shape frame values is overridden from the parent placeholder shape. If there is no parent placeholder shape for that shape then that shape uses default values when it evaluates effective frame based on its IShape.RawFrame. Default values are 0 and NullableBool.False for x, y, width, height, flipH, flipV and rotationAngle. For example: {code}IShape shape = ...; // shape is linked to placeholder shape.RawFrame = new ShapeFrame(float.NaN, float.NaN, 100, float.NaN, NullableBool.NotDefined, NullableBool.NotDefined, 0); // now shape inherits x, y, height, flipH, flipV values form placeholder and overrides width=100 and rotationAngle=0.{code}
See Also