AutoSegment example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
begin
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';
end;
procedure TForm1.LEADMRC1AutoSegment(nStripeNo, nStripeStartRow,
nStripeEndRow, nSegmentNo, SegmentLeft, SegmentTop, SegmentRight,
SegmentBottom, nSegType: Integer; crTextForeColor,
crTextBackColor: Cardinal);
begin
LEADImage1.DrawFillStyle := bsDiagCross;
LEADImage1.DrawPenWidth := 6;
LEADImage1.DrawPenColor := clYellow;
if (nSegType = SEGMENT_PICTURE) then
LEADImage1.DrawFillColor:= clGreen
else
LEADImage1.DrawFillColor:= clRed;
LEADImage1.DrawRectangle (SegmentLeft, SegmentTop, SegmentRight - SegmentLeft, SegmentBottom - SegmentTop);
end;