public void copyStyle(DRBaseStyle toStyle, DRIBaseStyle fromStyle) {
   toStyle.setForegroundColor(fromStyle.getForegroundColor());
   toStyle.setBackgroundColor(fromStyle.getBackgroundColor());
   toStyle.setRadius(fromStyle.getRadius());
   toStyle.setImageScale(fromStyle.getImageScale());
   toStyle.setHorizontalAlignment(fromStyle.getHorizontalAlignment());
   toStyle.setVerticalAlignment(fromStyle.getVerticalAlignment());
   toStyle.setBorder((DRBorder) fromStyle.getBorder());
   toStyle.setPadding((DRPadding) fromStyle.getPadding());
   toStyle.setFont((DRFont) fromStyle.getFont());
   toStyle.setRotation(fromStyle.getRotation());
   toStyle.setPattern(fromStyle.getPattern());
   toStyle.setMarkup(fromStyle.getMarkup());
   toStyle.setParagraph((DRParagraph) fromStyle.getParagraph());
   toStyle.setLinePen((DRPen) fromStyle.getLinePen());
 }
 private void baseStyle(DRDesignBaseStyle designBaseStyle, DRIBaseStyle baseStyle)
     throws DRException {
   designBaseStyle.setForegroundColor(baseStyle.getForegroundColor());
   designBaseStyle.setBackgroundColor(baseStyle.getBackgroundColor());
   designBaseStyle.setRadius(baseStyle.getRadius());
   designBaseStyle.setImageScale(baseStyle.getImageScale());
   designBaseStyle.setHorizontalAlignment(baseStyle.getHorizontalAlignment());
   designBaseStyle.setVerticalAlignment(baseStyle.getVerticalAlignment());
   designBaseStyle.setBorder(border(baseStyle.getBorder()));
   designBaseStyle.setPadding(padding(baseStyle.getPadding()));
   designBaseStyle.setFont(transformFont(baseStyle.getFont()));
   designBaseStyle.setRotation(baseStyle.getRotation());
   designBaseStyle.setPattern(baseStyle.getPattern());
   designBaseStyle.setMarkup(baseStyle.getMarkup());
   designBaseStyle.setParagraph(paragraph(baseStyle.getParagraph()));
   designBaseStyle.setLinePen(pen(baseStyle.getLinePen()));
 }