BorderImgGetFlags

Syntax

Flags = BorderImgGetFlags(Border)

Description

Retrieves the rendering flags currently set for an image border object. This command is only applicable to borders created with CreateBorderImg().

Parameters

Border
The handle of the image border object.

Return Value

Returns an integer representing the combination of rendering flags currently applied to the border. Returns 0 or #False if the border handle is invalid or not an image border.

Remarks

The returned value is a combination of the #PG_BorderImg_* constants originally passed to CreateBorderImg() or subsequently set using BorderImgSetFlags(). These flags control aspects like masking, edge rendering (stretch, repeat, round, space), and center area rendering.

Example

IncludeFile "ProGUI_PB.pbi"

StartProGUI()

MyImage = CreateImg(50, 50, RGB(200, 200, 200)) ; Placeholder image

If MyImage
  ; Create border repeating on top/bottom, stretching on left/right
  MyBorder = CreateBorderImg(MyImage, 0, 10, 10, 10, 10, #PG_BorderImg_RepeatTop | #PG_BorderImg_RepeatBottom | #PG_BorderImg_StretchLeft | #PG_BorderImg_StretchRight)

  If MyBorder
    CurrentFlags = BorderImgGetFlags(MyBorder)
    Debug "Border Image Flags: " + Bin(CurrentFlags)
  
    If CurrentFlags & #PG_BorderImg_RepeatTop
      Debug "- Top edge repeats"
    EndIf
    If CurrentFlags & #PG_BorderImg_StretchLeft
      Debug "- Left edge stretches"
    EndIf
    ; ... check other flags ...

    FreeBorder(MyBorder)
  EndIf
  FreeImg(MyImage)
EndIf

StopProGUI()

See Also

CreateBorderImg, BorderImgSetFlags, BorderImgGetSlices, BorderImgGetWidth

Supported OS

Windows, Linux