public static void SetTransform(this HtmlStyleDictionary style, Matrix transform, IHtmlValueConverter converter) { if (transform == Matrix.Identity) { style.ClearValue("transform"); style.ClearValue("transform-origin"); } else { style.SetValue("transform", converter.ToTransformString(transform)); style.SetValue("transform-origin", "0 0"); } }