AutoSegment example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADMRC1->Bitmap = LEADImage1->Bitmap;
LEADMRC1->BaseBackColor = RGB(200, 255, 255);
LEADMRC1->BaseForeColor = RGB(0, 80, 0);
LEADMRC1->StripeMaxHeight = 100;
LEADMRC1->AutoSegment (60, 40, 30);
Caption = "Picture segments will be green-hashed";
}
void __fastcall TForm1::LEADMRC1AutoSegment (int nStripeNo,
int nStripeStartRow, int nStripeEndRow, int nSegmentNo,
int SegmentLeft, int SegmentTop, int SegmentRight, int SegmentBottom,
int nSegType, DWORD crTextForeColor, DWORD crTextBackColor)
{
LEADImage1->DrawFillStyle = bsDiagCross;
LEADImage1->DrawPenWidth = 6;
LEADImage1->DrawPenColor = clYellow;
if (nSegType == SEGMENT_PICTURE)
LEADImage1->DrawFillColor = clGreen;
else
LEADImage1->DrawFillColor = clRed;
LEADImage1->DrawRectangle (SegmentLeft, SegmentTop, SegmentRight - SegmentLeft, SegmentBottom - SegmentTop);
}