Public Member Functions | |
def | detail |
Measures the detail of the region of the grid between the points corner and corner+dims. | |
def | aproximate |
Aproximates the region of the grid between corner and corner+dims. | |
def | blend |
Blends two node values. | |
def | blend3 |
Blends three node values. | |
def | outline_color |
Returns a colour that is used to draw the edges of a quadtree. |
Definition at line 53 of file quadtree_image.py.
def quadtree_image.ChannelMeasure.aproximate | ( | self, | ||
grid, | ||||
corner, | ||||
dims | ||||
) |
Aproximates the region of the grid between corner and corner+dims.
The return type must be the same as the data content type of the tree's node in which this AbstractMeasure is used.
Reimplemented from quadtree.AbstractMeasure.
Definition at line 69 of file quadtree_image.py.
def quadtree_image.ChannelMeasure.blend | ( | self, | ||
col1, | ||||
col2, | ||||
ratio | ||||
) |
Blends two node values.
Ratio is a value between 0 and 1. If it is 0, the second value is returned. If it is 1, the first value is returned.
Reimplemented from quadtree.AbstractMeasure.
Definition at line 83 of file quadtree_image.py.
def quadtree_image.ChannelMeasure.blend3 | ( | self, | ||
col1, | ||||
col2, | ||||
col3, | ||||
ratio1, | ||||
ratio2, | ||||
ratio3 | ||||
) |
Blends three node values.
The three ratios must add up to 1. If the three ratios are 0 1 0, the result is the same as the second value.
Reimplemented from quadtree.AbstractMeasure.
Definition at line 88 of file quadtree_image.py.
def quadtree_image.ChannelMeasure.detail | ( | self, | ||
grid, | ||||
corner, | ||||
dims, | ||||
bias | ||||
) |
Measures the detail of the region of the grid between the points corner and corner+dims.
Returns a value between 0 and 1. (0 is no detail, 1 is full detail). The bias can be ignored - it is the ratio of cells to the entire grid represented by the piece of node.
Reimplemented from quadtree.AbstractMeasure.
Definition at line 54 of file quadtree_image.py.
def quadtree_image.ChannelMeasure.outline_color | ( | self | ) |
Returns a colour that is used to draw the edges of a quadtree.
Definition at line 94 of file quadtree_image.py.