Represents any object which fills an area.
Remarks
The fill that is defined by instances of this type can be applied to an SVG element using either the static helper setFill or the instance method applyTo.
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
CSS color strings are converted to SolidColorFills. For example:
'blue'
'#369'
'#336699'
'rgb(51, 102, 153)'
'rgba(51, 102, 153, 0.5)'
'hsl(225, 98%, 60%)'
'hsla(225, 98%, 60%, 0.5)'
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.Fill
See Also
Methods
Assigns the fill defined by this instance to the given SVG element
.
Remarks
If this Fill is a gradient and implements the ISvgDefsCreator interface, it will be added to the defs
section of the SVG document per the context
. The fill of the given element will be set to a reference to the gradient element.
This method is very similar in functionality to its static method counter part setFill. However since this method is an instance method, it cannot be called on empty/null
fills. If you are unsure whether the reference actually points to an instance, use the static helper method instead.
Parameters
A map of options to pass to the method.
- element - SVGElement
- The element whose fill should be set.
- context - ICanvasContext
- The context.
See Also
Clones this instance by returning a memberwiseClone or this in case this instance is already frozen.
Determines whether this Fill is equal to the specified object.
Parameters
A map of options to pass to the method.
Returns
- ↪boolean
Constants
Gets a SolidColorFill for the color AliceBlue.
Remarks
Gets a SolidColorFill for the color AntiqueWhite.
Remarks
Gets a SolidColorFill for the color Aqua.
Remarks
Gets a SolidColorFill for the color Aquamarine.
Remarks
Gets a SolidColorFill for the color Azure.
Remarks
Gets a SolidColorFill for the color Beige.
Remarks
Gets a SolidColorFill for the color Bisque.
Remarks
Gets a SolidColorFill for the color Black.
Remarks
Gets a SolidColorFill for the color BlanchedAlmond.
Remarks
Gets a SolidColorFill for the color Blue.
Remarks
Gets a SolidColorFill for the color BlueViolet.
Remarks
Gets a SolidColorFill for the color Brown.
Remarks
Gets a SolidColorFill for the color BurlyWood.
Remarks
Gets a SolidColorFill for the color CadetBlue.
Remarks
Gets a SolidColorFill for the color Chartreuse.
Remarks
Gets a SolidColorFill for the color Chocolate.
Remarks
Gets a SolidColorFill for the color Coral.
Remarks
Gets a SolidColorFill for the color CornflowerBlue.
Remarks
Gets a SolidColorFill for the color Cornsilk.
Remarks
Gets a SolidColorFill for the color Crimson.
Remarks
Gets a SolidColorFill for the color Cyan.
Remarks
Gets a SolidColorFill for the color DarkBlue.
Remarks
Gets a SolidColorFill for the color DarkCyan.
Remarks
Gets a SolidColorFill for the color DarkGoldenrod.
Remarks
Gets a SolidColorFill for the color DarkGray.
Remarks
Gets a SolidColorFill for the color DarkGreen.
Remarks
Gets a SolidColorFill for the color DarkKhaki.
Remarks
Gets a SolidColorFill for the color DarkMagenta.
Remarks
Gets a SolidColorFill for the color DarkOliveGreen.
Remarks
Gets a SolidColorFill for the color DarkOrange.
Remarks
Gets a SolidColorFill for the color DarkOrchid.
Remarks
Gets a SolidColorFill for the color DarkRed.
Remarks
Gets a SolidColorFill for the color DarkSalmon.
Remarks
Gets a SolidColorFill for the color DarkSeaGreen.
Remarks
Gets a SolidColorFill for the color DarkSlateBlue.
Remarks
Gets a SolidColorFill for the color DarkSlateGray.
Remarks
Gets a SolidColorFill for the color DarkTurquoise.
Remarks
Gets a SolidColorFill for the color DarkViolet.
Remarks
Gets a SolidColorFill for the color DeepPink.
Remarks
Gets a SolidColorFill for the color DeepSkyBlue.
Remarks
Gets a SolidColorFill for the color DimGray.
Remarks
Gets a SolidColorFill for the color DodgerBlue.
Remarks
Gets a SolidColorFill for the color Firebrick.
Remarks
Gets a SolidColorFill for the color FloralWhite.
Remarks
Gets a SolidColorFill for the color ForestGreen.
Remarks
Gets a SolidColorFill for the color Fuchsia.
Remarks
Gets a SolidColorFill for the color Gainsboro.
Remarks
Gets a SolidColorFill for the color GhostWhite.
Remarks
Gets a SolidColorFill for the color Gold.
Remarks
Gets a SolidColorFill for the color Goldenrod.
Remarks
Gets a SolidColorFill for the color Gray.
Remarks
Gets a SolidColorFill for the color Green.
Remarks
Gets a SolidColorFill for the color GreenYellow.
Remarks
Gets a SolidColorFill for the color Honeydew.
Remarks
Gets a SolidColorFill for the color HotPink.
Remarks
Gets a SolidColorFill for the color IndianRed.
Remarks
Gets a SolidColorFill for the color Indigo.
Remarks
Gets a SolidColorFill for the color Ivory.
Remarks
Gets a SolidColorFill for the color Khaki.
Remarks
Gets a SolidColorFill for the color Lavender.
Remarks
Gets a SolidColorFill for the color LavenderBlush.
Remarks
Gets a SolidColorFill for the color LawnGreen.
Remarks
Gets a SolidColorFill for the color LemonChiffon.
Remarks
Gets a SolidColorFill for the color LightBlue.
Remarks
Gets a SolidColorFill for the color LightCoral.
Remarks
Gets a SolidColorFill for the color LightCyan.
Remarks
Gets a SolidColorFill for the color LightGoldenrodYellow.
Remarks
Gets a SolidColorFill for the color LightGray.
Remarks
Gets a SolidColorFill for the color LightGreen.
Remarks
Gets a SolidColorFill for the color LightPink.
Remarks
Gets a SolidColorFill for the color LightSalmon.
Remarks
Gets a SolidColorFill for the color LightSeaGreen.
Remarks
Gets a SolidColorFill for the color LightSkyBlue.
Remarks
Gets a SolidColorFill for the color LightSlateGray.
Remarks
Gets a SolidColorFill for the color LightSteelBlue.
Remarks
Gets a SolidColorFill for the color LightYellow.
Remarks
Gets a SolidColorFill for the color Lime.
Remarks
Gets a SolidColorFill for the color LimeGreen.
Remarks
Gets a SolidColorFill for the color Linen.
Remarks
Gets a SolidColorFill for the color Magenta.
Remarks
Gets a SolidColorFill for the color Maroon.
Remarks
Gets a SolidColorFill for the color MediumAquamarine.
Remarks
Gets a SolidColorFill for the color MediumBlue.
Remarks
Gets a SolidColorFill for the color MediumOrchid.
Remarks
Gets a SolidColorFill for the color MediumPurple.
Remarks
Gets a SolidColorFill for the color MediumSeaGreen.
Remarks
Gets a SolidColorFill for the color MediumSlateBlue.
Remarks
Gets a SolidColorFill for the color MediumSpringGreen.
Remarks
Gets a SolidColorFill for the color MediumTurquoise.
Remarks
Gets a SolidColorFill for the color MediumVioletRed.
Remarks
Gets a SolidColorFill for the color MidnightBlue.
Remarks
Gets a SolidColorFill for the color MintCream.
Remarks
Gets a SolidColorFill for the color MistyRose.
Remarks
Gets a SolidColorFill for the color Moccasin.
Remarks
Gets a SolidColorFill for the color NavajoWhite.
Remarks
Gets a SolidColorFill for the color Navy.
Remarks
Gets a SolidColorFill for the color OldLace.
Remarks
Gets a SolidColorFill for the color Olive.
Remarks
Gets a SolidColorFill for the color OliveDrab.
Remarks
Gets a SolidColorFill for the color Orange.
Remarks
Gets a SolidColorFill for the color OrangeRed.
Remarks
Gets a SolidColorFill for the color Orchid.
Remarks
Gets a SolidColorFill for the color PaleGoldenrod.
Remarks
Gets a SolidColorFill for the color PaleGreen.
Remarks
Gets a SolidColorFill for the color PaleTurquoise.
Remarks
Gets a SolidColorFill for the color PaleVioletRed.
Remarks
Gets a SolidColorFill for the color PapayaWhip.
Remarks
Gets a SolidColorFill for the color PeachPuff.
Remarks
Gets a SolidColorFill for the color Peru.
Remarks
Gets a SolidColorFill for the color Pink.
Remarks
Gets a SolidColorFill for the color Plum.
Remarks
Gets a SolidColorFill for the color PowderBlue.
Remarks
Gets a SolidColorFill for the color Purple.
Remarks
Gets a SolidColorFill for the color Red.
Remarks
Gets a SolidColorFill for the color RosyBrown.
Remarks
Gets a SolidColorFill for the color RoyalBlue.
Remarks
Gets a SolidColorFill for the color SaddleBrown.
Remarks
Gets a SolidColorFill for the color Salmon.
Remarks
Gets a SolidColorFill for the color SandyBrown.
Remarks
Gets a SolidColorFill for the color SeaGreen.
Remarks
Gets a SolidColorFill for the color SeaShell.
Remarks
Gets a SolidColorFill for the color Sienna.
Remarks
Gets a SolidColorFill for the color Silver.
Remarks
Gets a SolidColorFill for the color SkyBlue.
Remarks
Gets a SolidColorFill for the color SlateBlue.
Remarks
Gets a SolidColorFill for the color SlateGray.
Remarks
Gets a SolidColorFill for the color Snow.
Remarks
Gets a SolidColorFill for the color SpringGreen.
Remarks
Gets a SolidColorFill for the color SteelBlue.
Remarks
Gets a SolidColorFill for the color Tan.
Remarks
Gets a SolidColorFill for the color Teal.
Remarks
Gets a SolidColorFill for the color Thistle.
Remarks
Gets a SolidColorFill for the color Tomato.
Remarks
Gets a SolidColorFill for the color Transparent.
Remarks
Gets a SolidColorFill for the color Turquoise.
Remarks
Gets a SolidColorFill for the color Violet.
Remarks
Gets a SolidColorFill for the color Wheat.
Remarks
Gets a SolidColorFill for the color White.
Remarks
Gets a SolidColorFill for the color WhiteSmoke.
Remarks
Gets a SolidColorFill for the color Yellow.
Remarks
Gets a SolidColorFill for the color YellowGreen.
Remarks
Static Methods
Creates a Fill instance from the given fill-like object by performing automatic type conversion.
Sets the Fill on a given SVG element as the fill.
Remarks
If this Fill is a gradient and implements the ISvgDefsCreator interface, it will be added to the defs
section of the SVG document per the context
. The fill of the given element will be set to a reference to the gradient element.
This method is very similar in functionality to its instance method counter part applyTo. However being static, it also allows for the case where the fill
is null
.
Parameters
A map of options to pass to the method.
- fill - Fill
- The fill that should be applied. If
null
, the element's fill is set tonone
. - element - SVGElement
- The SVG element whose fill should be set.
- context - ICanvasContext
- The context to use for managing possible
defs
entries.