copyWith abstract method

P copyWith(
  1. P pixel
)

Returns a copy of the pixel.

Subclasses override this method to provide named parameters for channels.

Example

print(abgr8888.copyWith(0x12345678, red: 0x9A)); // 0x9A345678
print(floatRgba.copyWith(Float32x4(0.1, 0.2, 0.3, 0.4), red: 0.5)); // [0.5, 0.2, 0.3, 0.4]

Implementation

P copyWith(P pixel);