SE_shape_add_island

Adds an island ring (donut hole) to an area shape.

Usage syntax

LONG SE_shape_add_island (SE_SHAPE shape, SE_SDEPOINT *pointlist, LONG num_pts);

Parameters
shape A handle to an active shape object
pointlist Address of a list of points that define the boundary of the island
num_pts The number of points in the new island boundary
Description

SE_shape_add_island adds a new island (or ‘donut hole’) to a polygon shape if it can do so without violating any entity rules. The order of the points doesn’t matter as long as the start and endpoints are the same. This function can also change a regular island into an exverted island.

This function returns SE_SHAPE_INTEGRITY_ERROR if an invalid shape would result and leaves the source shape unchanged. The source shape must have enough memory allocated for its point buffers to hold the new island. If the island is not inside an existing outer shell, SE_FAILURE is returned. The z- and m-values are ignored unless the input shape has a z and/or a measures array.

Returns

SE_SUCCESS
SE_CAD_EXISTS

SE_COORD_OUT_OF_BOUNDS

SE_FAILURE

SE_INVALID_ENTITY_TYPE

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_READ_ONLY_SHAPE

SE_SHAPE_INTEGRITY_ERROR

Notes

• If you pass a shape returned from SE_stable_search or SE_stable_get_shape to 'shape', the SE_READ_ONLY_SHAPE error is returned. See 'Shape table functions' for more information.

•  If the source shape has a CAD entity, the SE_CAD_EXISTS error is returned.