Stores the list of bitmaps in a Rhino document.
Properties
Indexers
this[]
#Conceptually, the bitmap table is an array of bitmaps. The operator[] can be used to get individual bitmaps.
Parameters:
| index (int) | zero based array index. |
Returns: Reference to the bitmap. If index is out of range, then null is returned. Note that this reference may become invalid after AddBitmap() is called.
Methods
Adds a new bitmap with specified name to the bitmap table.
Parameters:
| bitmapFilename (string) | If NULL or empty, then a unique name of the form "Bitmap 01" will be automatically created. |
| replaceExisting (bool) | If true and the there is already a bitmap using the specified name, then that bitmap is replaced. If false and there is already a bitmap using the specified name, then -1 is returned. |
Returns: index of new bitmap in table on success. -1 on error.
Clear
public void Clear()
Marks all items as deleted.
Removes the bitmap from the table.
Parameters:
| item (BitmapEntry) | The item to remove. Null will always return false. |
Returns: True if the item could be deleted; otherwise, false.
Overrides: CommonComponentTable<T>.Delete
Deletes a bitmap.
Parameters:
| bitmapFilename (string) | The bitmap file name. |
Returns: true if successful. false if the bitmap cannot be deleted because it is the current bitmap or because it bitmap contains active geometry.
Writes a bitmap to a file.
Exports all the bitmaps in the table to files.
This function first attempts to find the file with "name" on the disk. If it does find it, "fileName" is set to the full path of the file and the BitmapEntry returned will be null, even if there was a BitmapEntry with "name" in the bitmap table. If the function cannot find the file on the disk, it searches the bitmap table. If it finds it, the returned BitmapEntry entry will be the entry in the table with that name. Additionally, if "createFile" is true, and an entry is found, the file will be written to the disk and it's full path will be contained in "fileName".
Parameters:
| name (string) | Name of the file to search for including file extension. |
| createFile (bool) | If this is true, and the file is not found on the disk but is found in the BitmapTable, then the BitmapEntry will get saved to the Rhino bitmap file cache and fileName will contain the full path to the cached file. |
| fileName (out string) | The full path to the current location of this file or an empty string if the file was not found and/or not extracted successfully. |
Returns: Returns null if "name" was found on the disk. If name was not found on the disk, returns the BitmapEntry with the specified name if it is found in the bitmap table and null if it was not found in the bitmap table.
FindId
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
Retrieves a BitmapEntry object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
Parameters:
| index (int) | The index to search for. |
Returns: A BitmapEntry object, or null if none was found.
GetEnumerator
Returns the enumerator that yields all items.
Parameters:
| entry (BitmapEntry) |