colorSpace property

PdfColorSpace get colorSpace

Gets the color space of the document. This property can be used to create PDF document in RGB, Grayscale or CMYK color spaces.

By default the document uses RGB color space.

Implementation

PdfColorSpace get colorSpace {
  if ((_colorSpace == PdfColorSpace.rgb) ||
      ((_colorSpace == PdfColorSpace.cmyk) ||
          (_colorSpace == PdfColorSpace.grayScale))) {
    return _colorSpace!;
  } else {
    return PdfColorSpace.rgb;
  }
}
set colorSpace (PdfColorSpace value)

Sets the color space of the document. This property can be used to create PDF document in RGB, Grayscale or CMYK color spaces.

By default the document uses RGB color space.

Implementation

set colorSpace(PdfColorSpace value) {
  if ((value == PdfColorSpace.rgb) ||
      ((value == PdfColorSpace.cmyk) || (value == PdfColorSpace.grayScale))) {
    _colorSpace = value;
  } else {
    _colorSpace = PdfColorSpace.rgb;
  }
}