ClassRadBitmap
Represents a bitmap in 32bit ARGB format.
Definition
Namespace:Telerik.Windows.Media.Imaging
Assembly:Telerik.Windows.Controls.dll
Syntax:
public class RadBitmap
Inheritance: objectRadBitmap
Constructors
RadBitmap(BitmapSource)
Initializes a new instance of the RadBitmap class using a BitmapSource.
Declaration
public RadBitmap(BitmapSource image)
Parameters
image
BitmapSource
RadBitmap(FrameworkElement)
Initializes a new instance of the RadBitmap class by taking a snapshot of a FrameworkElement.
Declaration
public RadBitmap(FrameworkElement element)
Parameters
element
FrameworkElement
RadBitmap(RadBitmap)
Initializes a new instance of the RadBitmap class copying the contents from another bitmap.
RadBitmap(RadBitmapData)
Initializes a new instance of the RadBitmap class form an instance of RadBitmapData.
RadBitmap(Stream)
Initializes a new instance of the RadBitmap class using a Stream.
RadBitmap(WriteableBitmap)
Initializes a new instance of the RadBitmap class using a WriteableBitmap as a source.
Declaration
public RadBitmap(WriteableBitmap writableBitmap)
Parameters
writableBitmap
WriteableBitmap
RadBitmap(int, int, FrameworkElement, bool, double, double)
Initializes a new instance of the RadBitmap class by taking a snapshot of a FrameworkElement with a specified width and height.
RadBitmap(int, int, FrameworkElement, double, double)
Initializes a new instance of the RadBitmap class by taking a snapshot of a FrameworkElement with a specified width and height.
RadBitmap(int, int, int[], double, double)
Initializes a new instance of the RadBitmap class by using a pixels array with a specified width and height.
Properties
Bitmap
Gets the WriteableBitmap instance associated with this RadBitmap.
Declaration
public WriteableBitmap Bitmap { get; }
Property Value
WriteableBitmap
Height
Gets the height in pixels of this RadBitmap.
Methods
Crop(int, int, int, int)
Returns a cropped copy of this RadBitmap.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y")]
public RadBitmap Crop(int x, int y, int newWidth, int newHeight)
Parameters
x
The X coordinate of the crop rectangle.
y
The Y coordinate of the crop rectangle.
newWidth
The width of the crop rectangle.
newHeight
The height of the crop rectangle.
Returns
GetPixels()
Gets the pixels array of this RadBitmap in 32bit ARGB format.
Resize(int, int)
Returns a resized copy of this RadBitmap.
Rotate(double, Color)
Returns a rotated copy of this RadBitmap.
Declaration
public RadBitmap Rotate(double degrees, Color backgroundColor)
Parameters
degrees
The angle to rotate the bitmap in degrees. Positive angles are clockwise.
backgroundColor
Color
The color with which to fill the empty spaces.
Returns
The rotated RadBitmap.