private static void Window_PaintBackground(object sender, IDrawEventArgs e) { if (e.Graphics == null) { return; } { IGraphics img; img = Factory.newCanvas(300, 300); img.DrawEllipse(10, 10, 200, 200, moonfs); img.DrawPolygon(new IParameter[] { rg }, 10, 10, 200, 200, 300, 30, 67, 78, 100, 56); var area = new Rectangle(10, 10, 400, 400); e.Graphics.DrawImage(img, 20, 20, area, Command.SkipUpdate | Command.Backdrop | Command.Screen); e.AddParameters(new IParameter[] { Command.UpdateScreenOnly.Add(), new UpdateRectangle(20, 20, 400, 400) }); //surface.DrawImage(img, 600, 500, area, Commands.Backdrop | Commands.BackBuffer); //surface.DrawImage(img, 500, 500, area, Commands.Backdrop | Commands.BackBuffer); //window.DrawPolygon(new ISettingsParam[] { rg1 }, 34, 22, 56, 95, 118, 40, 58, 40, 182, 87, 65, 177, 65, 177, // 96, 28, 138, 84, 138, 84, 66, 66, 255, 46, 186, 42, 168, 21, 92, 110, 141, 143, 285, 89, 194, 187, 72, 153); ////7 Mukesh //Desktop.DrawPolygon(new ISettingsParam[] { rg1 }, 0, 500, 0, 300, 20, 300, 40, 500, 60, 300, 80, 300, 80, 500, 81, 499, 82, // 497, 83, 494, 84, 490, 85, 484, 86, 477, 87, 469, 88, 460, 89, 450, 90, 439, 91, 427, // 92, 414, 93, 400, 93, 475, 94, 480, 95, 485, 97, 490, 99, 495, 101, 500, 103, 495, 105, // 490, 107, 485, 108, 480, 110, 475, 110, 400, 112, 400, 112, 490, 113, 495, 115, 500, 117, // 497, 118, 493, 119, 488, 120, 482, 121, 475, 122, 467, 123, 458, 124, 448, 125, 437, // 126, 425, 127, 412, 129, 350, 129, 500, 129, 450, 140, 400, 130, 455, 140, 500, 141, // 494, 142, 487, 143, 479, 144, 470, 145, 460, 146, 450, 167, 450, 167, 443, 165, 431, // 163, 417, 161, 405, 159, 402, 157, 400, 155, 402, 153, 405, 151, 417, 149, 431, 147, // 443, 145, 449, 147, 458, 149, 470, 151, 484, 153, 495, 155, 500, 157, 500, 159, 500, // 161, 494, 163, 487, 165, 479, 167, 470, 169, 460, 171, 449, 173, 442, 175, 431, 177, // 418, 179, 407, 181, 404, 183, 402, 185, 404, 187, 407, 189, 418, 191, 431, 189, 424, // 187, 414, 185, 411, 183, 409, 181, 411, 179, 414, 177, 423, 175, 434, 177, 442, 179, // 446, 181, 449, 183, 452, 185, 456, 187, 464, 189, 475, 187, 488, 185, 499, 183, 502, // 181, 504, 179, 501, 177, 490, 175, 477, 177, 474, 179, 474, 181, 473, 183, 471, 185, // 468, 187, 464, 189, 459, 191, 453, 193, 446, 195, 438, 197, 429, 199, 419, 201, 408, // 203, 396, 205, 383, 207, 369, 209, 354, 209, 350, 209, 500, 210, 450, 212, 438, 214, // 425, 216, 412, 218, 405, 220, 402, 222, 400, 224, 403, 226, 410, 228, 422, 230, 433, // 232, 443, 232, 600, 0, 600, 0, 500); } }
private static void Window_PaintBackground(object sender, IDrawEventArgs e) { var surface = e.Graphics; if (surface == null) { return; } IGraphics img; img = Factory.newCanvas(300, 300); img.DrawEllipse(10, 10, 200, 200, rg); var area = new Rectangle(10, 10, 400, 400); img.DrawPolygon(new IParameter[] { rg }, 10, 10, 200, 200, 300, 30, 67, 78, 100, 56); //surface.DrawImage(img, 20, 20, area, Commands.BackBuffer); //surface.DrawImage(img, 600, 500, area, Commands.BackBuffer); surface.DrawImage(img, 500, 500, area, Command.Backdrop); //settings.Command = Command.BackgroundBuffer; //Desktop.DrawPolygon(new IParam[] { Factory.newSettings().Modify(rg, new GwsCommand(Commands.BackBuffer)) }, // 34, 22, 56, 95, 118, 40, 58, 40, 182, 87, 65, 177, 65, 177, // 96, 28, 138, 84, 138, 84, 66, 66, 255, 46, 186, 42, 168, 21, 92, 110, 141, 143, 285, 89, 194, 187, 72, 153); ////7 Mukesh Desktop.DrawPolygon(new IParameter[] { rg }, 0, 500, 0, 300, 20, 300, 40, 500, 60, 300, 80, 300, 80, 500, 81, 499, 82, 497, 83, 494, 84, 490, 85, 484, 86, 477, 87, 469, 88, 460, 89, 450, 90, 439, 91, 427, 92, 414, 93, 400, 93, 475, 94, 480, 95, 485, 97, 490, 99, 495, 101, 500, 103, 495, 105, 490, 107, 485, 108, 480, 110, 475, 110, 400, 112, 400, 112, 490, 113, 495, 115, 500, 117, 497, 118, 493, 119, 488, 120, 482, 121, 475, 122, 467, 123, 458, 124, 448, 125, 437, 126, 425, 127, 412, 129, 350, 129, 500, 129, 450, 140, 400, 130, 455, 140, 500, 141, 494, 142, 487, 143, 479, 144, 470, 145, 460, 146, 450, 167, 450, 167, 443, 165, 431, 163, 417, 161, 405, 159, 402, 157, 400, 155, 402, 153, 405, 151, 417, 149, 431, 147, 443, 145, 449, 147, 458, 149, 470, 151, 484, 153, 495, 155, 500, 157, 500, 159, 500, 161, 494, 163, 487, 165, 479, 167, 470, 169, 460, 171, 449, 173, 442, 175, 431, 177, 418, 179, 407, 181, 404, 183, 402, 185, 404, 187, 407, 189, 418, 191, 431, 189, 424, 187, 414, 185, 411, 183, 409, 181, 411, 179, 414, 177, 423, 175, 434, 177, 442, 179, 446, 181, 449, 183, 452, 185, 456, 187, 464, 189, 475, 187, 488, 185, 499, 183, 502, 181, 504, 179, 501, 177, 490, 175, 477, 177, 474, 179, 474, 181, 473, 183, 471, 185, 468, 187, 464, 189, 459, 191, 453, 193, 446, 195, 438, 197, 429, 199, 419, 201, 408, 203, 396, 205, 383, 207, 369, 209, 354, 209, 350, 209, 500, 210, 450, 212, 438, 214, 425, 216, 412, 218, 405, 220, 402, 222, 400, 224, 403, 226, 410, 228, 422, 230, 433, 232, 443, 232, 600, 0, 600, 0, 500); }