public void ArcTo(PointD Target, PointD Center, Core.InterpolationMode Dir = Core.InterpolationMode.ClockWise) { double LastX = 0; double LastY = 0; if (Vertices.Count() > 0) { LastX = Vertices.Last().X; LastY = Vertices.Last().Y; } var NewVert = Gerber.CreateCurvePoints(LastX, LastY, Target.X, Target.Y, Center.X, Center.Y, Dir, GerberQuadrantMode.Multi); Vertices.AddRange(NewVert); }
/// <summary> /// Draws texture within specified drawing boundings /// </summary> /// <param name="texture">Texture to draw</param> /// <param name="drawingBoundings">Drawing boundings, including position</param> /// <param name="interpolationMode">Overriden texture interpolation mode</param> public void DrawTexture(Texture texture, Core.Rectangle drawingBoundings, Core.InterpolationMode interpolationMode) { DrawTexture(texture, drawingBoundings, 1f, interpolationMode); }
/// <summary> /// Draws texture within specified drawing boundings /// </summary> /// <param name="texture">Texture to draw</param> /// <param name="drawingBoundings">Drawing boundings, including position</param> /// <param name="opacity">Opacity of texture</param> /// <param name="interpolationMode">Overriden texture interpolation mode</param> public void DrawTexture(Texture texture, Core.Rectangle drawingBoundings, float opacity, Core.InterpolationMode interpolationMode) { RenderTarget.DrawBitmap(texture.Bitmap, drawingBoundings.RawRectangle, opacity, (BitmapInterpolationMode)interpolationMode); }
/// <summary> /// Draws texture in specified location, within specified boundings /// </summary> /// <param name="texture">Texture to draw</param> /// <param name="x">Position to draw along X axis</param> /// <param name="y">Position to draw along Y axis</param> /// <param name="width">Width of drawing boundings</param> /// <param name="height">Height of drawing boundings</param> /// <param name="interpolationMode">Overriden texture interpolation mode</param> /// <param name="opacity">Opacity of texture</param> public void DrawTexture(Texture texture, float x, float y, float width, float height, float opacity, Core.InterpolationMode interpolationMode) { DrawTexture(texture, new Core.Rectangle(x, y, width, height), opacity, interpolationMode); }
/// <summary> /// Draws texture at specified location, within specified boundings /// </summary> /// <param name="texture">Texture to draw</param> /// <param name="x">Position along X axis</param> /// <param name="y">Position along Y axis</param> /// <param name="width">Width of drawing boundings</param> /// <param name="height">Height of drawing boundings</param> /// <param name="interpolationMode">Overriden texture interpolation mode</param> public void DrawTexture(Texture texture, float x, float y, float width, float height, Core.InterpolationMode interpolationMode) { DrawTexture(texture, x, y, width, height, 1f, interpolationMode); }
/// <summary> /// Creates a new <see cref="Renderer"/> instance with specified pointer to window /// </summary> /// <param name="gameWndHandle">Renderer window pointer</param> public Renderer(IntPtr gameWndHandle) { GameWindowHandle = gameWndHandle; InterpolationMode = Core.InterpolationMode.Linear; InitializeDevices(); }