#include <mi32/bintoreg.h>
Inheritance diagram for BINARYTOREGIONINTERFACE:

Public Member Functions | |
| ERRVALUE | AddSpan (INT32 x1, INT32 x2, INT32 y) |
| ERRVALUE | AddSpanFast (INT32 x1, INT32 x2, INT32 y) |
| ERRVALUE | AddSpansFromBytes (INT32 lin, INT32 col, INT32 len, const UINT8 *buf, bool bFast=false) |
| void | Clear () |
| bool | IsPointOnSpan (INT32 x, INT32 y) const |
| ERRVALUE | ProcessSpans () |
Protected Member Functions | |
| BINARYTOREGIONINTERFACE () | |
| virtual | ~BINARYTOREGIONINTERFACE () |
Private Member Functions | |
| virtual void | v_Clear () |
| virtual ERRVALUE | v_ProcessLine (LPOINT2D *points, int numpts)=0 |
This is a generic base class which can be extended to create any sort of region: REGION2D, X region or Windows Region.
Definition at line 43 of file bintoreg.h.
|
|
|
|
|
|
|
||||||||||||||||
|
Add a span to the region. This is used to transfer the binary object (whatever the source) into a format that this class can use. Note, this method makes sure that the spans are kept in order and combines spans which overlap. If you know you're adding spans in top-to-bottom, left-to-right order, call AddSpanFast() instead. |
|
||||||||||||||||
|
Add a span to the region. This is used to transfer the binary object (whatever the source) into a format that this class can use. Note, no attempt is made to keep the spans sorted or make sure the span does not overlap any existing spans. If you know you're adding spans in top-to-bottom, left-to-right order, you can use this method and it will be much faster than AddSpan() |
|
||||||||||||||||||||||||
|
Add spans to the region from a buffer of UINT8s. This function takes an array of UINT8s representing a raster line and adds spans for all of the non-zero runs. The buffer is treated as one byte per pixel with 0 being false and non-zero being true. The bFast parameter tells the function whether or not you're procssing lines in a top-down order without back-tracking. If you are, pass true and it can add the spans without having to keep them sorted. |
|
|
Clear any existing spans.
|
|
||||||||||||
|
Determine if specified point is on existing span.
|
|
|
Process the spans that have been set.
|
|
|
Clear the current region. Will be called by the Clear() method, which also gets called by the destructor. |
|
||||||||||||
|
Add or remove a line from the region. Note that the points array passed in is not const for a reason. The method is allowed to modify the points in the buffer before adding them to the region. Just don't free the buffer. |
1.3.8-20040913