[CS4] Custom PageItem creating
I want to create a line pageitem not using PathUtils.
In brief:
I created a command kNewPageItemCmdBoss and set up INewPageItemCmdData for it:
createCommandData->Set(database, kMyOwnNewPageItemBoss, INewPageItemCmdData::kDefaultGraphicAttributes, parentUID, linePMPointList);
linePMPointList defined, for example, as follows:
PMPointList listPoints;
listPoints.push_back(PMPoint());
listPoints.push_back(PMPoint(PMReal(150.0), PMReal(300.0)));
in *.fr
Class
{
kMyOwnNewPageItemBoss,
kSplineItemBoss,
{
}
}
As a result I get an object without width and height (point-like, invisible, but selectable) with the properly UID.
Question: Where and what to add that as a result to get the line?
There are several methods in the PathUtils (like CreateLineSpline, CreateOvalSpline, etc.), but all the difference is in the name of a method...
Most important is to create a line with a boss inherited from kSplineItemBoss, but CreateLineSpline method of PathUtils does not allow a specific class except kSplineItemBoss...
Thanks a lot for help in advance,
Viacheslav