Free Support Forum - aspose.com

Brace & Bracket

Hi Aleksey!

Please check "Right\Left Brace & Bracket, Double Brace & Bracket". They are drawing closed in Graphics Path.

Not only them. Some autoshapes consist of several paths, some of them define shape’s outline and other define filling area. Choose some fill for these shapes and you will see same closed paths in PowerPoint.

Hi, NKuzmin

How to determine what path for filling area , and what path for shape's outline?

Sorry CAV, currently you can’t.
I hope next release will have more covinient way to obtain shape’s elements, including shadows and 3D with all needed properties.

Please, develop detailed help for GraphicsPath. We need to know correspondences between GraphicsPaths and Autoshapes.

Nikolay is working with enhancing Paths properties. It will be available in a few days. It will support 3D, shadows and normal 2D drawing. Also it will contain line and fill styles for each GraphicsPath in the collection.

Now it’s difficult to tell about correspondences for each autoshape because they are very different.
Brackets have 2 GraphicsPath objects. The first one (closed) used to fill bracket shape and the second one (opened) used to draw bracket border.

Hello Alexey!

Do you have an update on when the new version will be ready?

Thanks,

Alex

New hot fix will be available in 2-3 hours. I’m preparing it now.

Small explanation how to use new feature.
At first, it works for all shapes except PictureFrame and TextFrame.

For each shape Shape.CreateShapeElements function should be called.
It returns array of ShapeElement objects. ShapeElement is a object which
contains GraphicsPath, Brush and Pen used to draw part of shape.

That is short example how to use it:

Graphics gr = …;
Shape sh = …;
ShapeElement[] she = sh.CreateShapeElements();
for (int i = 0; i < she.Length; i++)
{
Brush brush = she[ i ].CreateBrush();
if (brush != null) {
gr.FillPath(brush, she[ i ].GraphicsPath);
brush.Dispose();
}
Pen pen = she[ i ].CreatePen();
if (pen != null) {
gr.DrawPath(pen, she[ i ].GraphicsPath);
pen.Dispose();
}
}