PeachDrawing.Core
PeachDrawing.Core.ColorMatrix
ColorMatrix.Linear Property
The linear (4x4) part of the affine map. Apply(Vector4) and Compose(ColorMatrix) both
go through System.Numerics.Vector4.Transform(System.Numerics.Vector4,System.Numerics.Matrix4x4), which treats a color as a
row vector (result = color * Linear): per its documented implementation, output
component c is sum over r of color[r] * Linear[r, c]. That makes each field’s
ROW (the first index in Mrowcol) the INPUT component and its COLUMN the OUTPUT
component - e.g. Linear.M21 (row 2 = input G, col 1 = output R) is how much input G
contributes to output R. This is the transpose of feColorMatrix’s own row-major table
(SVG Filter Effects §15.17, where row = output); a caller building a ColorMatrix
from such a table must transpose it first.
public System.Numerics.Matrix4x4 Linear { get; }