Program: 70019
Project: 70019
Buggy source:
/** 
 * Ths background is the first component rendered within the plot block. This is rendered with Z-order=0
 */
protected void renderBackground(IPrimitiveRenderer ipr,Plot p) throws ChartException {
  super.renderBackground(ipr,p);
  final ChartWithAxes cwa=(ChartWithAxes)getModel();
  final PlotWithAxes pwa=(PlotWithAxes)getComputations();
  final ClientArea ca=p.getClientArea();
  if (!ca.isVisible()) {
    return;
  }
  Bounds bo=pwa.getPlotBounds();
  final RectangleRenderEvent rre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),RectangleRenderEvent.class);
  if (!isDimension3D()) {
    if (ca.getShadowColor() != null) {
      rre.setBounds(goFactory.translateBounds(bo,3,3));
      rre.setBackground(ca.getShadowColor());
      ipr.fillRectangle(rre);
    }
    rre.setBounds(bo);
    rre.setOutline(ca.getOutline());
    rre.setBackground(ca.getBackground());
    ipr.fillRectangle(rre);
  }
  double dSeriesThickness=pwa.getSeriesThickness();
  double[] daX={bo.getLeft() - dSeriesThickness,bo.getLeft() + bo.getWidth() - dSeriesThickness};
  double[] daY={bo.getTop() + bo.getHeight() + dSeriesThickness,bo.getTop() + dSeriesThickness};
  final AllAxes aax=pwa.getAxes();
  AutoScale scPrimaryBase=null;
  AutoScale scPrimaryOrthogonal=null;
  AutoScale scAncillaryBase=null;
  double dXStart=0;
  double dYStart=0;
  double dZStart=0;
  double dXEnd=0;
  double dYEnd=0;
  double dZEnd=0;
  int baseTickCount=0;
  int ancillaryTickCount=0;
  int orthogonalTickCount=0;
  double xStep=0;
  double yStep=0;
  double zStep=0;
  if (isDimension3D()) {
    scPrimaryBase=aax.getPrimaryBase().getScale();
    scPrimaryOrthogonal=aax.getPrimaryOrthogonal().getScale();
    scAncillaryBase=aax.getAncillaryBase().getScale();
    dXStart=scPrimaryBase.getStart();
    dYStart=scPrimaryOrthogonal.getStart();
    dZStart=scAncillaryBase.getStart();
    dXEnd=scPrimaryBase.getEnd();
    dYEnd=scPrimaryOrthogonal.getEnd();
    dZEnd=scAncillaryBase.getEnd();
    baseTickCount=scPrimaryBase.getTickCordinates().size();
    ancillaryTickCount=scAncillaryBase.getTickCordinates().size();
    orthogonalTickCount=scPrimaryOrthogonal.getTickCordinates().size();
    xStep=scPrimaryBase.getUnitSize();
    yStep=scPrimaryOrthogonal.getUnitSize();
    zStep=scAncillaryBase.getUnitSize();
  }
  if (pwa.getDimension() == IConstants.TWO_5_D) {
    Location[] loa=null;
    if (cwa.getWallFill() == null) {
      renderPlane(ipr,StructureSource.createPlot(p),new Location[]{goFactory.createLocation(daX[0],daY[0]),goFactory.createLocation(daX[0],daY[1])},ca.getBackground(),ca.getOutline(),cwa.getDimension(),dSeriesThickness,false);
    }
 else {
      loa=new Location[4];
      loa[0]=goFactory.createLocation(daX[0],daY[0]);
      loa[1]=goFactory.createLocation(daX[0],daY[1]);
      loa[2]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[1] - dSeriesThickness);
      loa[3]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[0] - dSeriesThickness);
      final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),PolygonRenderEvent.class);
      pre.setPoints(loa);
      pre.setBackground(cwa.getWallFill());
      pre.setOutline(ca.getOutline());
      ipr.fillPolygon(pre);
      ipr.drawPolygon(pre);
    }
    if (cwa.getFloorFill() == null) {
      renderPlane(ipr,StructureSource.createPlot(p),new Location[]{goFactory.createLocation(daX[0],daY[0]),goFactory.createLocation(daX[1],daY[0])},ca.getBackground(),ca.getOutline(),cwa.getDimension(),dSeriesThickness,false);
    }
 else {
      if (loa == null) {
        loa=new Location[4];
      }
      loa[0]=goFactory.createLocation(daX[0],daY[0]);
      loa[1]=goFactory.createLocation(daX[1],daY[0]);
      loa[2]=goFactory.createLocation(daX[1] + dSeriesThickness,daY[0] - dSeriesThickness);
      loa[3]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[0] - dSeriesThickness);
      final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),PolygonRenderEvent.class);
      pre.setPoints(loa);
      pre.setBackground(cwa.getFloorFill());
      pre.setOutline(ca.getOutline());
      ipr.fillPolygon(pre);
      ipr.drawPolygon(pre);
    }
  }
 else   if (pwa.getDimension() == IConstants.THREE_D) {
    Location3D[] loa=null;
    final Polygon3DRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Polygon3DRenderEvent.class);
    pre.setDoubleSided(true);
    loa=new Location3D[4];
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXStart,dYEnd,dZStart);
    loa[2]=goFactory.createLocation3D(dXStart,dYEnd,dZEnd);
    loa[3]=goFactory.createLocation3D(dXStart,dYStart,dZEnd);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getWallFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    Object event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dLeftWall=Engine3D.getObjectFromEvent(event_new);
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXEnd,dYStart,dZStart);
    loa[2]=goFactory.createLocation3D(dXEnd,dYEnd,dZStart);
    loa[3]=goFactory.createLocation3D(dXStart,dYEnd,dZStart);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getWallFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dRightWall=Engine3D.getObjectFromEvent(event_new);
    if ((cwa.getWallFill() instanceof ColorDefinition && ((ColorDefinition)cwa.getWallFill()).getTransparency() > 0) || (!(cwa.getWallFill() instanceof ColorDefinition) && cwa.getWallFill() != null)) {
      leftWallFill=true;
      rightWallFill=true;
    }
    if (loa == null) {
      loa=new Location3D[4];
    }
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXStart,dYStart,dZEnd);
    loa[2]=goFactory.createLocation3D(dXEnd,dYStart,dZEnd);
    loa[3]=goFactory.createLocation3D(dXEnd,dYStart,dZStart);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getFloorFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dFloor=Engine3D.getObjectFromEvent(event_new);
    if ((cwa.getFloorFill() instanceof ColorDefinition && ((ColorDefinition)cwa.getFloorFill()).getTransparency() > 0) || (!(cwa.getFloorFill() instanceof ColorDefinition) && cwa.getFloorFill() != null)) {
      floorFill=true;
    }
  }
  final OneAxis[] oaxa=new OneAxis[2 + aax.getOverlayCount() + (aax.getAncillaryBase() != null ? 1 : 0)];
  oaxa[0]=aax.getPrimaryBase();
  oaxa[1]=aax.getPrimaryOrthogonal();
  for (int i=0; i < aax.getOverlayCount(); i++) {
    oaxa[2 + i]=aax.getOverlay(i);
  }
  if (aax.getAncillaryBase() != null) {
    oaxa[2 + aax.getOverlayCount()]=aax.getAncillaryBase();
  }
  renderMarkerRanges(oaxa,bo);
  renderMarkerLines(oaxa,bo);
  double x=0, y=0, vnext=0;
  LineAttributes lia;
  LineRenderEvent lre;
  final Insets insCA=aax.getInsets();
  int iCount;
  Grid g;
  double[] doaMinor=null;
  for (int i=0; i < oaxa.length; i++) {
    g=oaxa[i].getGrid();
    iCount=g.getMinorCountPerMajor();
    lia=oaxa[i].getGrid().getLineAttributes(IConstants.MINOR);
    if (lia == null || !lia.isSetStyle() || !lia.isVisible()) {
      continue;
    }
    if (iCount <= 0) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{Integer.valueOf(iCount)},Messages.getResourceBundle(getRunTimeContext().getULocale()));
    }
    AutoScale sc=oaxa[i].getScale();
    doaMinor=sc.getMinorCoordinates(iCount);
    if (isDimension3D()) {
      Line3DRenderEvent lre3d=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Line3DRenderEvent.class);
      lre3d.setLineAttributes(lia);
switch (oaxa[i].getAxisType()) {
case IConstants.BASE_AXIS:
        AxisTickCoordinates xa=scPrimaryBase.getTickCordinates();
      if (floorFill) {
        for (int k=0; k < xa.size() - 1; k++) {
          for (int j=0; j < doaMinor.length - 1; j++) {
            if (ChartUtil.mathGE(xa.getCoordinate(k) + doaMinor[j],xa.getCoordinate(k + 1))) {
              continue;
            }
            lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart));
            lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart + (ancillaryTickCount - 1) * zStep));
            lre3d.setObject3DParent(o3dFloor);
            getDeferredCache().addLine(lre3d);
          }
        }
      }
    if (rightWallFill) {
      for (int k=0; k < xa.size() - 1; k++) {
        for (int j=0; j < doaMinor.length - 1; j++) {
          if (ChartUtil.mathGE(xa.getCoordinate(k) + doaMinor[j],xa.getCoordinate(k + 1))) {
            continue;
          }
          lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart));
          lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart + (orthogonalTickCount - 1) * yStep,dZStart));
          lre3d.setObject3DParent(o3dRightWall);
          getDeferredCache().addLine(lre3d);
        }
      }
    }
  break;
case IConstants.ORTHOGONAL_AXIS:
AxisTickCoordinates ya=scPrimaryOrthogonal.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < ya.size() - 1; k++) {
  for (int j=0; j < doaMinor.length - 1; j++) {
    if (ChartUtil.mathGE(ya.getCoordinate(k) + doaMinor[j],ya.getCoordinate(k + 1))) {
      continue;
    }
    lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart));
    lre3d.setEnd3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart + (ancillaryTickCount - 1) * zStep));
    lre3d.setObject3DParent(o3dLeftWall);
    getDeferredCache().addLine(lre3d);
  }
}
}
if (rightWallFill) {
for (int k=0; k < ya.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
  if (ChartUtil.mathGE(ya.getCoordinate(k) + doaMinor[j],ya.getCoordinate(k + 1))) {
    continue;
  }
  lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart));
  lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,ya.getCoordinate(k) + doaMinor[j],dZStart));
  lre3d.setObject3DParent(o3dRightWall);
  getDeferredCache().addLine(lre3d);
}
}
}
break;
case IConstants.ANCILLARY_AXIS:
AxisTickCoordinates za=scAncillaryBase.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < za.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
if (ChartUtil.mathGE(za.getCoordinate(k) + doaMinor[j],za.getCoordinate(k + 1))) {
continue;
}
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,dYStart + (orthogonalTickCount - 1) * yStep,za.getCoordinate(k) + doaMinor[j]));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
}
if (floorFill) {
for (int k=0; k < za.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
if (ChartUtil.mathGE(za.getCoordinate(k) + doaMinor[j],za.getCoordinate(k + 1))) {
continue;
}
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
}
break;
default :
break;
}
}
 else if (oaxa[i].getOrientation() == IConstants.HORIZONTAL) {
int iDirection=sc.getDirection() == IConstants.BACKWARD ? -1 : 1;
AxisTickCoordinates da=sc.getTickCordinates();
double dY2=bo.getTop() + 1, dY1=bo.getTop() + bo.getHeight() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
x=da.getCoordinate(j);
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(x + doaMinor[k],da.getCoordinate(j + 1))) || (iDirection == -1 && ChartUtil.mathLE(x - doaMinor[k],da.getCoordinate(j + 1)))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x + iDirection * doaMinor[k],dY1 + pwa.getSeriesThickness()));
lre.setEnd(goFactory.createLocation(x + iDirection * doaMinor[k] + pwa.getSeriesThickness(),dY1));
ipr.drawLine(lre);
}
}
}
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
x=da.getCoordinate(j);
vnext=da.getCoordinate(j + 1);
if (pwa.getDimension() == IConstants.TWO_5_D) {
x+=pwa.getSeriesThickness();
vnext+=pwa.getSeriesThickness();
}
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(x + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(x - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x + iDirection * doaMinor[k],dY1));
lre.setEnd(goFactory.createLocation(x + iDirection * doaMinor[k],dY2));
ipr.drawLine(lre);
}
}
}
 else if (oaxa[i].getOrientation() == IConstants.VERTICAL) {
int iDirection=sc.getDirection() != IConstants.FORWARD ? -1 : 1;
AxisTickCoordinates da=sc.getTickCordinates();
double dX1=bo.getLeft() + 1, dX2=bo.getLeft() + bo.getWidth() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
y=da.getCoordinate(j) - pwa.getSeriesThickness();
vnext=da.getCoordinate(j + 1) - pwa.getSeriesThickness();
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(y + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(y - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y + iDirection * doaMinor[k]));
lre.setEnd(goFactory.createLocation(dX1 - pwa.getSeriesThickness(),y + iDirection * doaMinor[k] + pwa.getSeriesThickness()));
ipr.drawLine(lre);
}
}
}
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
y=da.getCoordinate(j);
vnext=da.getCoordinate(j + 1);
if (pwa.getDimension() == IConstants.TWO_5_D) {
y-=pwa.getSeriesThickness();
vnext-=pwa.getSeriesThickness();
}
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(y + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(y - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y + iDirection * doaMinor[k]));
lre.setEnd(goFactory.createLocation(dX2,y + iDirection * doaMinor[k]));
ipr.drawLine(lre);
}
}
}
}
for (int i=0; i < oaxa.length; i++) {
final int STEP_NUMBER=oaxa[i].getModelAxis().getScale().getMajorGridsStepNumber();
lia=oaxa[i].getGrid().getLineAttributes(IConstants.MAJOR);
if (lia == null || !lia.isSetStyle() || !lia.isVisible()) {
continue;
}
AutoScale sc=oaxa[i].getScale();
if (isDimension3D()) {
Line3DRenderEvent lre3d=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Line3DRenderEvent.class);
lre3d.setLineAttributes(lia);
switch (oaxa[i].getAxisType()) {
case IConstants.BASE_AXIS:
AxisTickCoordinates xa=scPrimaryBase.getTickCordinates();
if (floorFill) {
for (int k=0; k < xa.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart + (ancillaryTickCount - 1) * zStep));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
if (rightWallFill) {
for (int k=0; k < xa.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart + (orthogonalTickCount - 1) * yStep,dZStart));
lre3d.setObject3DParent(o3dRightWall);
getDeferredCache().addLine(lre3d);
}
}
break;
case IConstants.ORTHOGONAL_AXIS:
AxisTickCoordinates ya=scPrimaryOrthogonal.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < ya.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart + (ancillaryTickCount - 1) * zStep));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
if (rightWallFill) {
for (int k=0; k < ya.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,ya.getCoordinate(k),dZStart));
lre3d.setObject3DParent(o3dRightWall);
getDeferredCache().addLine(lre3d);
}
}
break;
case IConstants.ANCILLARY_AXIS:
AxisTickCoordinates za=scAncillaryBase.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < za.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k)));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,dYStart + (orthogonalTickCount - 1) * yStep,za.getCoordinate(k)));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
if (floorFill) {
for (int k=0; k < za.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k)));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,dYStart,za.getCoordinate(k)));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
break;
default :
break;
}
}
 else if (oaxa[i].getOrientation() == IConstants.HORIZONTAL) {
AxisTickCoordinates da=sc.getTickCordinates();
double dY2=bo.getTop() + 1, dY1=bo.getTop() + bo.getHeight() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size(); j++) {
if (j == 0 && insCA.getLeft() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
x=da.getCoordinate(j);
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x,dY1 + pwa.getSeriesThickness()));
lre.setEnd(goFactory.createLocation(x + pwa.getSeriesThickness(),dY1));
ipr.drawLine(lre);
}
}
for (int j=0; j < da.size(); j+=STEP_NUMBER) {
if (j == 0 && insCA.getLeft() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
x=da.getCoordinate(j);
if (pwa.getDimension() == IConstants.TWO_5_D) {
x+=pwa.getSeriesThickness();
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x,dY1));
lre.setEnd(goFactory.createLocation(x,dY2));
ipr.drawLine(lre);
}
}
 else if (oaxa[i].getOrientation() == IConstants.VERTICAL) {
AxisTickCoordinates da=sc.getTickCordinates();
double dX1=bo.getLeft() + 1, dX2=bo.getLeft() + bo.getWidth() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size(); j++) {
if (j == 0 && insCA.getBottom() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
y=(da.getCoordinate(j) - pwa.getSeriesThickness());
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y));
lre.setEnd(goFactory.createLocation(dX1 - pwa.getSeriesThickness(),y + pwa.getSeriesThickness()));
ipr.drawLine(lre);
}
}
for (int j=0; j < da.size(); j+=STEP_NUMBER) {
if (j == 0 && insCA.getBottom() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
y=da.getCoordinate(j);
if (pwa.getDimension() == IConstants.TWO_5_D) {
y-=pwa.getSeriesThickness();
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y));
lre.setEnd(goFactory.createLocation(dX2,y));
ipr.drawLine(lre);
}
}
}
if (!isDimension3D() && p.getClientArea().getOutline().isVisible()) {
rre.setBounds(bo);
ipr.drawRectangle(rre);
}
}

Fixed version (ground truth):
/** 
 * Ths background is the first component rendered within the plot block. This is rendered with Z-order=0
 */
protected void renderBackground(IPrimitiveRenderer ipr,Plot p) throws ChartException {
  super.renderBackground(ipr,p);
  final ChartWithAxes cwa=(ChartWithAxes)getModel();
  final PlotWithAxes pwa=(PlotWithAxes)getComputations();
  final ClientArea ca=p.getClientArea();
  if (!ca.isVisible()) {
    return;
  }
  Bounds bo=pwa.getPlotBounds();
  final RectangleRenderEvent rre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),RectangleRenderEvent.class);
  if (!isDimension3D()) {
    if (ca.getShadowColor() != null) {
      rre.setBounds(goFactory.translateBounds(bo,3,3));
      rre.setBackground(ca.getShadowColor());
      ipr.fillRectangle(rre);
    }
    rre.setBounds(bo);
    rre.setOutline(ca.getOutline());
    rre.setBackground(ca.getBackground());
    ipr.fillRectangle(rre);
  }
  double dSeriesThickness=pwa.getSeriesThickness();
  double[] daX={bo.getLeft() - dSeriesThickness,bo.getLeft() + bo.getWidth() - dSeriesThickness};
  double[] daY={bo.getTop() + bo.getHeight() + dSeriesThickness,bo.getTop() + dSeriesThickness};
  final AllAxes aax=pwa.getAxes();
  AutoScale scPrimaryBase=null;
  AutoScale scPrimaryOrthogonal=null;
  AutoScale scAncillaryBase=null;
  double dXStart=0;
  double dYStart=0;
  double dZStart=0;
  double dXEnd=0;
  double dYEnd=0;
  double dZEnd=0;
  int baseTickCount=0;
  int ancillaryTickCount=0;
  int orthogonalTickCount=0;
  double xStep=0;
  double yStep=0;
  double zStep=0;
  if (isDimension3D()) {
    scPrimaryBase=aax.getPrimaryBase().getScale();
    scPrimaryOrthogonal=aax.getPrimaryOrthogonal().getScale();
    scAncillaryBase=aax.getAncillaryBase().getScale();
    dXStart=scPrimaryBase.getStart();
    dYStart=scPrimaryOrthogonal.getStart();
    dZStart=scAncillaryBase.getStart();
    dXEnd=scPrimaryBase.getEnd();
    dYEnd=scPrimaryOrthogonal.getEnd();
    dZEnd=scAncillaryBase.getEnd();
    baseTickCount=scPrimaryBase.getTickCordinates().size();
    ancillaryTickCount=scAncillaryBase.getTickCordinates().size();
    orthogonalTickCount=scPrimaryOrthogonal.getTickCordinates().size();
    xStep=scPrimaryBase.getUnitSize();
    yStep=scPrimaryOrthogonal.getUnitSize();
    zStep=scAncillaryBase.getUnitSize();
  }
  if (pwa.getDimension() == IConstants.TWO_5_D) {
    Location[] loa=null;
    if (cwa.getWallFill() == null) {
      renderPlane(ipr,StructureSource.createPlot(p),new Location[]{goFactory.createLocation(daX[0],daY[0]),goFactory.createLocation(daX[0],daY[1])},ca.getBackground(),ca.getOutline(),cwa.getDimension(),dSeriesThickness,false);
    }
 else {
      loa=new Location[4];
      loa[0]=goFactory.createLocation(daX[0],daY[0]);
      loa[1]=goFactory.createLocation(daX[0],daY[1]);
      loa[2]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[1] - dSeriesThickness);
      loa[3]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[0] - dSeriesThickness);
      final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),PolygonRenderEvent.class);
      pre.setPoints(loa);
      pre.setBackground(cwa.getWallFill());
      pre.setOutline(ca.getOutline());
      ipr.fillPolygon(pre);
      ipr.drawPolygon(pre);
    }
    if (cwa.getFloorFill() == null) {
      renderPlane(ipr,StructureSource.createPlot(p),new Location[]{goFactory.createLocation(daX[0],daY[0]),goFactory.createLocation(daX[1],daY[0])},ca.getBackground(),ca.getOutline(),cwa.getDimension(),dSeriesThickness,false);
    }
 else {
      if (loa == null) {
        loa=new Location[4];
      }
      loa[0]=goFactory.createLocation(daX[0],daY[0]);
      loa[1]=goFactory.createLocation(daX[1],daY[0]);
      loa[2]=goFactory.createLocation(daX[1] + dSeriesThickness,daY[0] - dSeriesThickness);
      loa[3]=goFactory.createLocation(daX[0] + dSeriesThickness,daY[0] - dSeriesThickness);
      final PolygonRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),PolygonRenderEvent.class);
      pre.setPoints(loa);
      pre.setBackground(cwa.getFloorFill());
      pre.setOutline(ca.getOutline());
      ipr.fillPolygon(pre);
      ipr.drawPolygon(pre);
    }
  }
 else   if (pwa.getDimension() == IConstants.THREE_D) {
    Location3D[] loa=null;
    final Polygon3DRenderEvent pre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Polygon3DRenderEvent.class);
    pre.setDoubleSided(true);
    loa=new Location3D[4];
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXStart,dYEnd,dZStart);
    loa[2]=goFactory.createLocation3D(dXStart,dYEnd,dZEnd);
    loa[3]=goFactory.createLocation3D(dXStart,dYStart,dZEnd);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getWallFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    Object event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dLeftWall=Engine3D.getObjectFromEvent(event_new);
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXEnd,dYStart,dZStart);
    loa[2]=goFactory.createLocation3D(dXEnd,dYEnd,dZStart);
    loa[3]=goFactory.createLocation3D(dXStart,dYEnd,dZStart);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getWallFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dRightWall=Engine3D.getObjectFromEvent(event_new);
    if ((cwa.getWallFill() instanceof ColorDefinition && ((ColorDefinition)cwa.getWallFill()).getTransparency() > 0) || (!(cwa.getWallFill() instanceof ColorDefinition) && cwa.getWallFill() != null)) {
      leftWallFill=true;
      rightWallFill=true;
    }
    if (loa == null) {
      loa=new Location3D[4];
    }
    loa[0]=goFactory.createLocation3D(dXStart,dYStart,dZStart);
    loa[1]=goFactory.createLocation3D(dXStart,dYStart,dZEnd);
    loa[2]=goFactory.createLocation3D(dXEnd,dYStart,dZEnd);
    loa[3]=goFactory.createLocation3D(dXEnd,dYStart,dZStart);
    pre.setPoints3D(loa);
    pre.setBackground(cwa.getFloorFill());
    pre.setDoubleSided(true);
    pre.setOutline(ca.getOutline());
    event_new=getDeferredCache().addPlane(pre,PrimitiveRenderEvent.DRAW | PrimitiveRenderEvent.FILL);
    o3dFloor=Engine3D.getObjectFromEvent(event_new);
    if ((cwa.getFloorFill() instanceof ColorDefinition && ((ColorDefinition)cwa.getFloorFill()).getTransparency() > 0) || (!(cwa.getFloorFill() instanceof ColorDefinition) && cwa.getFloorFill() != null)) {
      floorFill=true;
    }
  }
  final OneAxis[] oaxa=new OneAxis[2 + aax.getOverlayCount() + (aax.getAncillaryBase() != null ? 1 : 0)];
  oaxa[0]=aax.getPrimaryBase();
  oaxa[1]=aax.getPrimaryOrthogonal();
  for (int i=0; i < aax.getOverlayCount(); i++) {
    oaxa[2 + i]=aax.getOverlay(i);
  }
  if (aax.getAncillaryBase() != null) {
    oaxa[2 + aax.getOverlayCount()]=aax.getAncillaryBase();
  }
  renderMarkerRanges(oaxa,bo);
  renderMarkerLines(oaxa,bo);
  double x=0, y=0, vnext=0;
  LineAttributes lia;
  LineRenderEvent lre;
  final Insets insCA=aax.getInsets();
  int iCount;
  Grid g;
  double[] doaMinor=null;
  for (int i=0; i < oaxa.length; i++) {
    g=oaxa[i].getGrid();
    iCount=g.getMinorCountPerMajor();
    lia=oaxa[i].getGrid().getLineAttributes(IConstants.MINOR);
    if (lia == null || !lia.isVisible()) {
      continue;
    }
    if (iCount <= 0) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{Integer.valueOf(iCount)},Messages.getResourceBundle(getRunTimeContext().getULocale()));
    }
    AutoScale sc=oaxa[i].getScale();
    doaMinor=sc.getMinorCoordinates(iCount);
    if (isDimension3D()) {
      Line3DRenderEvent lre3d=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Line3DRenderEvent.class);
      lre3d.setLineAttributes(lia);
switch (oaxa[i].getAxisType()) {
case IConstants.BASE_AXIS:
        AxisTickCoordinates xa=scPrimaryBase.getTickCordinates();
      if (floorFill) {
        for (int k=0; k < xa.size() - 1; k++) {
          for (int j=0; j < doaMinor.length - 1; j++) {
            if (ChartUtil.mathGE(xa.getCoordinate(k) + doaMinor[j],xa.getCoordinate(k + 1))) {
              continue;
            }
            lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart));
            lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart + (ancillaryTickCount - 1) * zStep));
            lre3d.setObject3DParent(o3dFloor);
            getDeferredCache().addLine(lre3d);
          }
        }
      }
    if (rightWallFill) {
      for (int k=0; k < xa.size() - 1; k++) {
        for (int j=0; j < doaMinor.length - 1; j++) {
          if (ChartUtil.mathGE(xa.getCoordinate(k) + doaMinor[j],xa.getCoordinate(k + 1))) {
            continue;
          }
          lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart,dZStart));
          lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k) + doaMinor[j],dYStart + (orthogonalTickCount - 1) * yStep,dZStart));
          lre3d.setObject3DParent(o3dRightWall);
          getDeferredCache().addLine(lre3d);
        }
      }
    }
  break;
case IConstants.ORTHOGONAL_AXIS:
AxisTickCoordinates ya=scPrimaryOrthogonal.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < ya.size() - 1; k++) {
  for (int j=0; j < doaMinor.length - 1; j++) {
    if (ChartUtil.mathGE(ya.getCoordinate(k) + doaMinor[j],ya.getCoordinate(k + 1))) {
      continue;
    }
    lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart));
    lre3d.setEnd3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart + (ancillaryTickCount - 1) * zStep));
    lre3d.setObject3DParent(o3dLeftWall);
    getDeferredCache().addLine(lre3d);
  }
}
}
if (rightWallFill) {
for (int k=0; k < ya.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
  if (ChartUtil.mathGE(ya.getCoordinate(k) + doaMinor[j],ya.getCoordinate(k + 1))) {
    continue;
  }
  lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k) + doaMinor[j],dZStart));
  lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,ya.getCoordinate(k) + doaMinor[j],dZStart));
  lre3d.setObject3DParent(o3dRightWall);
  getDeferredCache().addLine(lre3d);
}
}
}
break;
case IConstants.ANCILLARY_AXIS:
AxisTickCoordinates za=scAncillaryBase.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < za.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
if (ChartUtil.mathGE(za.getCoordinate(k) + doaMinor[j],za.getCoordinate(k + 1))) {
continue;
}
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,dYStart + (orthogonalTickCount - 1) * yStep,za.getCoordinate(k) + doaMinor[j]));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
}
if (floorFill) {
for (int k=0; k < za.size() - 1; k++) {
for (int j=0; j < doaMinor.length - 1; j++) {
if (ChartUtil.mathGE(za.getCoordinate(k) + doaMinor[j],za.getCoordinate(k + 1))) {
continue;
}
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,dYStart,za.getCoordinate(k) + doaMinor[j]));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
}
break;
default :
break;
}
}
 else if (oaxa[i].getOrientation() == IConstants.HORIZONTAL) {
int iDirection=sc.getDirection() == IConstants.BACKWARD ? -1 : 1;
AxisTickCoordinates da=sc.getTickCordinates();
double dY2=bo.getTop() + 1, dY1=bo.getTop() + bo.getHeight() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
x=da.getCoordinate(j);
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(x + doaMinor[k],da.getCoordinate(j + 1))) || (iDirection == -1 && ChartUtil.mathLE(x - doaMinor[k],da.getCoordinate(j + 1)))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x + iDirection * doaMinor[k],dY1 + pwa.getSeriesThickness()));
lre.setEnd(goFactory.createLocation(x + iDirection * doaMinor[k] + pwa.getSeriesThickness(),dY1));
ipr.drawLine(lre);
}
}
}
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
x=da.getCoordinate(j);
vnext=da.getCoordinate(j + 1);
if (pwa.getDimension() == IConstants.TWO_5_D) {
x+=pwa.getSeriesThickness();
vnext+=pwa.getSeriesThickness();
}
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(x + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(x - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x + iDirection * doaMinor[k],dY1));
lre.setEnd(goFactory.createLocation(x + iDirection * doaMinor[k],dY2));
ipr.drawLine(lre);
}
}
}
 else if (oaxa[i].getOrientation() == IConstants.VERTICAL) {
int iDirection=sc.getDirection() != IConstants.FORWARD ? -1 : 1;
AxisTickCoordinates da=sc.getTickCordinates();
double dX1=bo.getLeft() + 1, dX2=bo.getLeft() + bo.getWidth() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
y=da.getCoordinate(j) - pwa.getSeriesThickness();
vnext=da.getCoordinate(j + 1) - pwa.getSeriesThickness();
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(y + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(y - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y + iDirection * doaMinor[k]));
lre.setEnd(goFactory.createLocation(dX1 - pwa.getSeriesThickness(),y + iDirection * doaMinor[k] + pwa.getSeriesThickness()));
ipr.drawLine(lre);
}
}
}
for (int j=0; j < da.size() - 1; j++) {
if ((j == 0 || j == da.size() - 2) && sc.isCategoryScale() && !sc.isTickBetweenCategories()) {
continue;
}
y=da.getCoordinate(j);
vnext=da.getCoordinate(j + 1);
if (pwa.getDimension() == IConstants.TWO_5_D) {
y-=pwa.getSeriesThickness();
vnext-=pwa.getSeriesThickness();
}
for (int k=0; k < doaMinor.length; k++) {
if ((iDirection == 1 && ChartUtil.mathGE(y + doaMinor[k],vnext)) || (iDirection == -1 && ChartUtil.mathLE(y - doaMinor[k],vnext))) {
continue;
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y + iDirection * doaMinor[k]));
lre.setEnd(goFactory.createLocation(dX2,y + iDirection * doaMinor[k]));
ipr.drawLine(lre);
}
}
}
}
for (int i=0; i < oaxa.length; i++) {
final int STEP_NUMBER=oaxa[i].getModelAxis().getScale().getMajorGridsStepNumber();
lia=oaxa[i].getGrid().getLineAttributes(IConstants.MAJOR);
if (lia == null || !lia.isVisible()) {
continue;
}
AutoScale sc=oaxa[i].getScale();
if (isDimension3D()) {
Line3DRenderEvent lre3d=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),Line3DRenderEvent.class);
lre3d.setLineAttributes(lia);
switch (oaxa[i].getAxisType()) {
case IConstants.BASE_AXIS:
AxisTickCoordinates xa=scPrimaryBase.getTickCordinates();
if (floorFill) {
for (int k=0; k < xa.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart + (ancillaryTickCount - 1) * zStep));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
if (rightWallFill) {
for (int k=0; k < xa.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart,dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(xa.getCoordinate(k),dYStart + (orthogonalTickCount - 1) * yStep,dZStart));
lre3d.setObject3DParent(o3dRightWall);
getDeferredCache().addLine(lre3d);
}
}
break;
case IConstants.ORTHOGONAL_AXIS:
AxisTickCoordinates ya=scPrimaryOrthogonal.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < ya.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart + (ancillaryTickCount - 1) * zStep));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
if (rightWallFill) {
for (int k=0; k < ya.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,ya.getCoordinate(k),dZStart));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,ya.getCoordinate(k),dZStart));
lre3d.setObject3DParent(o3dRightWall);
getDeferredCache().addLine(lre3d);
}
}
break;
case IConstants.ANCILLARY_AXIS:
AxisTickCoordinates za=scAncillaryBase.getTickCordinates();
if (leftWallFill) {
for (int k=0; k < za.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k)));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart,dYStart + (orthogonalTickCount - 1) * yStep,za.getCoordinate(k)));
lre3d.setObject3DParent(o3dLeftWall);
getDeferredCache().addLine(lre3d);
}
}
if (floorFill) {
for (int k=0; k < za.size(); k+=STEP_NUMBER) {
lre3d.setStart3D(goFactory.createLocation3D(dXStart,dYStart,za.getCoordinate(k)));
lre3d.setEnd3D(goFactory.createLocation3D(dXStart + (baseTickCount - 1) * xStep,dYStart,za.getCoordinate(k)));
lre3d.setObject3DParent(o3dFloor);
getDeferredCache().addLine(lre3d);
}
}
break;
default :
break;
}
}
 else if (oaxa[i].getOrientation() == IConstants.HORIZONTAL) {
AxisTickCoordinates da=sc.getTickCordinates();
double dY2=bo.getTop() + 1, dY1=bo.getTop() + bo.getHeight() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size(); j++) {
if (j == 0 && insCA.getLeft() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
x=da.getCoordinate(j);
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x,dY1 + pwa.getSeriesThickness()));
lre.setEnd(goFactory.createLocation(x + pwa.getSeriesThickness(),dY1));
ipr.drawLine(lre);
}
}
for (int j=0; j < da.size(); j+=STEP_NUMBER) {
if (j == 0 && insCA.getLeft() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
x=da.getCoordinate(j);
if (pwa.getDimension() == IConstants.TWO_5_D) {
x+=pwa.getSeriesThickness();
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(x,dY1));
lre.setEnd(goFactory.createLocation(x,dY2));
ipr.drawLine(lre);
}
}
 else if (oaxa[i].getOrientation() == IConstants.VERTICAL) {
AxisTickCoordinates da=sc.getTickCordinates();
double dX1=bo.getLeft() + 1, dX2=bo.getLeft() + bo.getWidth() - 2;
if (pwa.getDimension() == IConstants.TWO_5_D) {
for (int j=0; j < da.size(); j++) {
if (j == 0 && insCA.getBottom() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
y=(da.getCoordinate(j) - pwa.getSeriesThickness());
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y));
lre.setEnd(goFactory.createLocation(dX1 - pwa.getSeriesThickness(),y + pwa.getSeriesThickness()));
ipr.drawLine(lre);
}
}
for (int j=0; j < da.size(); j+=STEP_NUMBER) {
if (j == 0 && insCA.getBottom() < lia.getThickness()) continue;
if (j == da.size() - 1 && sc.isCategoryScale() && !sc.isTickBetweenCategories()) continue;
y=da.getCoordinate(j);
if (pwa.getDimension() == IConstants.TWO_5_D) {
y-=pwa.getSeriesThickness();
}
lre=((EventObjectCache)ipr).getEventObject(StructureSource.createPlot(p),LineRenderEvent.class);
lre.setLineAttributes(lia);
lre.setStart(goFactory.createLocation(dX1,y));
lre.setEnd(goFactory.createLocation(dX2,y));
ipr.drawLine(lre);
}
}
}
if (!isDimension3D() && p.getClientArea().getOutline().isVisible()) {
rre.setBounds(bo);
ipr.drawRectangle(rre);
}
}