BitmapExtensionsGetRegionInclude Method
Gets a region from the specified Bitmap.
Namespace: DevCase.Extensions.BitmapExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Region GetRegionInclude(
this Bitmap bitmap,
Color[] colors
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetRegionInclude (
bitmap As Bitmap,
colors As Color()
) As Region
Dim bitmap As Bitmap
Dim colors As Color()
Dim returnValue As Region
returnValue = bitmap.GetRegionInclude(colors)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Region^ GetRegionInclude(
Bitmap^ bitmap,
array<Color>^ colors
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetRegionInclude :
bitmap : Bitmap *
colors : Color[] -> Region
No code example is currently available or this language may not be supported.
- bitmap Bitmap
-
The source Bitmap.
- colors Color
-
The colors to include.
Region
The resulting
Region.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example that demonstrates how to make a shape transparent Form.
No code example is currently available or this language may not be supported.
Public Class Form1 : Inherits Form
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Needed to make a custom shaped Form.
Me.FormBorderStyle = FormBorderStyle.None
Me.Width = Me.BackgroundImage.Width
Me.Height = Me.BackgroundImage.Height
' Shape the Form
Dim colors As Color() = {Color.FromArgb(0, 0, 0, 0)}
Me.Region = Me.BackgroundImage.GetRegionInclude(colors)
End Sub
End Class
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.