Support for Colors and Fills
yFiles for HTML shares many similarities with the yWorks diagramming libraries for the Microsoft .NET platform, especially yFiles WPF. APIs that handle 2D graphics are very similar, so some types common in the Windows Presentation Foundation (WPF) also appear in yFiles for HTML.
These types include Stroke (Pen in WPF), Fill (Brush in WPF), Color, and LinearGradient.
Each provides a simplified version of the corresponding WPF type’s API, specifically tailored to the needs of yFiles for HTML. The actual implementations of the methods and properties are specific to the HTML/SVG environment.
Additionally, extensions to the API of these types can provide extra functionality, such as generating SVG markup.