Hi, i have come up with a strange Indesign behaviour.
Iam working on InDesign CS4.Iam using IsSplineShape(const UIDRef& itemUIDRef, PMString& shape) const function for getting the type of shape of the polygon, placed on the page of a document.
code snippet of this function is as follows:
bool16 SUIPanelObserver::IsSplineShape(const UIDRef& itemUIDRef, PMString& shape) const
bool16 result = kFalse;
if (pathGeometry != nil)
result = kTrue;
PMPageItemType pathType = Utils<IPathUtils>()->WhichKindOfPageItem(pathGeometry);
shape = "Line";
shape = "Rectangle";
shape = "Circle";
shape = "Oval";
shape = "RegularPoly";
shape = "IrregularPoly";
shape = "Square";
shape = "Unknown";
The problem is that, inspite of returning shape of a polygon as RegularPoly or IrregularPoly, it is actually returning Unknown shape.
Also,i have tried both functions:
In each case it returns me kFalse, means,the shape in neither a RegularPolygon nor a IrregularPolygon.
Is that because of multiple closed path in the shape? because any polygon is drawn under a bound box and hence we will not get single closed path.
Are your test objects always combined paths? It might be very simple: two paths in one object is neither "a regular polygon" nor "an irregular polygon", because there are *two* shapes in that object. Looking at the list of available tests, neither one of them mentions the object can have more than a single path.
Try it on singular path objects and see if it works correct.
Iam drawing a regular polygon(object with single path) with InDesign tool.
But when i used the above IsSplineShape function, it returns "Unknown".
Even for the singular path objects, it is not working correctly!!
Europe, Middle East and Africa