/// <summary> /// another bad one a made for MS-Dos in 1998 /// </summary> public static void Tv3x(PixelWorker <sPixel> worker) { var pixel = worker.SourceP0P0(); worker.TargetP0P0(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); worker.TargetP1P0(new sPixel(0, pixel.Green, 0, pixel.Alpha)); worker.TargetP2P0(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); if ((worker.SourceX() & 1) == 0) { worker.TargetP0P1(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); if (worker.SourceY() > 0) { worker.TargetP1M1(new sPixel(0, pixel.Green, 0, pixel.Alpha)); } worker.TargetP2P1(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); } else { if (worker.SourceY() > 0) { worker.TargetP0M1(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); } worker.TargetP1P1(new sPixel(0, pixel.Green, 0, pixel.Alpha)); if (worker.SourceY() > 0) { worker.TargetP2M1(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); } } }
/// <summary> /// another bad one a made for MS-Dos in 1998 /// </summary> public static void Tv3x(PixelWorker<sPixel> worker) { var pixel = worker.SourceP0P0(); worker.TargetP0P0(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); worker.TargetP1P0(new sPixel(0, pixel.Green, 0, pixel.Alpha)); worker.TargetP2P0(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); if ((worker.SourceX() & 1) == 0) { worker.TargetP0P1(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); if (worker.SourceY() > 0) worker.TargetP1M1(new sPixel(0, pixel.Green, 0, pixel.Alpha)); worker.TargetP2P1(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); } else { if (worker.SourceY() > 0) worker.TargetP0M1(new sPixel(pixel.Red, 0, 0, pixel.Alpha)); worker.TargetP1P1(new sPixel(0, pixel.Green, 0, pixel.Alpha)); if (worker.SourceY() > 0) worker.TargetP2M1(new sPixel(0, 0, pixel.Blue, pixel.Alpha)); } }