WriteableBitmapEx Collection of interchange extension methods for the Silverlight WriteableBitmap class. Collection of draw extension methods for the Silverlight WriteableBitmap class. Collection of draw extension methods for the Silverlight WriteableBitmap class. Collection of blit (copy) extension methods for the Silverlight WriteableBitmap class. Collection of draw extension methods for the Silverlight WriteableBitmap class. Collection of draw spline extension methods for the Silverlight WriteableBitmap class. Collection of transformation extension methods for the Silverlight WriteableBitmap class. Copies the Pixels from the WriteableBitmap into a ARGB byte array starting at a specific Pixels index. The WriteableBitmap. The starting Pixels index. The number of Pixels to copy. The color buffer as byte ARGB values. Copies the Pixels from the WriteableBitmap into a ARGB byte array. The WriteableBitmap. The number of pixels to copy. The color buffer as byte ARGB values. Copies all the Pixels from the WriteableBitmap into a ARGB byte array. The WriteableBitmap. The color buffer as byte ARGB values. Copies color information from an ARGB byte array into this WriteableBitmap starting at a specific buffer index. The WriteableBitmap. The starting index in the buffer. The number of bytes to copy from the buffer. The color buffer as byte ARGB values. The WriteableBitmap that was passed as parameter. Copies color information from an ARGB byte array into this WriteableBitmap. The WriteableBitmap. The number of bytes to copy from the buffer. The color buffer as byte ARGB values. The WriteableBitmap that was passed as parameter. Copies all the color information from an ARGB byte array into this WriteableBitmap. The WriteableBitmap. The color buffer as byte ARGB values. The WriteableBitmap that was passed as parameter. Writes the WriteableBitmap as a TGA image to a stream. Used with permission from Nokola: http://nokola.com/blog/post/2010/01/21/Quick-and-Dirty-Output-of-WriteableBitmap-as-TGA-Image.aspx The WriteableBitmap. The destination stream. Loads an image from the applications resource file and fills this WriteableBitmap with it. The WriteableBitmap. Only the relative path to the resource file. The assembly name is retrieved automatically. The WriteableBitmap that was passed as parameter. Draws a colored line by connecting two points using the Bresenham algorithm. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using the Bresenham algorithm. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using a DDA algorithm (Digital Differential Analyzer). The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using a DDA algorithm (Digital Differential Analyzer). The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using an optimized DDA. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using an optimized DDA. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a colored line by connecting two points using an optimized DDA. Uses the pixels array and the width directly for best performance. An array containing the pixels as int RGBA value. The width of one scanline in the pixels array. The height of the bitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the end point. The y-coordinate of the end point. The color for the line. Draws a polyline. Add the first point also at the end of the array if the line should be closed. The WriteableBitmap. The points of the polyline in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). The color for the line. Draws a polyline. Add the first point also at the end of the array if the line should be closed. The WriteableBitmap. The points of the polyline in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). The color for the line. Draws a triangle. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The color. Draws a triangle. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The color. Draws a quad. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The x-coordinate of the 4th point. The y-coordinate of the 4th point. The color. Draws a quad. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The x-coordinate of the 4th point. The y-coordinate of the 4th point. The color. Draws a rectangle. x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color. Draws a rectangle. x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color. A Fast Bresenham Type Algorithm For Drawing Ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color for the line. A Fast Bresenham Type Algorithm For Drawing Ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color for the line. A Fast Bresenham Type Algorithm For Drawing Ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf Uses a different parameter representation than DrawEllipse(). The WriteableBitmap. The x-coordinate of the ellipses center. The y-coordinate of the ellipses center. The radius of the ellipse in x-direction. The radius of the ellipse in y-direction. The color for the line. A Fast Bresenham Type Algorithm For Drawing Ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf Uses a different parameter representation than DrawEllipse(). The WriteableBitmap. The x-coordinate of the ellipses center. The y-coordinate of the ellipses center. The radius of the ellipse in x-direction. The radius of the ellipse in y-direction. The color for the line. Fills the whole WriteableBitmap with a color. The WriteableBitmap. The color used for filling. Fills the whole WriteableBitmap with an empty color (0). The WriteableBitmap. Clones the specified WriteableBitmap. The WriteableBitmap. A copy of the WriteableBitmap. Applies the given function to all the pixels of the bitmap in order to set their color. The WriteableBitmap. The function to apply. With parameters x, y and a color as a result Applies the given function to all the pixels of the bitmap in order to set their color. The WriteableBitmap. The function to apply. With parameters x, y, source color and a color as a result Gets the color of the pixel at the x, y coordinate as integer. The WriteableBitmap. The x coordinate of the pixel. The y coordinate of the pixel. The color of the pixel at x, y. Gets the color of the pixel at the x, y coordinate as a Color struct. The WriteableBitmap. The x coordinate of the pixel. The y coordinate of the pixel. The color of the pixel at x, y as a Color struct. Sets the color of the pixel using a precalculated index (faster). The WriteableBitmap. The coordinate index. The red value of the color. The green value of the color. The blue value of the color. Sets the color of the pixel. The WriteableBitmap. The x coordinate (row). The y coordinate (column). The red value of the color. The green value of the color. The blue value of the color. Sets the color of the pixel including the alpha value and using a precalculated index (faster). The WriteableBitmap. The coordinate index. The alpha value of the color. The red value of the color. The green value of the color. The blue value of the color. Sets the color of the pixel including the alpha value. The WriteableBitmap. The x coordinate (row). The y coordinate (column). The alpha value of the color. The red value of the color. The green value of the color. The blue value of the color. Sets the color of the pixel using a precalculated index (faster). The WriteableBitmap. The coordinate index. The color. Sets the color of the pixel. The WriteableBitmap. The x coordinate (row). The y coordinate (column). The color. Sets the color of the pixel using an extra alpha value and a precalculated index (faster). The WriteableBitmap. The coordinate index. The alpha value of the color. The color. Sets the color of the pixel using an extra alpha value. The WriteableBitmap. The x coordinate (row). The y coordinate (column). The alpha value of the color. The color. Sets the color of the pixel using a precalculated index (faster). The WriteableBitmap. The coordinate index. The color. Sets the color of the pixel. The WriteableBitmap. The x coordinate (row). The y coordinate (column). The color. Copies (blits) the pixels from the WriteableBitmap source to the destination WriteableBitmap (this). The destination WriteableBitmap. The rectangle that defines the destination region. The source WriteableBitmap. The rectangle that will be copied from the source to the destination. The blending mode . Copies (blits) the pixels from the WriteableBitmap source to the destination WriteableBitmap (this). The destination WriteableBitmap. The rectangle that defines the destination region. The source WriteableBitmap. The rectangle that will be copied from the source to the destination. Copies (blits) the pixels from the WriteableBitmap source to the destination WriteableBitmap (this). The destination WriteableBitmap. The destination position in the destination bitmap. The source WriteableBitmap. The rectangle that will be copied from the source to the destination. If not Colors.White, will tint the source image. A partially transparent color and the image will be drawn partially transparent. The blending mode . Copies (blits) the pixels from the WriteableBitmap source to the destination WriteableBitmap (this). The destination WriteableBitmap. The rectangle that defines the destination region. The source WriteableBitmap. The rectangle that will be copied from the source to the destination. If not Colors.White, will tint the source image. A partially transparent color and the image will be drawn partially transparent. The blending mode . Draws a filled rectangle. x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color. Draws a filled rectangle. x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color. A Fast Bresenham Type Algorithm For Drawing filled ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color for the line. A Fast Bresenham Type Algorithm For Drawing filled ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf x2 has to be greater than x1 and y2 has to be greater than y1. The WriteableBitmap. The x-coordinate of the bounding rectangle's left side. The y-coordinate of the bounding rectangle's top side. The x-coordinate of the bounding rectangle's right side. The y-coordinate of the bounding rectangle's bottom side. The color for the line. A Fast Bresenham Type Algorithm For Drawing filled ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf Uses a different parameter representation than DrawEllipse(). The WriteableBitmap. The x-coordinate of the ellipses center. The y-coordinate of the ellipses center. The radius of the ellipse in x-direction. The radius of the ellipse in y-direction. The color for the line. A Fast Bresenham Type Algorithm For Drawing filled ellipses http://homepage.smc.edu/kennedy_john/belipse.pdf Uses a different parameter representation than DrawEllipse(). The WriteableBitmap. The x-coordinate of the ellipses center. The y-coordinate of the ellipses center. The radius of the ellipse in x-direction. The radius of the ellipse in y-direction. The color for the line. Draws a filled polygon. Add the first point also at the end of the array if the line should be closed. The WriteableBitmap. The points of the polygon in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). The color for the line. Draws a filled polygon. Add the first point also at the end of the array if the line should be closed. The WriteableBitmap. The points of the polygon in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). The color for the line. Draws a filled quad. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The x-coordinate of the 4th point. The y-coordinate of the 4th point. The color. Draws a filled quad. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The x-coordinate of the 4th point. The y-coordinate of the 4th point. The color. Draws a filled triangle. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The color. Draws a filled triangle. The WriteableBitmap. The x-coordinate of the 1st point. The y-coordinate of the 1st point. The x-coordinate of the 2nd point. The y-coordinate of the 2nd point. The x-coordinate of the 3rd point. The y-coordinate of the 3rd point. The color. Draws a filled, cubic Beziér spline defined by start, end and two control points. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the 1st control point. The y-coordinate of the 1st control point. The x-coordinate of the 2nd control point. The y-coordinate of the 2nd control point. The x-coordinate of the end point. The y-coordinate of the end point. The color. The pixels array. The width of the bitmap. The height of the bitmap. Draws a series of filled, cubic Beziér splines each defined by start, end and two control points. The ending point of the previous curve is used as starting point for the next. Therfore the inital curve needs four points and the subsequent 3 (2 control and 1 end point). The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, cx1, cy1, cx2, cy2, x2, y2, cx3, cx4 ..., xn, yn). The color for the spline. Draws a series of filled, cubic Beziér splines each defined by start, end and two control points. The ending point of the previous curve is used as starting point for the next. Therfore the inital curve needs four points and the subsequent 3 (2 control and 1 end point). The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, cx1, cy1, cx2, cy2, x2, y2, cx3, cx4 ..., xn, yn). The color for the spline. Computes the discrete segment points of a Cardinal spline (cubic) defined by four control points. The x-coordinate of the 1st control point. The y-coordinate of the 1st control point. The x-coordinate of the 2nd control point. The y-coordinate of the 2nd control point. The x-coordinate of the 3rd control point. The y-coordinate of the 3rd control point. The x-coordinate of the 4th control point. The y-coordinate of the 4th control point. The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color. The pixels array. The width of the bitmap. The height of the bitmap. Draws a filled Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a filled Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a filled, closed Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a filled, closed Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a cubic Beziér spline defined by start, end and two control points. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the 1st control point. The y-coordinate of the 1st control point. The x-coordinate of the 2nd control point. The y-coordinate of the 2nd control point. The x-coordinate of the end point. The y-coordinate of the end point. The color. Draws a cubic Beziér spline defined by start, end and two control points. The WriteableBitmap. The x-coordinate of the start point. The y-coordinate of the start point. The x-coordinate of the 1st control point. The y-coordinate of the 1st control point. The x-coordinate of the 2nd control point. The y-coordinate of the 2nd control point. The x-coordinate of the end point. The y-coordinate of the end point. The color. Draws a series of cubic Beziér splines each defined by start, end and two control points. The ending point of the previous curve is used as starting point for the next. Therfore the inital curve needs four points and the subsequent 3 (2 control and 1 end point). The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, cx1, cy1, cx2, cy2, x2, y2, cx3, cx4 ..., xn, yn). The color for the spline. Draws a series of cubic Beziér splines each defined by start, end and two control points. The ending point of the previous curve is used as starting point for the next. Therfore the inital curve needs four points and the subsequent 3 (2 control and 1 end point). The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, cx1, cy1, cx2, cy2, x2, y2, cx3, cx4 ..., xn, yn). The color for the spline. Draws a segment of a Cardinal spline (cubic) defined by four control points. The x-coordinate of the 1st control point. The y-coordinate of the 1st control point. The x-coordinate of the 2nd control point. The y-coordinate of the 2nd control point. The x-coordinate of the 3rd control point. The y-coordinate of the 3rd control point. The x-coordinate of the 4th control point. The y-coordinate of the 4th control point. The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color. The pixels array. The width of the bitmap. The height of the bitmap. Draws a Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a closed Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Draws a closed Cardinal spline (cubic) defined by a point collection. The cardinal spline passes through each point in the collection. The WriteableBitmap. The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn). The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line. The color for the spline. Creates a new cropped WriteableBitmap. The WriteableBitmap. The x coordinate of the rectangle that defines the crop region. The y coordinate of the rectangle that defines the crop region. The width of the rectangle that defines the crop region. The height of the rectangle that defines the crop region. A new WriteableBitmap that is a cropped version of the input. Creates a new cropped WriteableBitmap. The WriteableBitmap. The rectangle that defines the crop region. A new WriteableBitmap that is a cropped version of the input. Creates a new resized WriteableBitmap. The WriteableBitmap. The new desired width. The new desired height. The interpolation method that should be used. A new WriteableBitmap that is a resized version of the input. The blending mode. Alpha blendiing uses the alpha channel to combine the source and destination. Additive blending adds the colors of the source and the destination. Subtractive blending subtracts the source color from the destination. Uses the source color as a mask. Multiplies the source color with the destination color. No blending just copies the pixels from the source. The interpolation method. The nearest neighbor algorithm simply selects the color of the nearest pixel. Linear interpolation in 2D using the average of 3 neighboring pixels.