* @return An instance of {@link EntityBlockResult}, or <code>null</code>.
*/
public Object draw(final GC g2, final Rectangle area, final Object params) {
// draw the block without collecting entities
super.draw(g2, area, null);
EntityBlockParams ebp = null;
final BlockResult r = new BlockResult();
if (params instanceof EntityBlockParams) {
ebp = (EntityBlockParams) params;
if (ebp.getGenerateEntities()) {
final EntityCollection ec = new StandardEntityCollection();
final LegendItemEntity entity = new LegendItemEntity(
new Rectangle(area.x, area.y, area.width, area.height));
entity.setSeriesIndex(this.series);
entity.setSeriesKey(this.seriesKey);