Skip to content

WPF-Math v0.13.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Jan 22:38

Changed

  • (Breaking change.) The library is now distributed in the form of two assemblies: WpfMath and WpfMath.Shared (as a future cross-platform core of the library).

    Both of the assemblies are still distributed in the same NuGet package.

    A lot of types were moved to WpfMath.Shared assembly (preserving their namespaces).

  • (Breaking change.) It is no longer recommended to create instances of TexEnvironment using the public constructor. Use WpfMath.Rendering.WpfTeXEnvironment::Create instead.

  • (Breaking change.) It is no longer recommended to create instances of TexFormulaParser using public constructors. Use WpfMath.Parsers.WpfTeXFormulaParser::Instance instead.

  • (Breaking change.) WPF-specific WpfMath.Rendering.IBrush has been replaced with WpfMath.Rendering.IBrush in most of the public interfaces. Use WpfMath.Rendering.WpfBrushExtensions to convert back and forth to the WPF type.

  • (Breaking change.) WpfMath.Rendering.IElementRenderer has been updated:

    • RenderGlyphRun has been replaced with RenderCharacter method (not reliant on any WPF-specific types),
    • RenderRectangle now receives an instance of a new WpfMath.Rendering.Rectangle type (decoupled from WPF).
  • WpfMath.TexRenderer is now obsolete. Consult the documentation on new recommended ways to perform custom rendering. There are new extension methods in two classes (WpfMath.Rendering.WpfTeXFormulaExtensions and WpfMath.Rendering.TeXFormulaExtensions) that are the main way to render formulae now.

  • (Breaking change.) WpfMath.TexFormnula::GetRenderer is gone. Create a TexRenderer using constructor (obsolete) or use the aforementioned extension methods instead.

Added

  • WpfMath.CharInfo: a new public type to work with a font character. Use WpfMath.Fonts.WpfCharInfoEx::GetGlyphRun if you need to get a System.Windows.Media.GlyphRun from it.
  • WpfMath.Rendering.WpfTeXFormulaExtensions to render a WpfMath.TexFormula into a System.Windows.Media.Imaging.BitmapSource or System.Windows.Media.Geometry.
  • New classes for WPF-Math porting to platforms other than WPF (consult the WpfMath.Rendering.IElementRenderer interface and TexFormulaParser constructor parameters to know more).
  • WpfMath.Colors.RgbaColor as a new portable color representation.
  • WpfMath.Fonts.IFontProvider: implement this interface to provide alternate font reading functionality.
  • WpfMath.Fonts.ITeXFont: implement this interface to provide access to a platform-specific font resource.
  • WpfMath.Rendering.IBrushFactory: implement this interface to provide access to creation of platform-specific solid-colored brushes.
  • WpfMath.TeXFontMetrics that contains some measurements of a font glyph.
  • An utility Result struct is now public.