private static XamlMedia.Matrix CreatePointSymbolMatrix(double resolution, SymbolStyle symbolStyle)
{
var matrix = XamlMedia.Matrix.Identity;
MatrixHelper.InvertY(ref matrix);
var centerX = symbolStyle.SymbolOffset.X;
var centerY = symbolStyle.SymbolOffset.Y;
var scale = symbolStyle.SymbolScale;
MatrixHelper.Translate(ref matrix, centerX, centerY);
MatrixHelper.ScaleAt(ref matrix, scale, scale);
//for point symbols we want the size to be independent from the resolution. We do this by counter scaling first.
if (symbolStyle.UnitType != UnitType.WorldUnit)
MatrixHelper.ScaleAt(ref matrix, resolution, resolution);
MatrixHelper.RotateAt(ref matrix, -symbolStyle.SymbolRotation);
return matrix;
}