/// <summary> /// Internal implementation to draw an ellipse /// </summary> /// <param name="brush">The brush to fill</param> /// <param name="ellipse">The ellipse area</param> /// <param name="strokeWidth">The width of the stroke</param> /// <param name="localTransform">The local transform</param> /// <param name="worldTransform">The world transform</param> private void DrawEllipse(Brush brush, Shapes.Ellipse ellipse, float strokeWidth, Matrix3x2 localTransform, Matrix3x2 worldTransform) { m_drawStateManagement.DrawPreamble(); /* Save our state */ PushState(); /* Get the rectangular bounds of our ellipse */ var bounds = ellipse.GetBounds(); /* Set our D2D render target to use the transform */ D2DRenderTarget.InternalRenderTarget.Transform = worldTransform; /* Prepare our brush to be used */ BrushHelper.PrepareBrush(brush, this, bounds, localTransform, worldTransform); D2DRenderTarget.InternalRenderTarget.DrawEllipse(brush.InternalBrush, ellipse.InternalEllipse, strokeWidth); /* Restore our state */ PopState(); }