In below sample code i want to change a tip for RectangularCallout but it is not working
how to change a tip point for this shape
Shape polygonShape = worksheet.Shapes.AddAutoShape(AutoShapeType.RectangularCallout, 0, 0, 0, 0, 0, 0);
polygonShape.Placement = PlacementType.MoveAndSize; //Set the placement type as the Shapes will move and resize with cells.
polygonShape.X = (int)((xx1 + chartX)); //Shape Left properties
polygonShape.Y = (int)(Top + chartYPosition); //Shape Top properties
polygonShape.WidthPt = chartWidth * InPoints; // Shape Width
polygonShape.HeightPt = (((double.Parse(taskHeight) * InPoints) / (double.Parse(rowHeight.ToString()) * InPoints)) * rowHightMain); // Shape Height
if (polygonTextSize > 0)
{
polygonTextSize = (polygonTextSize < 1) ? 1 : polygonTextSize;
// Set the shape's text
polygonShape.Text = fnote;
// Apply uniform font size and color
foreach (TextParagraph para in polygonShape.TextBody.TextParagraphs)
{
para.Font.Name = "Meiryo UI";
para.Font.DoubleSize = (polygonTextSize * InPoints);
//para.Font.Name = fontFamily;
//para.Font.DoubleSize = polygonTextSize;
para.Font.Color = ColorTranslator.FromOle(ffontcolor); // Set the font color
}
}
// Set the text wrap mode
polygonShape.IsTextWrapped = false;
// Set outside width text which is not visible
polygonShape.TextHorizontalOverflow = TextOverflowType.Clip;
polygonShape.TextVerticalOverflow = TextOverflowType.Clip;
polygonShape.Fill.FillType = FillType.Solid; //Set the polygon fill type
polygonShape.Fill.SolidFill.Color = ColorTranslator.FromOle(polygonColor); //Set the polygon fill color
polygonShape.Line.FillType = FillType.Solid; //Set the polygon fill type
polygonShape.Line.SolidFill.Color = ColorTranslator.FromOle(fframecolor); // Set the polygon line color
SetCommentShapeAlignment(polygonShape, ftextalign, ftextleftright, ftextuprlwr, InPoints);
if (fbackstyle == "1")
{
polygonShape.Fill.FillType = FillType.None;
//polygonShape.Fill.FillType = FillType.None;
}
if (fframestyle_bor == "1")
{
//polygonShape.Line.Transparency = 1.0F;
polygonShape.Line.FillType = FillType.None;
}
// Calculate X adjustment (same logic as Interop)
double fpointday_px = (long.Parse(fpointday) - printStartDate) * fx;
double assignment_X_Value = 1 / chartWidth;
double diff_fpoint_to_task = fpointday_px - chartX;
double actual_position_x = diff_fpoint_to_task * assignment_X_Value;
actual_position_x = actual_position_x + (-0.5);
// Calculate Y adjustment (same logic as Interop)
double YLinkTipPosition = (Top + chartYlinktip);
double diff_px = YLinkTipPosition - polygonShape.Y;
double assignment_Y_Value = 1.0 / polygonShape.Height;
double actual_position_y = diff_px * assignment_Y_Value;
actual_position_y = actual_position_y + (-0.5);
// Get the shape's geometry adjustment guides
ShapeGuideCollection shapeGuides = polygonShape.Geometry.ShapeAdjustValues;
// Apply adjustments (Aspose uses "adj1", "adj2", etc.)
shapeGuides.Clear(); // Clear existing adjustments (if any)
shapeGuides.Add("adj1", actual_position_x); // X position adjustment
shapeGuides.Add("adj2", actual_position_y); // Y position adjustment
// Optional: Add more adjustments if needed (e.g., for connectors)
shapeGuides.Add("adj3", 0.16667d); // Example for a 3rd adjustment