MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
virtual MgGeometry* MgGeometry::Buffer ( double  distance,
MgMeasure measure 
) [virtual]

Returns a geometry that represents all points whose distance from this geometric entity is less than or equal to a given distance. By default, the distance computation is done using a linear algorithm unless a custom measure is supplied.

Remarks:
This method returns NULL when using a negative offset with points, lines, and curves. When using a negative offset with polygons, the method returns NULL if the offset causes the buffered polygon to shrink to zero area.
.NET Syntax
virtual MgGeometry Buffer(double distance, MgMeasure measure);
Java Syntax
virtual MgGeometry Buffer(double distance, MgMeasure measure);
PHP Syntax
virtual MgGeometry Buffer(double distance, MgMeasure measure);
Parameters:
distance(double) The distance from the geometry in units. This value cannot be zero.
measure(MgMeasure) The MgMeasure instance to use when computing the buffer. If null, a linear distance algorithm is used.
Returns:
An MgGeometry that represents the geometric entity's buffer, or NULL if the geometry cannot be buffered.