Class WriteableBitmapExtensions
Represents the class implementation of WriteableBitmapExtensions.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.WPF.dll
Syntax
public static class WriteableBitmapExtensions
Methods
BeginWrite(WriteableBitmap)
Prepares the bitmap for pixel manipulation.
Declaration
public static void BeginWrite(this WriteableBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp |
Clear(WriteableBitmap)
Clears the BitmapContext, filling the underlying bitmap with zeros
Declaration
[TargetedPatchingOptOut("Candidate for inlining across NGen boundaries for performance reasons")]
public static void Clear(this WriteableBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp |
DrawEllipse(WriteableBitmap, Int32, Int32, Int32, Int32, Int32)
A Fast Bresenham Type Algorithm For Drawing Ellipses. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void DrawEllipse(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Int32 | color | The color for the line. |
DrawEllipse(WriteableBitmap, Int32, Int32, Int32, Int32, Color)
A Fast Bresenham Type Algorithm For Drawing Ellipses. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void DrawEllipse(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Windows.Media.Color | color | The color for the line. |
DrawEllipseCentered(WriteableBitmap, Int32, Int32, Int32, Int32, Int32)
A Fast Bresenham Type Algorithm For Drawing Ellipses. Uses a different parameter representation than DrawEllipse().
Declaration
public static void DrawEllipseCentered(this WriteableBitmap bmp, int xc, int yc, int xr, int yr, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | xc | The x-coordinate of the ellipses center. |
| System.Int32 | yc | The y-coordinate of the ellipses center. |
| System.Int32 | xr | The radius of the ellipse in x-direction. |
| System.Int32 | yr | The radius of the ellipse in y-direction. |
| System.Int32 | color | The color for the line. |
DrawEllipseCentered(WriteableBitmap, Int32, Int32, Int32, Int32, Color)
A Fast Bresenham Type Algorithm For Drawing Ellipses. Uses a different parameter representation than DrawEllipse().
Declaration
public static void DrawEllipseCentered(this WriteableBitmap bmp, int xc, int yc, int xr, int yr, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | xc | The x-coordinate of the ellipses center. |
| System.Int32 | yc | The y-coordinate of the ellipses center. |
| System.Int32 | xr | The radius of the ellipse in x-direction. |
| System.Int32 | yr | The radius of the ellipse in y-direction. |
| System.Windows.Media.Color | color | The color for the line. |
DrawLine(WriteableBitmap, Int32, Int32, Int32, Int32, Int32)
Draws a colored line by connecting two points using an optimized DDA.
Declaration
public static void DrawLine(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
DrawLine(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Draws a colored line by connecting two points using an optimized DDA. Uses the pixels array and the width directly for best performance.
Declaration
public static void DrawLine(WriteableBitmap bmp, int pixelWidth, int pixelHeight, int x1, int y1, int x2, int y2, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The writeable bitmap. |
| System.Int32 | pixelWidth | The width of one scanline in the pixels array. |
| System.Int32 | pixelHeight | The height of the bitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
DrawLine(WriteableBitmap, Int32, Int32, Int32, Int32, Color)
Draws a colored line by connecting two points using an optimized DDA.
Declaration
public static void DrawLine(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | color | The color for the line. |
DrawLineAa(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Draws an anti-aliased line, using an optimized version of Gupta-Sproull algorithm From http://nokola.com/blog/post/2010/10/14/Anti-aliased-Lines-And-Optimizing-Code-for-Windows-Phone-7e28093First-Look.aspx
Declaration
public static void DrawLineAa(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawLineAa(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Draws an anti-aliased line. From http://nokola.com/blog/post/2010/10/14/Anti-aliased-Lines-And-Optimizing-Code-for-Windows-Phone-7e28093First-Look.aspx
Declaration
public static void DrawLineAa(WriteableBitmap bmp, int pixelWidth, int pixelHeight, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | pixelWidth | The width of one scanline in the pixels array. |
| System.Int32 | pixelHeight | The height of the bitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawLineAa(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, Int32, Int32, List<Int32>, Rect)
Draws an anti-aliased line, using an optimized version of Gupta-Sproull algorithm From http://nokola.com/blog/post/2010/10/14/Anti-aliased-Lines-And-Optimizing-Code-for-Windows-Phone-7e28093First-Look.aspx
Declaration
public static void DrawLineAa(WriteableBitmap bmp, int pixelWidth, int pixelHeight, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels, Rect clip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | pixelWidth | The width of one scanline in the pixels array. |
| System.Int32 | pixelHeight | The height of the bitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
| System.Windows.Rect | clip | The rectangular region to clip the line drawing within. |
DrawLineAa(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>)
Draws an anti-aliased line, using an optimized version of Gupta-Sproull algorithm From http://nokola.com/blog/post/2010/10/14/Anti-aliased-Lines-And-Optimizing-Code-for-Windows-Phone-7e28093First-Look.aspx
Declaration
public static void DrawLineAa(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawLineAa(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>, Rect)
Draws an anti-aliased line, using an optimized version of Gupta-Sproull algorithm
Declaration
public static void DrawLineAa(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color col, List<int> seriesPixels, Rect clip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | col | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
| System.Windows.Rect | clip | The rectangular region to clip the line drawing within. |
DrawLineBresenham(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Draws a line on the bitmap using the Bresenham algorithm.
Declaration
public static void DrawLineBresenham(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The writeable bitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color value (ARGB integer) to apply to the line pixels. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawLineBresenham(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>)
Draws a colored line by connecting two points using the Bresenham algorithm.
Declaration
public static void DrawLineBresenham(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color, List<int> pixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | pixels | A list of bitmap pixels of the series. |
DrawLineBresenham(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>, Rect)
Draws a colored line by connecting two points using the Bresenham algorithm.
Declaration
public static void DrawLineBresenham(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color col, List<int> seriesPixels, Rect clip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | col | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
| System.Windows.Rect | clip | The rectangular region to clip the line drawing within. |
DrawLineDDA(WriteableBitmap, Int32, Int32, Int32, Int32, Int32)
Draws a colored line by connecting two points using a DDA algorithm (Digital Differential Analyzer).
Declaration
public static void DrawLineDDA(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Int32 | color | The color for the line. |
DrawLineDDA(WriteableBitmap, Int32, Int32, Int32, Int32, Color)
Draws a colored line by connecting two points using a DDA algorithm (Digital Differential Analyzer).
Declaration
public static void DrawLineDDA(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the start point. |
| System.Int32 | y1 | The y-coordinate of the start point. |
| System.Int32 | x2 | The x-coordinate of the end point. |
| System.Int32 | y2 | The y-coordinate of the end point. |
| System.Windows.Media.Color | color | The color for the line. |
DrawPolyline(WriteableBitmap, Int32[], Int32)
Draws a polyline. Add the first point also at the end of the array if the line should be closed.
Declaration
public static void DrawPolyline(this WriteableBitmap bmp, int[] points, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32[] | points | The points of the polyline in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). |
| System.Int32 | color | The color for the line. |
DrawPolyline(WriteableBitmap, Int32[], Color)
Draws a polyline. Add the first point also at the end of the array if the line should be closed.
Declaration
public static void DrawPolyline(this WriteableBitmap bmp, int[] points, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32[] | points | The points of the polyline in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). |
| System.Windows.Media.Color | color | The color for the line. |
DrawRectangle(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Draws a rectangle. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void DrawRectangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Int32 | color | The color. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawRectangle(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>)
Draws a rectangle. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void DrawRectangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Windows.Media.Color | color | The color. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
DrawTriangle(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Draws a triangle.
Declaration
public static void DrawTriangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int x3, int y3, int color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the 1st point. |
| System.Int32 | y1 | The y-coordinate of the 1st point. |
| System.Int32 | x2 | The x-coordinate of the 2nd point. |
| System.Int32 | y2 | The y-coordinate of the 2nd point. |
| System.Int32 | x3 | The x-coordinate of the 3rd point. |
| System.Int32 | y3 | The y-coordinate of the 3rd point. |
| System.Int32 | color | The color. |
DrawTriangle(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, Int32, Color)
Draws a triangle.
Declaration
public static void DrawTriangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int x3, int y3, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the 1st point. |
| System.Int32 | y1 | The y-coordinate of the 1st point. |
| System.Int32 | x2 | The x-coordinate of the 2nd point. |
| System.Int32 | y2 | The y-coordinate of the 2nd point. |
| System.Int32 | x3 | The x-coordinate of the 3rd point. |
| System.Int32 | y3 | The y-coordinate of the 3rd point. |
| System.Windows.Media.Color | color | The color. |
EndWrite(WriteableBitmap)
Unlocks the bitmap and marks the entire area as dirty to refresh the display.
Declaration
public static void EndWrite(this WriteableBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp |
FillEllipseCentered(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Uses a different parameter representation than DrawEllipse().
Declaration
public static void FillEllipseCentered(this WriteableBitmap bmp, int xc, int yc, int xr, int yr, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | xc | The x-coordinate of the ellipses center. |
| System.Int32 | yc | The y-coordinate of the ellipses center. |
| System.Int32 | xr | The radius of the ellipse in x-direction. |
| System.Int32 | yr | The radius of the ellipse in y-direction. |
| System.Int32 | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
FillEllipseCentered(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>)
Uses a different parameter representation than DrawEllipse().
Declaration
public static void FillEllipseCentered(this WriteableBitmap bmp, int xc, int yc, int xr, int yr, Color color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | xc | The x-coordinate of the ellipses center. |
| System.Int32 | yc | The y-coordinate of the ellipses center. |
| System.Int32 | xr | The radius of the ellipse in x-direction. |
| System.Int32 | yr | The radius of the ellipse in y-direction. |
| System.Windows.Media.Color | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
FillPolygon(WriteableBitmap, Int32[], Int32, List<Int32>)
Fills a polygon defined by a sequence of points using a scanline algorithm.
Declaration
public static void FillPolygon(this WriteableBitmap bmp, int[] points, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | |
| System.Int32[] | points | |
| System.Int32 | color | |
| System.Collections.Generic.List<System.Int32> | seriesPixels |
FillPolygon(WriteableBitmap, Int32[], Color, List<Int32>)
Draws a filled polygon. Add the first point also at the end of the array if the line should be closed.
Declaration
public static void FillPolygon(this WriteableBitmap bmp, int[] points, Color color, List<int> pixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32[] | points | The points of the polygon in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). |
| System.Windows.Media.Color | color | The color for the line. |
| System.Collections.Generic.List<System.Int32> | pixels | A list of bitmap pixels of the series. |
FillPolygon(WriteableBitmap, Int32[], Color, List<Int32>, Rect)
Draws a filled polygon. Add the first point also at the end of the array if the line should be closed.
Declaration
public static void FillPolygon(this WriteableBitmap bmp, int[] points, Color col, List<int> seriesPixels, Rect clip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32[] | points | The points of the polygon in x and y pairs, therefore the array is interpreted as (x1, y1, x2, y2, ..., xn, yn). |
| System.Windows.Media.Color | col | The color for the line. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
| System.Windows.Rect | clip | The rectangular region to clip the line drawing within. |
FillRectangle(WriteableBitmap, Int32, Int32, Int32, Int32, Int32, List<Int32>)
Draws a filled rectangle. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void FillRectangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, int color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Int32 | color | The color. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
FillRectangle(WriteableBitmap, Int32, Int32, Int32, Int32, Color, List<Int32>)
Draws a filled rectangle. x2 has to be greater than x1 and y2 has to be greater than y1.
Declaration
public static void FillRectangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, Color color, List<int> seriesPixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | x1 | The x-coordinate of the bounding rectangle's left side. |
| System.Int32 | y1 | The y-coordinate of the bounding rectangle's top side. |
| System.Int32 | x2 | The x-coordinate of the bounding rectangle's right side. |
| System.Int32 | y2 | The y-coordinate of the bounding rectangle's bottom side. |
| System.Windows.Media.Color | color | The color. |
| System.Collections.Generic.List<System.Int32> | seriesPixels | A list of bitmap pixels of the series. |
GetEllipseCentered(WriteableBitmap, Int32, Int32, Int32, Int32, List<Int32>)
Uses a different parameter representation than GetEllipse().
Declaration
public static List<int> GetEllipseCentered(this WriteableBitmap bmp, int xc, int yc, int xr, int yr, List<int> pixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | The WriteableBitmap. |
| System.Int32 | xc | The x-coordinate of the ellipses center. |
| System.Int32 | yc | The y-coordinate of the ellipses center. |
| System.Int32 | xr | The radius of the ellipse in x-direction. |
| System.Int32 | yr | The radius of the ellipse in y-direction. |
| System.Collections.Generic.List<System.Int32> | pixels | A list of selected segment pixels. |
Returns
| Type |
|---|
| System.Collections.Generic.List<System.Int32> |
GetLength(WriteableBitmap)
Calculates the total number of pixels in the bitmap.
Declaration
public static int GetLength(this WriteableBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp |
Returns
| Type |
|---|
| System.Int32 |
GetPixels(WriteableBitmap)
Returns a pointer to the bitmap's back buffer, allowing unsafe access to pixel data.
Declaration
public static int *GetPixels(this WriteableBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp |
Returns
| Type |
|---|
| System.Int32* |
GetRectangle(WriteableBitmap, Int32, Int32, Int32, Int32, List<Int32>)
Uses a different parameter representation than GetRectangle().
Declaration
public static List<int> GetRectangle(this WriteableBitmap bmp, int x1, int y1, int x2, int y2, List<int> pixels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Imaging.WriteableBitmap | bmp | |
| System.Int32 | x1 | |
| System.Int32 | y1 | |
| System.Int32 | x2 | |
| System.Int32 | y2 | |
| System.Collections.Generic.List<System.Int32> | pixels |
Returns
| Type |
|---|
| System.Collections.Generic.List<System.Int32> |
Intersect(Double, Double, Double)
Intersect Calculation Method(c = y- mx)
Declaration
public static double Intersect(double x, double y, double slope)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | x | |
| System.Double | y | |
| System.Double | slope |
Returns
| Type |
|---|
| System.Double |
Slope(Double, Double, Double, Double)
Slope Calculation Method
Declaration
public static double Slope(double x1, double y1, double x2, double y2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | x1 | |
| System.Double | y1 | |
| System.Double | x2 | |
| System.Double | y2 |
Returns
| Type |
|---|
| System.Double |