last works ...
This commit is contained in:
@@ -430,6 +430,10 @@ class XCPOIDrawer : public XCBase
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
if (draws == NULL)
|
||||
{
|
||||
draws = new CArrayObj();
|
||||
}
|
||||
draws.Clear();
|
||||
|
||||
//
|
||||
@@ -617,6 +621,63 @@ class XCPOIDrawer : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a Collection of Boxes ...
|
||||
*
|
||||
* @param boxes: reference collection to Provide Boxes ...
|
||||
* @param objects: reference pointer to holds drawn Objects ...
|
||||
* @param ignoreAt: bool, ignore Box At Drawn ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int DrawBoxes(
|
||||
XBoxZone &boxes[],
|
||||
CArrayObj *&objects,
|
||||
bool ignoreAt = true //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
objects = new CArrayObj();
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
if (!HasChild(boxes))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool has = false;
|
||||
XCBoxObject *iObj;
|
||||
int count = ArraySize(boxes);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = DrawBox(
|
||||
boxes[i],
|
||||
iObj,
|
||||
ignoreAt //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
objects.Add(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
|
||||
//
|
||||
result = objects.Total();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw Specified Signal ...
|
||||
*
|
||||
@@ -1073,6 +1134,37 @@ class XCPOIDrawer : public XCBase
|
||||
object.BoxStyle(style.style);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to a Collection on Drawn Boxes ...
|
||||
*
|
||||
* @param objects: pointer reference of Objects ...
|
||||
* @param style: XPOIStyle, Specifed Style to Apply ...
|
||||
*/
|
||||
void ApplyBoxesStyle(
|
||||
CArrayObj *&objects,
|
||||
XPOIStyle &style //
|
||||
)
|
||||
{
|
||||
//
|
||||
// Validate ...
|
||||
if (objects == NULL || objects.Total() <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < objects.Total(); i++)
|
||||
{
|
||||
//
|
||||
XCBoxObject *iObj = ((XCBoxObject *)objects.At(i));
|
||||
ApplyBoxStyle(
|
||||
iObj,
|
||||
style //
|
||||
);
|
||||
ZeroMemory(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user