Calculate pan and zoom matrix based on provided stretch mode.
public static Matrix CalculateMatrix(double panelWidth, double panelHeight, double elementWidth, double elementHeight, StretchMode mode)
The panel width.
The panel height.
The element width.
The element height.
The stretch mode.