@kBessa:
I've currently extended your text plugin with these 4 extensions. Take a look if you mind implements them in your plugin. They draw a bordered text.
#Region "Extensions for light plugins"
<Runtime.CompilerServices.Extension()> Public Sub WriteBordered(ByVal value As LightPlugins.Text.AdvancedText, ByVal X As Integer, ByVal Y As Integer, ByVal Text As String)
value.Write(X - 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X - 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X, Y, Text)
End Sub
<Runtime.CompilerServices.Extension()> Public Sub WriteBordered(ByVal value As LightPlugins.Text.AdvancedText, ByVal X As Integer, ByVal Y As Integer, ByVal Text As String, ByVal Color As Drawing.Color)
value.Write(X - 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X - 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X, Y, Text, Color)
End Sub
<Runtime.CompilerServices.Extension()> Public Sub WriteBorderedCentered(ByVal value As LightPlugins.Text.AdvancedText, ByVal X As Integer, ByVal Y As Integer, ByVal Text As String)
X -= value.GetTextWidth(Text) >> 1
value.Write(X - 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X - 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X, Y, Text)
End Sub
<Runtime.CompilerServices.Extension()> Public Sub WriteBorderedCentered(ByVal value As LightPlugins.Text.AdvancedText, ByVal X As Integer, ByVal Y As Integer, ByVal Text As String, ByVal Color As Drawing.Color)
X -= value.GetTextWidth(Text) >> 1
value.Write(X - 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X - 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y + 1, Text, Drawing.Color.Black)
value.Write(X + 1, Y - 1, Text, Drawing.Color.Black)
value.Write(X, Y, Text, Color)
End Sub
#End Region
You could also add overloaded versions to change the border color.
Yoda
Fear leads to anger
Anger leads to hate
Hate leads to suffering