ArcGIS Runtime SDK for iOS: AGSSimpleFillSymbol Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSSimpleFillSymbol Class Reference

Description

A fill symbol based on simple patterns.

Instances of this class represent simple fill symbols. Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Fill symbols are used with graphics and features which are based on a polygon geometries. The symbol can fill the interior of a polygon with a solid color. In addition, the symbol can have an optional outline which is defined by a line symbol.

Since
100
Inheritance diagram for AGSSimpleFillSymbol:
AGSFillSymbol AGSSymbol AGSObject <AGSJSONSerializable>

Instance Methods

(id< AGSCancelable >) - createSwatchWithBackgroundColor:screen:completion:
 
(id< AGSCancelable >) - createSwatchWithCompletion:
 
(id< AGSCancelable >) - createSwatchWithGeometry:width:height:screen:backgroundColor:completion:
 
(nullable id< AGSCancelable >) - createSwatchWithWidth:height:screen:backgroundColor:completion:
 
(instancetype) - initWithStyle:color:outline:
 
(BOOL) - isEqualToSymbol:
 
(nullable id) - toJSON:
 
(AGSMultilayerPolygonSymbol *) - toMultilayerSymbol
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + simpleFillSymbolWithStyle:color:outline:
 

Properties

AGSColorcolor
 
AGSLineSymboloutline
 
AGSSimpleFillSymbolStyle style
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ createSwatchWithBackgroundColor:screen:completion:

- (id<AGSCancelable>) createSwatchWithBackgroundColor: (nullable AGSColor *)  backgroundColor
screen: (nullable AGSScreen *)  screen
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

Creates swatch with provided background color.

Parameters
backgroundColorDesired background color of the image.
screenScreen that the swatch will be rendered for. If you specify nil then the main screen will be used.
completionA block that is invoked when the operation completes.
Since
100

◆ createSwatchWithCompletion:

- (id<AGSCancelable>) createSwatchWithCompletion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion

Creates a swatch with a clear background color. This method uses main screen's scale to determine the size of the image.

Parameters
completionblock that is invoked when operation completes.
Since
100

◆ createSwatchWithGeometry:width:height:screen:backgroundColor:completion:

- (id<AGSCancelable>) createSwatchWithGeometry: (AGSGeometry *)  geometry
width: (NSInteger)  width
height: (NSInteger)  height
screen: (nullable AGSScreen *)  screen
backgroundColor: (nullable AGSColor *)  backgroundColor
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

Creates a swatch using the provided geometry and other parameters. This is the most configurable of the methods to create swatches. You can pass the pixels per inch that you would like the image to be rendered at. This will determine how many pixels are used to render symbols of sizes that are specified in points.

Parameters
geometryThe geometry of the symbol to be drawn in the swatch image. The specified geometry is in DIPs, with the point {0,0} located at the center of the swatch image. The X-axis increases towards the right side of the swatch image. The Y-axis increases towards the top of the swatch image. For example: when creating a swatch for an AGSMarkerSymbol, specifying a geometry of {10,10} will draw the marker 10 DIPs up and to the right of the center of the swatch. The geometry type (AGSPoint, AGSPolyline, AGSPolygon) should correspond to the symbol type (AGSMarkerSymbol, AGSLineSymbol, AGSFillSymbol). The geometry's spatial reference is ignored.
widthDesired width of the image in pixels.
heightDesired height of the image in pixels.
screenThe screen that the swatch will be rendered for. If you specify nil then the main screen will be used.
backgroundColorThe desired background color of the image.
completionA block that is invoked when operation completes.
Since
100

◆ createSwatchWithWidth:height:screen:backgroundColor:completion:

- (nullable id<AGSCancelable>) createSwatchWithWidth: (NSInteger)  width
height: (NSInteger)  height
screen: (nullable AGSScreen *)  screen
backgroundColor: (nullable AGSColor *)  backgroundColor
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithStyle:color:outline:

- (instancetype) initWithStyle: (AGSSimpleFillSymbolStyle style
color: (AGSColor *)  color
outline: (nullable AGSSimpleLineSymbol *)  outline 

Initialize a simple fill symbol based on the provided parameters

Parameters
styleof fill pattern used by the symbol
colorof fill used by the symbol
outlineof the symbol
Returns
Initialized simple fill symbol
Since
100

◆ isEqualToSymbol:

- (BOOL) isEqualToSymbol: (AGSSymbol *)  other

Compares this symbol to another for equality.

Parameters
otherThe other symbol to compare this one to.
Returns
YES if the two symbols are equal, otherwise NO.
Since
100

◆ simpleFillSymbolWithStyle:color:outline:

+ (instancetype) simpleFillSymbolWithStyle: (AGSSimpleFillSymbolStyle style
color: (AGSColor *)  color
outline: (nullable AGSSimpleLineSymbol *)  outline 

Initialize a simple fill symbol based on the provided parameters

Parameters
styleof fill pattern used by the symbol
colorof fill used by the symbol
outlineof the symbol
Returns
Initialized simple fill symbol
Since
100

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

◆ toMultilayerSymbol

- (AGSMultilayerPolygonSymbol*) toMultilayerSymbol

Returns the multilayer polygon symbol generated from simple fill symbol. The resulting symbol contains a AGSSolidStrokeSymbolLayer to display the symbol outline and either a AGSSolidFillSymbolLayer or AGSHatchFillSymbolLayer to represent the interior fill symbol. If the simple fill uses a cross pattern, two AGSHatchFillSymbolLayer symbol layers are used to represent the fill in the multilayer symbol.

Returns
Multilayer polygon symbol
Since
100.5

Property Documentation

◆ color

- (AGSColor*) color
readwritenonatomicstronginherited

Color to fill the interior of the polygon feature or graphic

Since
100

◆ outline

- (AGSLineSymbol*) outline
readwritenonatomicstronginherited

Outline for the fill symbol

Since
100

◆ style

- (AGSSimpleFillSymbolStyle) style
readwritenonatomicassign

Style of the symbol's fill pattern

Since
100

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100