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

            DrawRoundedRectangle(brush, rectangle, strokeWidth, Matrix3x2.Identity, localTransform);
        }
Example #2
0
 public void DrawRoundedRectangle(Brush brush, RoundedRectangleF rectangle, float strokeWidth)
 {
     DrawRoundedRectangle(brush, rectangle, strokeWidth, Matrix3x2.Identity, Matrix3x2.Identity);
 }
Example #3
0
        /// <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);
        }
Example #4
0
        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();
        }
Example #5
0
 /// <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);
 }