ArcGIS Pro 2.7 API Reference Guide
GraphicBuffer(Geometry,Double,LineJoinType,LineCapType,Double,Double,Int32) Method
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class > GraphicBuffer Method : GraphicBuffer(Geometry,Double,LineJoinType,LineCapType,Double,Double,Int32) Method
The geometry to buffer
The buffer distance in the unit of the geometry's spatial reference
The line joins
The line caps
The threshold determining when miter joins are replaced with the bevel joins. Use a value of 4 for a good default.
The max deviation of the result buffer from the true buffer in the units of the spatial reference. When maxDeviation is NaN or 0, it is replaced with 1e-5 * abs(distance). When maxDeviation is larger than 0.5 * abs(distance), it is replaced with that value. See the remarks section for more information.
The maximum number of vertices in round polygon produced from a buffered point. A value of 96 is the recommended default value. If the value is less than 12, it is replaced with that value. See the remarks section for more information.
Creates a buffer polygon at the specified distance around the input geometry using graphical joins and caps.
Syntax

Parameters

geometry
The geometry to buffer
distance
The buffer distance in the unit of the geometry's spatial reference
joins
The line joins
caps
The line caps
miterLimit
The threshold determining when miter joins are replaced with the bevel joins. Use a value of 4 for a good default.
maxDeviation
The max deviation of the result buffer from the true buffer in the units of the spatial reference. When maxDeviation is NaN or 0, it is replaced with 1e-5 * abs(distance). When maxDeviation is larger than 0.5 * abs(distance), it is replaced with that value. See the remarks section for more information.
maxVerticesInFullCircle
The maximum number of vertices in round polygon produced from a buffered point. A value of 96 is the recommended default value. If the value is less than 12, it is replaced with that value. See the remarks section for more information.

Return Value

Geometry representing the graphic buffer
Exceptions
ExceptionDescription
Geometry is null or empty
The method is not implemented for GeometryBag or Multipatch.
The buffer distance must be a valid floating point number.
Remarks
The maxDeviation and maxVerticesInFullCircle control the quality of round joins in the buffer. That is, the precision of the buffer is maxDeviation unless the number of required vertices is too large. The maxVerticesInFullCircle controls how many vertices can be in each round join in the buffer. It is approximately equal to the number of vertices in the polygon around a buffered point. It has a priority over maxDeviation. The max deviation is the distance from the result polygon to a true buffer. The real deviation is calculated as the max(maxDeviation, abs(distance) (1 - cos(PI / maxVerticesInFullCircle))).

Note that maxDeviation can be exceeded because geometry is generalized with 0.25 times the real deviation, also input segments closer than 0.25 real deviation are snapped to a point.

Note, this operator is equivalent to Buffer(Geometry,Double) when the joins and caps are round.

See stroke-miterlimit, stroke-linejoin, stroke-linecap parameters in the SVG specification for more info on the graphical parameters.

Example
// mitered join and butt caps
SpatialReference sr = SpatialReferenceBuilder.CreateSpatialReference(102010);
List<Coordinate2D> coords = new List<Coordinate2D>()
{
    new Coordinate2D(1400,6200),
    new Coordinate2D(1600,6300),
    new Coordinate2D(1800,6200)
};

Polyline polyline = PolylineBuilder.CreatePolyline(coords, sr);

Polygon polygon = GeometryEngine.Instance.GraphicBuffer(polyline, 50, LineJoinType.Miter, LineCapType.Butt, 10, 0, -1) as Polygon;

// bevelled join and round caps
Envelope envelope = EnvelopeBuilder.CreateEnvelope(0, 0, 10000, 10000, SpatialReferences.WebMercator);

Polygon outPolygon = GeometryEngine.Instance.GraphicBuffer(envelope, 1000, LineJoinType.Bevel, LineCapType.Round, 4, 0, 96) as Polygon;
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members
Overload List