PdfColor class
Implements structures and routines working with color.
//Creates a new PDF document.
PdfDocument document = PdfDocument()
..pages.add().graphics.drawString(
'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
//Using PDF color set pen.
pen: PdfPen(PdfColor(200, 120, 80)));
//Saves the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Constructors
- PdfColor(int red, int green, int blue, [int alpha = 255])
- Initializes a new instance of the PdfColor class with Red, Green, Blue and Alpha channels.
- PdfColor.fromCMYK(double cyan, double magenta, double yellow, double black)
- Initializes a new instance of the PdfColor class with Cyan, Magenta, Yellow and Black channels.
Properties
- b ↔ int
-
Gets or sets Blue channel value.
getter/setter pair
- g ↔ int
-
Gets or sets Green channel value.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Gets whether the PDFColor is Empty or not.
no setter
- r ↔ int
-
Gets or sets Red channel value.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override