Example #1
0
        public virtual void FillMesh(
            ID2D1Mesh mesh,
            ID2D1Brush brush
            )
        {
            var fp = GetFunctionPointer(24);

            if (m_FillMeshFunc == null)
            {
                m_FillMeshFunc = (FillMeshFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillMeshFunc));
            }

            m_FillMeshFunc(m_ptr, mesh != null ? mesh.Ptr : IntPtr.Zero, brush != null ? brush.Ptr : IntPtr.Zero);
        }
Example #2
0
        public virtual void FillRoundedRectangle(
            ref D2D1_ROUNDED_RECT roundedRect,
            ID2D1Brush brush
            )
        {
            var fp = GetFunctionPointer(19);

            if (m_FillRoundedRectangleFunc == null)
            {
                m_FillRoundedRectangleFunc = (FillRoundedRectangleFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillRoundedRectangleFunc));
            }

            m_FillRoundedRectangleFunc(m_ptr, ref roundedRect, brush != null ? brush.Ptr : IntPtr.Zero);
        }
Example #3
0
        public virtual void FillEllipse(
            ref D2D1_ELLIPSE ellipse,
            ID2D1Brush brush
            )
        {
            var fp = GetFunctionPointer(21);

            if (m_FillEllipseFunc == null)
            {
                m_FillEllipseFunc = (FillEllipseFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillEllipseFunc));
            }

            m_FillEllipseFunc(m_ptr, ref ellipse, brush != null ? brush.Ptr : IntPtr.Zero);
        }
Example #4
0
        public virtual void FillRectangle(
            ref System.Numerics.Vector4 rect,
            ID2D1Brush brush
            )
        {
            var fp = GetFunctionPointer(17);

            if (m_FillRectangleFunc == null)
            {
                m_FillRectangleFunc = (FillRectangleFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillRectangleFunc));
            }

            m_FillRectangleFunc(m_ptr, ref rect, brush != null ? brush.Ptr : IntPtr.Zero);
        }
Example #5
0
        public virtual void FillGeometry(
            ID2D1Geometry geometry,
            ID2D1Brush brush,
            ID2D1Brush opacityBrush
            )
        {
            var fp = GetFunctionPointer(23);

            if (m_FillGeometryFunc == null)
            {
                m_FillGeometryFunc = (FillGeometryFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillGeometryFunc));
            }

            m_FillGeometryFunc(m_ptr, geometry != null ? geometry.Ptr : IntPtr.Zero, brush != null ? brush.Ptr : IntPtr.Zero, opacityBrush != null ? opacityBrush.Ptr : IntPtr.Zero);
        }
Example #6
0
        public virtual void FillOpacityMask(
            ID2D1Bitmap opacityMask,
            ID2D1Brush brush,
            ref System.Numerics.Vector4 destinationRectangle,
            ref System.Numerics.Vector4 sourceRectangle
            )
        {
            var fp = GetFunctionPointer(91);

            if (m_FillOpacityMaskFunc == null)
            {
                m_FillOpacityMaskFunc = (FillOpacityMaskFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FillOpacityMaskFunc));
            }

            m_FillOpacityMaskFunc(m_ptr, opacityMask != null ? opacityMask.Ptr : IntPtr.Zero, brush != null ? brush.Ptr : IntPtr.Zero, ref destinationRectangle, ref sourceRectangle);
        }
Example #7
0
        public virtual void DrawGlyphRun(
            System.Numerics.Vector2 baselineOrigin,
            ref DWRITE_GLYPH_RUN glyphRun,
            ID2D1Brush foregroundBrush,
            DWRITE_MEASURING_MODE measuringMode
            )
        {
            var fp = GetFunctionPointer(29);

            if (m_DrawGlyphRunFunc == null)
            {
                m_DrawGlyphRunFunc = (DrawGlyphRunFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawGlyphRunFunc));
            }

            m_DrawGlyphRunFunc(m_ptr, baselineOrigin, ref glyphRun, foregroundBrush != null ? foregroundBrush.Ptr : IntPtr.Zero, measuringMode);
        }
Example #8
0
        public virtual void DrawTextLayout(
            System.Numerics.Vector2 origin,
            IDWriteTextLayout textLayout,
            ID2D1Brush defaultFillBrush,
            D2D1_DRAW_TEXT_OPTIONS options
            )
        {
            var fp = GetFunctionPointer(28);

            if (m_DrawTextLayoutFunc == null)
            {
                m_DrawTextLayoutFunc = (DrawTextLayoutFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawTextLayoutFunc));
            }

            m_DrawTextLayoutFunc(m_ptr, origin, textLayout != null ? textLayout.Ptr : IntPtr.Zero, defaultFillBrush != null ? defaultFillBrush.Ptr : IntPtr.Zero, options);
        }
Example #9
0
        public virtual void DrawGeometry(
            ID2D1Geometry geometry,
            ID2D1Brush brush,
            float strokeWidth,
            ID2D1StrokeStyle strokeStyle
            )
        {
            var fp = GetFunctionPointer(22);

            if (m_DrawGeometryFunc == null)
            {
                m_DrawGeometryFunc = (DrawGeometryFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawGeometryFunc));
            }

            m_DrawGeometryFunc(m_ptr, geometry != null ? geometry.Ptr : IntPtr.Zero, brush != null ? brush.Ptr : IntPtr.Zero, strokeWidth, strokeStyle != null ? strokeStyle.Ptr : IntPtr.Zero);
        }
Example #10
0
        public virtual void DrawEllipse(
            ref D2D1_ELLIPSE ellipse,
            ID2D1Brush brush,
            float strokeWidth,
            ID2D1StrokeStyle strokeStyle
            )
        {
            var fp = GetFunctionPointer(20);

            if (m_DrawEllipseFunc == null)
            {
                m_DrawEllipseFunc = (DrawEllipseFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawEllipseFunc));
            }

            m_DrawEllipseFunc(m_ptr, ref ellipse, brush != null ? brush.Ptr : IntPtr.Zero, strokeWidth, strokeStyle != null ? strokeStyle.Ptr : IntPtr.Zero);
        }
Example #11
0
        public virtual void DrawRoundedRectangle(
            ref D2D1_ROUNDED_RECT roundedRect,
            ID2D1Brush brush,
            float strokeWidth,
            ID2D1StrokeStyle strokeStyle
            )
        {
            var fp = GetFunctionPointer(18);

            if (m_DrawRoundedRectangleFunc == null)
            {
                m_DrawRoundedRectangleFunc = (DrawRoundedRectangleFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawRoundedRectangleFunc));
            }

            m_DrawRoundedRectangleFunc(m_ptr, ref roundedRect, brush != null ? brush.Ptr : IntPtr.Zero, strokeWidth, strokeStyle != null ? strokeStyle.Ptr : IntPtr.Zero);
        }
Example #12
0
        public virtual void DrawRectangle(
            ref System.Numerics.Vector4 rect,
            ID2D1Brush brush,
            float strokeWidth,
            ID2D1StrokeStyle strokeStyle
            )
        {
            var fp = GetFunctionPointer(16);

            if (m_DrawRectangleFunc == null)
            {
                m_DrawRectangleFunc = (DrawRectangleFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawRectangleFunc));
            }

            m_DrawRectangleFunc(m_ptr, ref rect, brush != null ? brush.Ptr : IntPtr.Zero, strokeWidth, strokeStyle != null ? strokeStyle.Ptr : IntPtr.Zero);
        }
Example #13
0
        public virtual void DrawLine(
            System.Numerics.Vector2 point0,
            System.Numerics.Vector2 point1,
            ID2D1Brush brush,
            float strokeWidth,
            ID2D1StrokeStyle strokeStyle
            )
        {
            var fp = GetFunctionPointer(15);

            if (m_DrawLineFunc == null)
            {
                m_DrawLineFunc = (DrawLineFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawLineFunc));
            }

            m_DrawLineFunc(m_ptr, point0, point1, brush != null ? brush.Ptr : IntPtr.Zero, strokeWidth, strokeStyle != null ? strokeStyle.Ptr : IntPtr.Zero);
        }
Example #14
0
        public virtual void DrawText(
            ref ushort _string,
            uint stringLength,
            IDWriteTextFormat textFormat,
            ref System.Numerics.Vector4 layoutRect,
            ID2D1Brush defaultFillBrush,
            D2D1_DRAW_TEXT_OPTIONS options,
            DWRITE_MEASURING_MODE measuringMode
            )
        {
            var fp = GetFunctionPointer(27);

            if (m_DrawTextWFunc == null)
            {
                m_DrawTextWFunc = (DrawTextWFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawTextWFunc));
            }

            m_DrawTextWFunc(m_ptr, ref _string, stringLength, textFormat != null ? textFormat.Ptr : IntPtr.Zero, ref layoutRect, defaultFillBrush != null ? defaultFillBrush.Ptr : IntPtr.Zero, options, measuringMode);
        }