Arc cap type not working

I have two issues that revolve around arcs as shown in the attached spreadsheet and using this code.


Workbook wb = new Workbook(@“c:\temp\Arc Test.xlsx”);
Worksheet ws = wb.Worksheets[0];
Shape arc = ws.Shapes[“Arc 1”];

PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;

wb.Save(@“c:\temp\ArcTest.pdf”, opts);

1. If the cap type of the line is set to round (as in the spreadsheet) and then save the spreadsheet as PDF, it still displays the arc with square ends.

2. I’m attempting to make shape adjustments to the arc. If I set the value to 108 as shown below, it sets the arc to be about a full semi circle. My issue is that I don’t understand what this value corresponds to. I would assume that a value of 180 should correspond to a full semi-circle (like they do in Excel). Can you please explain these to me?

arc.Geometry.ShapeAdjustValues[0].Value = 108
Hi,

Thanks for your posting and using Aspose.Cells.

sgoldgeier:
1. If the cap type of the line is set to round (as in the spreadsheet) and then save the spreadsheet as PDF, it still displays the arc with square ends.

We were able to observe this issue as per your description and logged it in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44720 - Arc ends are square not round in the output pdf

sgoldgeier:
2. I'm attempting to make shape adjustments to the arc. If I set the value to 108 as shown below, it sets the arc to be about a full semi circle. My issue is that I don't understand what this value corresponds to. I would assume that a value of 180 should correspond to a full semi-circle (like they do in Excel). Can you please explain these to me?

arc.Geometry.ShapeAdjustValues[0].Value = 108

We will look into this issue further and update you asap.

Hi again,


Please try the scenario against the latest version of Aspose.Cells for .NET 9.0.7. Please also use the following snippet to adjust the values.

C#

shape.Geometry.ShapeAdjustValues[0].Value = GetAngle(0);
shape.Geometry.ShapeAdjustValues[1].Value = GetAngle(270);
private static double GetAngle(double val)
{
//angle = val / 216d * 360;
return val * 216d / 360;
}

The issues you have found earlier (filed as CELLSNET-44720) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.