public void Draw(SharpDX.Direct2D1.RenderTarget target) { target.PushAxisAlignedClip(new SharpDX.Mathematics.Interop.RawRectangleF(this.bounds.Left, this.bounds.Top, this.bounds.Right, this.bounds.Bottom), SharpDX.Direct2D1.AntialiasMode.PerPrimitive); Ground.Draw(target, this.bounds); //this.containedObject?.Draw(target); target.PopAxisAlignedClip(); IsChanged = false; }
// SharpDX.Direct2D1.RenderTarget の拡張メソッド /// <summary> /// 指定した領域をクリアする。 /// </summary> /// <param name="rt">レンダーターゲット。</param> /// <param name="color">クリアする色。</param> /// <param name="rect">クリアする領域。</param> public static void Clear(this SharpDX.Direct2D1.RenderTarget rt, Color color, SharpDX.Mathematics.Interop.RawRectangleF rect) { rt.PushAxisAlignedClip(rect, SharpDX.Direct2D1.AntialiasMode.PerPrimitive); rt.Clear(color); rt.PopAxisAlignedClip(); }