private bool getLineRegionForControl(String sKeyPaintObj,
out cReportSectionLine rptSecLine,
bool isFreeCtrl)
{
cReportSection rptSection = null;
rptSecLine = null;
if (!getRegionForControl(sKeyPaintObj, out rptSection, isFreeCtrl)) { return false; }
float w1 = 0;
float w2 = 0;
float y = 0;
cReportSectionLine rtnSecLine = null;
cReportAspect w_aspect = m_paint.getPaintObject(sKeyPaintObj).getAspect();
if (isFreeCtrl) {
y = w_aspect.getTop() + w_aspect.getOffset();
}
else {
y = w_aspect.getTop() + w_aspect.getHeight() / 2 + w_aspect.getOffset();
}
for (int _i = 0; _i < rptSection.getSectionLines().count(); _i++) {
cReportSectionLine rptSL = rptSection.getSectionLines().item(_i);
w_aspect = rptSL.getAspect();
w1 = w_aspect.getTop();
w2 = w_aspect.getTop() + w_aspect.getHeight();
if (isFreeCtrl) {
if (w1 <= y) {
rtnSecLine = rptSL;
}
}
else {
if (w1 <= y && w2 >= y) { return false; }
}
}
if (rtnSecLine != null) {
rptSecLine = rtnSecLine;
return true;
}
else {
return false;
}
}