Exemple #1
0
  /**
   * Replaces the Pix and Box at the specified index with the specified Pix and Box, both of which
   * may be recycled after calling this method.
   *
   * @param index The index of the Pix to replace.
   * @param pix The Pix to replace the existing Pix.
   * @param box The Box to replace the existing Box.
   */
  public void replacePix(int index, Pix pix, Box box) {
    if (mRecycled) throw new IllegalStateException();

    nativeReplacePix(mNativePixa, index, pix.getNativePix(), box.getNativeBox());
  }
Exemple #2
0
  /**
   * Adds a Pix and associated Box to this Pixa.
   *
   * @param pix The Pix to add.
   * @param box The Box to add.
   * @param mode The mode in which to add this Pix and Box, typically Constants.L_CLONE.
   */
  public void add(Pix pix, Box box, int mode) {
    if (mRecycled) throw new IllegalStateException();

    nativeAdd(mNativePixa, pix.getNativePix(), box.getNativeBox(), mode);
  }