PdfBlendMode enum Null safety

Specifies the blend mode for transparency.

//Creates a new PDF document.
PdfDocument doc = PdfDocument();
//Create PDF graphics for the page
doc.pages.add().graphics
  ..setTransparency(0.5, alphaBrush: 0.5, mode: PdfBlendMode.hardLight)
  ..drawString('Hello world!',
      PdfStandardFont(PdfFontFamily.helvetica, 12, style: PdfFontStyle.bold),
      brush: PdfBrushes.red, pen: PdfPens.black);
//Saves the document.
List<int> bytes = doc.save();
//Dispose the document.
doc.dispose();

Constants

color → const PdfBlendMode

Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.

const PdfBlendMode(14)
colorBurn → const PdfBlendMode

Darkens the backdrop color to reflect the source color. Painting with white produces no change.

const PdfBlendMode(7)
colorDodge → const PdfBlendMode

Brightens the backdrop color to reflect the source color. Painting with black produces no changes.

const PdfBlendMode(6)
darken → const PdfBlendMode

Selects the darker of the backdrop and source colors. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.

const PdfBlendMode(4)
difference → const PdfBlendMode

Subtracts the darker of the two constituent colors from the lighter color. Painting with white inverts the backdrop color; painting with black produces no change.

const PdfBlendMode(10)
exclusion → const PdfBlendMode

Produces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change.

const PdfBlendMode(11)
hardLight → const PdfBlendMode

Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.

const PdfBlendMode(8)
hue → const PdfBlendMode

Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.

const PdfBlendMode(12)
lighten → const PdfBlendMode

Selects the lighter of the backdrop and source colors. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.

const PdfBlendMode(5)
luminosity → const PdfBlendMode

Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.

const PdfBlendMode(15)
multiply → const PdfBlendMode

Multiplies the backdrop and source color values. The result color is always at least as dark as either of the two constituent colors. Multiplying any color with black produces black; multiplying with white leaves the original color unchanged. Painting successive overlapping objects with a color other than black or white produces progressively darker colors.

const PdfBlendMode(1)
normal → const PdfBlendMode

Selects the source color, ignoring the backdrop.

const PdfBlendMode(0)
overlay → const PdfBlendMode

Multiplies or screens the colors, depending on the backdrop color value. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness of the backdrop.

const PdfBlendMode(3)
saturation → const PdfBlendMode

Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change.

const PdfBlendMode(13)
screen → const PdfBlendMode

Multiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.

const PdfBlendMode(2)
softLight → const PdfBlendMode

Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.

const PdfBlendMode(9)
values → const List<PdfBlendMode>

A constant List of the values in this enum, in order of their declaration.

const List<PdfBlendMode>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited