public void createOperations(PhysicalOperationsCollector col,
Element e,
Content value,
Rectangle2D bounds) {
final Stroke stroke = (Stroke) e.getStyle().getStyleProperty(ElementStyleSheet.STROKE);
final Color paint = (Color) e.getStyle().getStyleProperty(ElementStyleSheet.PAINT);
final boolean shouldDraw = e.getStyle().getBooleanStyleProperty(ShapeElement.DRAW_SHAPE);
final boolean shouldFill = e.getStyle().getBooleanStyleProperty(ShapeElement.FILL_SHAPE);
if (shouldFill == false && shouldDraw == false)
{
return;
}
final ShapeContent sc = (ShapeContent) value.getContentForBounds(bounds);
if (sc == null)
{
return;
}
col.addOperation(new PhysicalOperation.SetBoundsOperation
(computeAlignmentBounds(e, value, bounds)));
//col.addOperation(new PhysicalOperation.SetBoundsOperation(bounds));
//Log.debug ("Alignment: " + computeAlignmentBounds(e, value, bounds));
col.addOperation(new PhysicalOperation.SetStrokeOperation(stroke));
col.addOperation(new PhysicalOperation.SetPaintOperation(paint));
final Shape s = sc.getShape();
if (shouldDraw == true)
{
col.addOperation(new PhysicalOperation.PrintShapeOperation(s));
}
if (shouldFill == true)
{
col.addOperation(new PhysicalOperation.PrintFilledShapeOperation(s));
}
}
Creates a list of operations that will render report content within the specified bounds. |