output method

PdfDict<PdfDataType> output()

Implementation

PdfDict output() {
  final params = PdfDict();

  if (strokeOpacity != null) {
    params['/CA'] = PdfNum(strokeOpacity!);
  }

  if (fillOpacity != null) {
    params['/ca'] = PdfNum(fillOpacity!);
  }

  if (blendMode != null) {
    final bm = blendMode.toString();
    params['/BM'] =
        PdfName('/${bm.substring(13, 14).toUpperCase()}${bm.substring(14)}');
  }

  if (softMask != null) {
    params['/SMask'] = softMask!.output();
  }

  if (transferFunction != null) {
    params['/TR'] = transferFunction!.ref();
  }

  return params;
}