public bool drawRule(String key, Graphics graph) { const int LINE_COLOR = 0xcc6600; int top = 0; float heightSec = 0; cReportAspect aspect = null; aspect = new cReportAspect(); cReportPaintObject w_item = m_paintSections.item(key); heightSec = w_item.getHeightSecLine() * 0.5f; cReportAspect w_aspect = w_item.getAspect(); aspect.setTop(w_aspect.getTop() + 3 - heightSec); aspect.setOffset(w_aspect.getOffset()); aspect.setTransparent(true); aspect.setLeft(0); aspect.setHeight(20); aspect.setAlign(HorizontalAlignment.Right); aspect.setWidth(graph.ClipBounds.Width - 1); if (w_item.getTextLine() != "") { top = - Convert.ToInt32(w_item.getHeightSec()); w_aspect = w_item.getAspect(); top += Convert.ToInt32(w_aspect.getTop() - w_aspect.getOffset() - 6 + w_aspect.getHeight() * 2); printLine(graph, true, 0, top, aspect.getWidth(), top, LINE_COLOR, 1, true, LINE_COLOR, false); // last section line // printText(graph, w_item.getTextLine(), aspect, w_item.getImage()); heightSec = w_item.getHeightSec() * 0.5f; // print section's name // w_aspect = m_paintSections.item(key).getAspect(); aspect.setTop(w_aspect.getTop() - heightSec); aspect.setAlign(HorizontalAlignment.Left); printText(graph, w_item.getText(), aspect, w_item.getImage()); } else { top = Convert.ToInt32(aspect.getTop() - aspect.getOffset() - heightSec + w_item.getAspect().getHeight()); if (w_item.getIsSection()) { printLine(graph, true, 0, top, aspect.getWidth(), top, LINE_COLOR, 1, true, LINE_COLOR, false); } // every section line except the last one // printText(graph, w_item.getText(), aspect, w_item.getImage()); } if (w_item == m_paintSections.item(m_paintSections.count() - 1)) { top = Convert.ToInt32(aspect.getTop() + w_item.getHeightSecLine() - heightSec - aspect.getOffset() + 6); if (w_item.getIsSection()) { printLine(graph, true, 0, top, aspect.getWidth(), top, LINE_COLOR, 1, true, LINE_COLOR, false); } } return true; }