Center = Bit.AND(Label1.Gravity, Gravity.Center)
Center = Bit.OR(Center, Bit.AND(Label1.Gravity, Gravity.CENTER_HORIZONTAL))
Center = Bit.OR(Center, Bit.AND(Label1.Gravity, Gravity.CENTER_VERTICAL))
If Center = Gravity.Center Then
Log("Center")
End If
I'm not sure that I have understood correctly what you want to achieve, but could you instead use a Map?
The 'key' can be the different label gravity's and the 'value' can be whatever gravity you what it converted to.