A queue of FloodFillRanges.
More...
A queue of FloodFillRanges.
◆ FloodFillRangeQueue() [1/2]
| Bio.Graphics.FloodFillRangeQueue.FloodFillRangeQueue |
( |
| ) |
|
21 :this(10000)
22 {
23
24 }
◆ FloodFillRangeQueue() [2/2]
| Bio.Graphics.FloodFillRangeQueue.FloodFillRangeQueue |
( |
int | initialSize | ) |
|
28 {
29 array = new FloodFillRange[initialSize];
30 head = 0;
31 size = 0;
32 }
◆ Dequeue()
The function dequeues the first item in the queue and returns it
- Returns
- FloodFillRange
59 {
60 FloodFillRange range = new FloodFillRange();
61 if (size>0)
62 {
63 range = array[head];
64 array[head] = new FloodFillRange();
65 head++;
66 size--;
67 }
68 return range;
69 }
◆ Enqueue()
The queue is full if the head is at the end of the array
- Parameters
-
44 {
45 if (size+head == array.Length)
46 {
47 FloodFillRange[] newArray = new FloodFillRange[2 * array.Length];
48 Array.Copy(array, head, newArray, 0, size);
49 array = newArray;
50 head = 0;
51 }
52 array[head+(size++)] = r;
53 }
◆ Count
| int Bio.Graphics.FloodFillRangeQueue.Count |
|
get |
16 {
17 get { return size; }
18 }
◆ First
36 {
37 get { return array[head]; }
38 }
The documentation for this class was generated from the following file:
- Graphics/FloodFillRangeQueue.cs