PolygonKit

class HPS.PolygonKit : public HPS.Kit

The PolygonKit class is a user space object. It is a kit analog to a PolygonKey.

Public Functions

void Consume (HPS.PolygonKit in_kit)

Copies the source PolygonKit into this LineKit and resets the source kit.

Param in_kit

The source PolygonKit to consume.

override void Dispose ()
HPS.PolygonKit EditPointsByDeletion (ulong in_offset, ulong in_count)

Remove the specified number of points from this PolygonKit at the specified offset.

Param in_offset

The offset into the points for PolygonKit at which to remove points.

Param in_count

The number of points to remove.

Return

A reference to this PolygonKit.

HPS.PolygonKit EditPointsByInsertion (ulong in_offset, HPS.Point[] in_points)

Add points to this PolygonKit at the specified offset.

Param in_offset

The offset into the points for PolygonKit at which to add points.

Param in_points

The points to add to this PolygonKit.

Return

A reference to this PolygonKit.

HPS.PolygonKit EditPointsByReplacement (ulong in_offset, HPS.Point[] in_points)

Replace the specified number of points for this PolygonKit at the specified offset.

Param in_offset

The offset into the points for PolygonKit at which to start replacing points.

Param in_points

The points to use to replace those on this PolygonKit.

Return

A reference to this PolygonKit.

override bool Empty ()

Indicates whether this PolygonKit has any values set on it.

Return

true if no values are set on this PolygonKit, false otherwise.

bool Equals (HPS.PolygonKit in_kit)

Check if the source PolygonKit is equivalent to this PolygonKit.

Param in_kit

The source PolygonKit to compare to this PolygonKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
ulong GetPointCount ()

Retrieves the number of points in this polygon.

Return

The number of points in this polygon.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

PolygonKit ()

The default constructor creates an empty PolygonKit object.

PolygonKit (HPS.PolygonKit in_kit)

The copy constructor creates a new PolygonKit object that contains the same settings as the source PolygonKit.

Param in_kit

The source PolygonKit to copy.

void Set (HPS.PolygonKit in_kit)

Copies the source PolygonKit into this PolygonKit.

Param in_kit

The source PolygonKit to copy.

HPS.PolygonKit SetPoints (HPS.Point[] in_points)

Sets the points for this PolygonKit.

Param in_points

The points for this PolygonKit.

Return

A reference to this PolygonKit.

HPS.PolygonKit SetPriority (int in_priority)

Assigns a specific drawing priority value to the PolygonKit. It affects the order in which the contents of this segment are drawn if and only if the rendering algorithm is set to Priority.

See

SubwindowKit.SetPriority()

See

SubwindowKit.SetRenderingAlgorithm()

Param in_priority

The drawing priority, higher priority items are drawn on top of lower priority items.

Return

A reference to this object.

HPS.PolygonKit SetUserData (IntPtr in_index, byte[] in_data)

Sets user data on this kit.

Param in_index

The index of the user data to set.

Param in_data

The bytes of user data to set.

Return

A reference to this kit.

HPS.PolygonKit SetUserData (IntPtr in_index, ulong in_bytes, byte[] in_data)

Sets user data on this kit.

Param in_index

The index of the user data to set.

Param in_bytes

The number of bytes of user data to set.

Param in_data

The bytes of user data to set.

Return

A reference to this kit.

HPS.PolygonKit SetUserData (IntPtr[] in_indices, byte[][] in_data)

Sets user data on this kit.

Param in_indices

An array of user data indices to set.

Param in_data

An array of bytes of user data to set.

Return

A reference to this kit.

void Show (out HPS.PolygonKit out_kit)

Copies this PolygonKit into the given PolygonKit.

Param out_kit

The PolygonKit to populate with the contents of this PolygonKit.

bool ShowPoints (out HPS.Point[] out_points)

Shows the points for this PolygonKit.

Param out_points

The points for this PolygonKit.

Return

true if points were set, false otherwise.

bool ShowPointsByList (ulong[] in_indices, out HPS.Point[] out_points)

Show a subset of the points for this PolygonKit by list.

Param in_indices

The list of point indices to show.

Param out_points

The requested points for this PolygonKit.

Return

true if all requested points were set, false otherwise.

bool ShowPointsByRange (ulong in_start_index, ulong in_count, out HPS.Point[] out_points)

Show a subset of the points for this PolygonKit by range.

Param in_start_index

The first point to show.

Param in_count

The number of points to show.

Param out_points

The requested points for this PolygonKit.

Return

true if all requested points were set, false otherwise.

bool ShowPriority (out int out_priority)

Shows the drawing priority.

Param out_priority

The drawing priority, higher priority items are drawn on top of lower priority items.

Return

true if the setting is valid, false otherwise.

bool ShowUserData (IntPtr in_index, out byte[] out_data)

Shows the user data at a given index for this kit.

Param in_index

The index of the user data to show.

Param out_data

The user data at the given index.

Return

true if there is user data at the given index, false otherwise.

bool ShowUserData (out IntPtr[] out_indices, out byte[][] out_data)

Shows all user data for this kit.

Param out_indices

An array of all user data indices set on this kit.

Param out_data

An array of all user data set on this kit.

Return

true if there is user data on this kit, false otherwise.

ulong ShowUserDataCount ()

Get the number of user data indices set on this kit.

bool ShowUserDataIndices (out IntPtr[] out_indices)

Shows the indices of all user data set on this kit.

Param out_indices

The user data indices set on this kit.

Return

The number of user data indices set on this kit.

HPS.Point[] Triangulate ()

Divides the polygon into triangles. Note that the data in this kit is left untouched. If the polygon is self-intersecting, the intersection points will be calculated and taken into account If an error is encountered while triangulating the polygon, the returned array will be empty.

Return

An array of points. Each triplet of points represents one of the triangle that was computed. For example, the returned values 0th, 1st and 2nd points represent the first triangle, and the 3rd, 4th and 5th points represent second one, and so forth.

HPS.PolygonKit UnsetAllUserData ()

Removes all user data from this kit.

Return

A reference to this kit.

HPS.PolygonKit UnsetEverything ()

Removes all settings from this PolygonKit.

Return

A reference to this PolygonKit.

HPS.PolygonKit UnsetPoints ()

Removes the points for this PolygonKit.

Return

A reference to this PolygonKit.

HPS.PolygonKit UnsetPriority ()

Removes a drawing priority setting.

Return

A reference to this object.

HPS.PolygonKit UnsetUserData (IntPtr in_index)

Removes the user data at the given index from this kit.

Param in_index

The index of the user data to remove.

Return

A reference to this kit.

HPS.PolygonKit UnsetUserData (IntPtr[] in_indices)

Removes the user data at the given indices from this kit.

Param in_indices

The indices of the user data to remove.

Return

A reference to this kit.

Public Static Functions

bool operator!= (HPS.PolygonKit a, HPS.PolygonKit b)
bool operator== (HPS.PolygonKit a, HPS.PolygonKit b)