documentationfor yFiles for HTML 2.6

Support for Colors and Fills

yFiles for HTML has a strong relationship to the yWorks diagramming libraries for the Microsoft .NET platform, especially to yFiles WPF. Parts of the APIs that deal with 2D graphics are very similar and thus some types that are common in the Windows Presentation Foundation (WPF) world, also appear in yFiles for HTML.

These types include, for example, Stroke (Pen in WPF), Fill (Brush in WPF), Color, and LinearGradient.

Each of them provides a lean subset of the corresponding WPF type’s API, which exactly suits the needs of yFiles for HTML. The actual implementations of the methods and properties are specific to the HTML5/SVG environment, though.

Also, further extensions to the API of these types can provide additional functionality, for example, for generation of SVG markup.