require(["esri/symbols/FillSymbol"], function(FillSymbol) { /* code goes here */ });
Description
(Added at v1.0)
Fill symbols are used to draw polygon features on the graphics layer. Fills can be specified as solid, hatched, or pictures. In addition, the symbol can have an optional outline, which is defined by a line symbol.
FillSymbol has no constructor. Use
SimpleFillSymbol or
PictureFillSymbol.
Samples
Search for
samples that use this class.
Class hierarchy
esri/symbols/Symbol
|_esri/symbols/FillSymbol
Subclasses
Properties
Methods
Property Details
The type of symbol.
Known values: simplemarkersymbol | picturemarkersymbol | simplelinesymbol | cartographiclinesymbol | simplefillsymbol | picturefillsymbol | textsymbol
Method Details
Sets the symbol color.
Parameters:
<Color > color |
Required |
Symbol color. |
Sample:
require([
"esri/Color", ...
], function(Color, ... ) {
symbol.setColor(new Color([255,255,0,0.5]));
...
});
Sets the outline of the fill symbol.
Sample:
require([
"esri/symbols/SimpleLineSymbol", "esri/Color", ...
], function(SimpleLineSymbol, Color, ... ) {
selSymbol.setOutline(new SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255,0,0]), 2));
...
});
Converts object to its ArcGIS Server JSON representation.