g property

int get g

Gets or sets Green channel value.

//Create a new PDF document.
PdfDocument document = PdfDocument()
  ..pages.add().graphics.drawRectangle(
      //sets the green channel value.
      pen: PdfPen(PdfColor(0, 0, 0)..g = 255),
      bounds: Rect.fromLTWH(10, 10, 200, 100));
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();

Implementation

int get g => _green;
set g (int value)

Implementation

set g(int value) {
  _green = value;
  _assignCMYK(_red, _green, _blue);
  _helper.isFilled = true;
}