Class GdiPlusApi
GDIplus Helpers
Inheritance
System.Object
GdiPlusApi
Namespace: Dapplo.Windows.Gdi32
Assembly: Dapplo.Windows.Gdi32.dll
Syntax
public static class GdiPlusApi : object
Methods
| Improve this Doc View SourceApplyBlur(Bitmap, Rectangle, Int32, Boolean)
Use the GDI+ blur effect on the bitmap
Declaration
public static bool ApplyBlur(Bitmap destinationBitmap, Rectangle area, int radius, bool expandEdges)
Parameters
Type | Name | Description |
---|---|---|
Bitmap | destinationBitmap | Bitmap to apply the effect to |
Rectangle | area | Rectangle to apply the blur effect to |
System.Int32 | radius | 0-255 |
System.Boolean | expandEdges | bool true if the edges are expanded with the radius |
Returns
Type | Description |
---|---|
System.Boolean | false if there is no GDI+ available or an exception occured |
DrawWithBlur(Graphics, Bitmap, Rectangle, Matrix, ImageAttributes, Int32, Boolean)
Draw the image on the graphics with GDI+ blur effect
Declaration
public static bool DrawWithBlur(Graphics graphics, Bitmap image, Rectangle source, Matrix transform, ImageAttributes imageAttributes, int radius, bool expandEdges)
Parameters
Type | Name | Description |
---|---|---|
Graphics | graphics | |
Bitmap | image | |
Rectangle | source | |
Matrix | transform | |
ImageAttributes | imageAttributes | |
System.Int32 | radius | |
System.Boolean | expandEdges |
Returns
Type | Description |
---|---|
System.Boolean | false if there is no GDI+ available or an exception occured |
IsBlurPossible(Int32)
Returns if a GDIPlus blur can be made for the supplied radius. This accounts for the "bug" I reported here: http://social.technet.microsoft.com/Forums/en/w8itprogeneral/thread/99ddbe9d-556d-475a-8bab-84e25aa13a2c
Declaration
public static bool IsBlurPossible(int radius)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | radius |
Returns
Type | Description |
---|---|
System.Boolean | false if blur is not possible |