Foxit PDF SDK

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

An array of RectF objects. More...

## Public Member Functions
| Add (ewElement)
| Add an element at the tail. Potentially growing the array. More...
| constructor ()
| Construct a rect not initialized.
| 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...
| GetSize ()
| Get the number of elements in the array. More...
| GetUpperBound ()
| Get the upper bound in the array, actually the maximum valid index. 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...
| RemoveAll ()
| Clean up 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...
| SetSize (new_size, grow_by)
| Change the allocated size and the grow amount. More...

## Detailed Description

An array of RectF objects.

## Member Function Documentation

## ◆ Add()

FSDK.RectFArray.Add | ( | ewElement |  | ) |

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.RectFArray.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.RectFArray.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.

## ◆ GetSize()

FSDK.RectFArray.GetSize | ( |  | ) |

Get the number of elements in the array.

Returns
  The number of elements in the array.

## ◆ GetUpperBound()

FSDK.RectFArray.GetUpperBound | ( |  | ) |

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

Returns
  The upper bound.

## ◆ InsertAt() [1/2]

FSDK.RectFArray.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.RectFArray.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()

FSDK.RectFArray.RemoveAll | ( |  | ) |

Clean up the array.

Returns
  None.

## ◆ RemoveAt()

FSDK.RectFArray.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.RectFArray.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.RectFArray.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.

## ◆ SetSize()

FSDK.RectFArray.SetSize | ( | new_size | ,
|  | grow_by |
| ) |  |

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).