public void bezierRGBA() { this.InitSdl(); //Random rand = new Random(); int result = SdlGfx.bezierRGBA(surfacePtr, vx, vy, vx.Length, 4, 200, 0, (byte)0, 254); result = Sdl.SDL_Flip(surfacePtr); Thread.Sleep(sleepTime); Assert.AreEqual(result, 0); this.Quit(); }
/// <summary> /// Draw filled primitive onto surface /// </summary> /// <param name="surface">Surface to draw to</param> /// <param name="color">Color to fill primitive</param> /// <param name="antiAlias">antialias primitive</param> /// <param name="fill">fill primitive with color</param> public void Draw(Surface surface, System.Drawing.Color color, bool antiAlias, bool fill) { if (surface == null) { throw new ArgumentNullException("surface"); } int result = SdlGfx.bezierRGBA( surface.Handle, this.PositionsX(), this.PositionsY(), this.NumberOfPoints, this.Steps, color.R, color.G, color.B, color.A); GC.KeepAlive(this); if (result != (int)SdlFlag.Success) { throw SdlException.Generate(); } }