Foxit PDF SDK

Public Member Functions | List of all members
FSDK.GraphicsObjectArray Class Reference

## Public Member Functions
| Add (new_element)
| Add an element at the tail. Potentially growing the array. More...
| constructor ()
| Constructor.
| Find (data, start)
| Find an element from specified position to last. More...
| GetAt (index)
| This method retrieves an element specified by an index number. More...
| InsertAt (index, new_element, count)
| Inset one or more continuous element at specified position. More...
| InsertAt (start_index, new_array)
| Inset an array at specified position. More...
GetSize() | RemoveAll ()
| Get the number of elements in the array. More...
| RemoveAt (index, count)
| Remove a number of elements at specified position. More...
| SetAt (index, new_element)
| This method overwrites an element specified by an index number. More...
| SetAtGrow (index, new_element)
| Set an element value at specified position. Potentially growing the array. More...

## Member Function Documentation

## ◆ Add()

FSDK.GraphicsObjectArray.Add | ( | new_element |  | ) |

Add an element at the tail. Potentially growing the array.

Parameters

  [in] | new_element | The input element.

Returns
  true means success, while false means failure (such as memory error).

## ◆ Find()

FSDK.GraphicsObjectArray.Find | ( | data | ,
|  | start |
| ) |  |

Find an element from specified position to last.

Parameters

  [in] | data | The input element.
  [in] | start | Specifies the zero-based index of start element to find.

Returns
  An index of the found element. -1 means found none.

## ◆ GetAt()

FSDK.GraphicsObjectArray.GetAt | ( | index |  | ) |

This method retrieves an element specified by an index number.

Parameters

  [in] | index | Specifies the zero-based index of the element.

Returns
  An element.

## ◆ InsertAt() [1/2]

FSDK.GraphicsObjectArray.InsertAt | ( | index | ,
|  | new_element | ,
|  | count |
| ) |  |

Inset one or more continuous element at specified position.

Parameters

  [in] | index | Specifies the zero-based index in the array.
  [in] | new_element | Specifies the element value to insert.
  [in] | count | Specifies the count of the element to insert.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ InsertAt() [2/2]

FSDK.GraphicsObjectArray.InsertAt | ( | start_index | ,
|  | new_array |
| ) |  |

Inset an array at specified position.

Parameters

  [in] | start_index | Specifies the zero-based index of start element to insert at.
  [in] | new_array | The input array.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ RemoveAll()

GetSize () FSDK.GraphicsObjectArray.RemoveAll | ( |  | ) |

Get the number of elements in the array.

Returns
  The number of elements in the array.

Get the upper bound in the array, actually the maximum valid index.

Returns
  The upper bound.

Change the allocated size and the grow amount.

Parameters

  [in] | new_size | The new size in elements expected.
  [in] | grow_by | The grow amount in elements expected. This can be -1 for the grow amount unchanged.

Returns
  true means success, while false means failure (such as parameter or memory error).

Clean up the array.

Returns
  None.

## ◆ RemoveAt()

FSDK.GraphicsObjectArray.RemoveAt | ( | index | ,
|  | count |
| ) |  |

Remove a number of elements at specified position.

Parameters

  [in] | index | Specifies the zero-based index in the array.
  [in] | count | Specifies the count of element to remove.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ SetAt()

FSDK.GraphicsObjectArray.SetAt | ( | index | ,
|  | new_element |
| ) |  |

This method overwrites an element specified by an index number.

Parameters

  [in] | index | Specifies the zero-based index of the element.
  [in] | new_element | An element.

Returns
  true means success, while false means failure.

## ◆ SetAtGrow()

FSDK.GraphicsObjectArray.SetAtGrow | ( | index | ,
|  | new_element |
| ) |  |

Set an element value at specified position. Potentially growing the array.

Parameters

  [in] | index | Specifies the zero-based index of element in the array.
  [in] | new_element | The input element.

Returns
  true means success, while false means failure.