public void DrawRoundedRectangle(Brush brush, RoundedRectangleF rectangle, float strokeWidth, GeneralTransform transform)
        {
            var localTransform = transform.GetTransform();

            DrawRoundedRectangle(brush, rectangle, strokeWidth, Matrix3x2.Identity, localTransform);
        }
 public void DrawRoundedRectangle(Brush brush, RoundedRectangleF rectangle, float strokeWidth)
 {
     DrawRoundedRectangle(brush, rectangle, strokeWidth, Matrix3x2.Identity, Matrix3x2.Identity);
 }
        /// <summary>
        /// Fills a rounded rectangle on the DrawingLayer with the given brush
        /// </summary>
        /// <param name="brush">The brush to fill</param>
        /// <param name="rectangle">The rounded rectangle area</param>
        /// <param name="transform">The transformation to apply to the rounded rectangle</param>
        public void FillRoundedRectangle(Brush brush, RoundedRectangleF rectangle, GeneralTransform transform)
        {
            var localTransform = transform.GetTransform();

            FillRoundedRectangle(brush, rectangle, Matrix3x2.Identity, localTransform);
        }
        private void DrawRoundedRectangle(Brush brush, RoundedRectangleF rectangle, float strokeWidth, Matrix3x2 localTransform, Matrix3x2 worldTransform)
        {
            m_drawStateManagement.DrawPreamble();

            /* Save our state */
            PushState();

            /* Set our D2D render target to use the transform */
            D2DRenderTarget.InternalRenderTarget.Transform = worldTransform;

            /* Prepare our brush to be used */
            BrushHelper.PrepareBrush(brush, this, rectangle.GetBounds(), localTransform, worldTransform);

            D2DRenderTarget.InternalRenderTarget.DrawRoundedRectangle(brush.InternalBrush, rectangle.InternalRoundedRectangle, strokeWidth);

            /* Restore our state */
            PopState();
        }
 /// <summary>
 /// Fills a rounded rectangle on the DrawingLayer with the given brush
 /// </summary>
 /// <param name="brush">The brush to fill</param>
 /// <param name="rectangle">The rounded rectangle area</param>
 public void FillRoundedRectangle(Brush brush, RoundedRectangleF rectangle)
 {
     FillRoundedRectangle(brush, rectangle, Matrix3x2.Identity, Matrix3x2.Identity);
 }