Syntax
Success = BorderImgGetSlices(Border, *LeftEdgeOffset.Integer, *TopEdgeOffset.Integer=#Null, *RightEdgeOffset.Integer=#Null, *BottomEdgeOffset.Integer=#Null)
Description
Retrieves the edge offsets (slices) that define the nine regions of an image border object. These offsets determine the size of the corner and edge pieces. This command is only applicable to borders created with CreateBorderImg().
Parameters
Border
The handle of the image border object.
*LeftEdgeOffset.Integer (optional)
A pointer to an Integer variable to receive
the offset from the left edge of the source image (in pixels).
*TopEdgeOffset.Integer (optional)
A pointer to an Integer variable to receive the
offset from the top edge of the source image (in pixels).
*RightEdgeOffset.Integer (optional)
A pointer to an Integer variable to receive
the offset from the right edge of the source image (in pixels).
*BottomEdgeOffset.Integer (optional)
A pointer to an Integer variable to receive
the offset from the bottom edge of the source image (in pixels).
Return Value
Returns #True if the slice offsets were successfully retrieved, or #False if
the border handle is invalid or not an image border.
Remarks
The slices define a 3x3 grid on the source image: four corners, four edges, and a center area. The rendering flags determine how these areas are drawn (stretched, repeated, etc.).
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyImage = CreateImg(50, 50, RGB(200, 200, 200)) ; Placeholder image
If MyImage
MyBorder = CreateBorderImg(MyImage, 0, 10, 15, 8, 12)
If MyBorder
BorderImgGetSlices(MyBorder, @LSlice, @TSlice, @RSlice, @BSlice)
Debug "Left Slice: " + Str(LSlice)
Debug "Top Slice: " + Str(TSlice)
Debug "Right Slice: " + Str(RSlice)
Debug "Bottom Slice: " + Str(BSlice)
FreeBorder(MyBorder)
EndIf
FreeImg(MyImage)
EndIf
StopProGUI()
See Also
CreateBorderImg, BorderImgSetSlices, BorderImgSetFlags
Supported OS
Windows, Linux