GetBitmapClipSegments example for Visual Basic
Dim i As Integer, j As Integer
Dim y As Single
Dim RasterVar As New LEADRasterVariant
LEADRasterView1.Raster.ScaleMode = SCALEMODE_PIXEL ' use pixels
LEADRasterView1.AutoRepaint = False ' disable repainting
y = (LEADRasterView1.Raster.RgnTop + LEADRasterView1.Raster.RgnHeight) / 2
' get the clip segments
RasterVar = LEADRasterView1.Raster.GetBitmapClipSegments(y)
' loop through all the segments
For i = 0 To RasterVar.ItemCount - 1 Step 2
' for every segment, set all the pixels to black
For j = RasterVar.FloatItemValue(i) To RasterVar.FloatItemValue(i + 1) - 1
LEADRasterView1.Raster.Pixel(j, y) = RGB(0, 0, 0)
Next j
Next i
LEADRasterView1.AutoRepaint = True ' re-enable repainting