Available in the LEADTOOLS Imaging toolkit. |
GetBitmapClipSegments example for Visual Basic
Dim vSegments As Variant
Dim uSegments As Integer
Dim y As Single
LEAD1.ScaleMode = 3 ' use pixels
LEAD1.AutoRepaint = False ' disable repainting
y = LEAD1.RgnTop
' get the clip segments
vSegments = LEAD1.GetBitmapClipSegments(y)
' loop through all the segments
For i = LBound(vSegments) To UBound(vSegments) - 1 Step 2
' for every segment, set all the pixels to black
For j = vSegments(i) To vSegments(i + 1) - 1
LEAD1.Pixel(j, y) = RGB(0, 0, 0)
Next j
Next i
LEAD1.AutoRepaint = True ' re-enable repainting