/** Writer function */
 public MfRecord getRecord() {
   final Rectangle rc = getBounds();
   final MfRecord record = new MfRecord(RECORD_SIZE);
   record.setParam(POS_BOTTOM, (int) (rc.getY() + rc.getHeight()));
   record.setParam(POS_RIGHT, (int) (rc.getX() + rc.getWidth()));
   record.setParam(POS_TOP, (int) (rc.getY()));
   record.setParam(POS_LEFT, (int) (rc.getX()));
   return record;
 }
 /**
  * Creates a new record based on the data stored in the MfCommand.
  *
  * @return the created record.
  */
 public MfRecord getRecord() {
   final Point dest = getDestination();
   final MfRecord record = new MfRecord(RECORD_SIZE);
   record.setParam(POS_Y, dest.y);
   record.setParam(POS_X, dest.x);
   return record;
 }
  /**
   * Creates a new record based on the data stored in the MfCommand. <i>This function may or may not
   * work, there is not much HQ documentation about metafiles available in the net. </i>
   *
   * @return the created record.
   */
  public MfRecord getRecord() throws RecordCreationException {
    final int cEntries = getEntriesCount();
    if (cEntries == 0) {
      throw new RecordCreationException("Empty CreatePaletteRecord is not valid");
    }

    final MfRecord record = new MfRecord(2 + cEntries * 2);
    record.setParam(POS_HPALETTE, getHPalette());
    record.setParam(POS_CENTRIES, cEntries);
    for (int i = 0; i < cEntries; i++) {
      final Color c = colors[i];
      // a long parameter is 2 words long
      record.setLongParam(i * 2 + POS_START_ENTRIES, GDIColor.translateColor(c));
    }
    return record;
  }
 /**
  * Creates a new record based on the data stored in the MfCommand.
  *
  * @return the created record.
  */
 public MfRecord getRecord() throws RecordCreationException {
   final MfRecord record = new MfRecord(RECORD_SIZE);
   final Point p = getTarget();
   record.setParam(POS_X, p.x);
   record.setParam(POS_Y, p.y);
   return record;
 }
 /**
  * Creates a new record based on the data stored in the MfCommand.
  *
  * @return the created record.
  */
 public MfRecord getRecord() throws RecordCreationException {
   final MfRecord record = new MfRecord(RECORD_SIZE);
   record.setParam(POS_TEXT_CHAR_EXTRA, getTextCharExtra());
   return record;
 }