System.Drawing.Toolkit.ToolkitGraphicsImageBase.SetPixelLine C# (CSharp) Method

SetPixelLine() private method

private SetPixelLine ( Frame frame, int x, int yPtr, int color ) : void
frame Frame
x int
yPtr int
color int
return void
		private void SetPixelLine(Frame frame, int x, int yPtr, int color)
				{
					switch (frame.PixelFormat)
					{
						case (PixelFormat.Format24bppRgb):
						{
							int ptr = yPtr + x * 3;
							if(ptr >= 0 && frame.Data.Length > ptr + 2)
							{
								frame.Data[ptr++] = (byte)color;
								frame.Data[ptr++] = (byte)(color>>8);
								frame.Data[ptr] = (byte)(color>>16);
							}
							break;
						}
						default:
							throw new NotSupportedException();
					}
				}