public static D2D1_GRADIENT_MESH_PATCH GradientMeshPatch([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point00, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point01, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point02, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point03, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point10, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point11, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point12, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point13, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point20, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point21, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point22, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point23, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point30, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point31, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point32, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point33, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color00, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color03, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color30, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color33, D2D1_PATCH_EDGE_MODE topEdgeMode, D2D1_PATCH_EDGE_MODE leftEdgeMode, D2D1_PATCH_EDGE_MODE bottomEdgeMode, D2D1_PATCH_EDGE_MODE rightEdgeMode)
        {
            D2D1_GRADIENT_MESH_PATCH newPatch;

            newPatch.point00        = point00;
            newPatch.point01        = point01;
            newPatch.point02        = point02;
            newPatch.point03        = point03;
            newPatch.point10        = point10;
            newPatch.point11        = point11;
            newPatch.point12        = point12;
            newPatch.point13        = point13;
            newPatch.point20        = point20;
            newPatch.point21        = point21;
            newPatch.point22        = point22;
            newPatch.point23        = point23;
            newPatch.point30        = point30;
            newPatch.point31        = point31;
            newPatch.point32        = point32;
            newPatch.point33        = point33;
            newPatch.color00        = color00;
            newPatch.color03        = color03;
            newPatch.color30        = color30;
            newPatch.color33        = color33;
            newPatch.topEdgeMode    = topEdgeMode;
            newPatch.leftEdgeMode   = leftEdgeMode;
            newPatch.bottomEdgeMode = bottomEdgeMode;
            newPatch.rightEdgeMode  = rightEdgeMode;

            return(newPatch);
        }
 public void ScreenResized(D2D_POINT_2F location, D2D_SIZE_F size)
 {
     _location = location;
     _size     = size;
     _sfx      = size.Width > 0 ? _pitch / size.Width : 0;
     _sfy      = size.Height > 0 ? 230 / size.Height : 0;
 }
        public static D2D1_GRADIENT_MESH_PATCH GradientMeshPatchFromCoonsPatch([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point2, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point3, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point4, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point5, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point6, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point7, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point8, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point9, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point10, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point11, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color0, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color1, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color2, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color3, D2D1_PATCH_EDGE_MODE topEdgeMode, D2D1_PATCH_EDGE_MODE leftEdgeMode, D2D1_PATCH_EDGE_MODE bottomEdgeMode, D2D1_PATCH_EDGE_MODE rightEdgeMode)
        {
            D2D1_GRADIENT_MESH_PATCH newPatch;

            newPatch.point00 = point0;
            newPatch.point01 = point1;
            newPatch.point02 = point2;
            newPatch.point03 = point3;
            newPatch.point13 = point4;
            newPatch.point23 = point5;
            newPatch.point33 = point6;
            newPatch.point32 = point7;
            newPatch.point31 = point8;
            newPatch.point30 = point9;
            newPatch.point20 = point10;
            newPatch.point10 = point11;

            D2D1GetGradientMeshInteriorPointsFromCoonsPatch(&point0, &point1, &point2, &point3, &point4, &point5, &point6, &point7, &point8, &point9, &point10, &point11, &newPatch.point11, &newPatch.point12, &newPatch.point21, &newPatch.point22);

            newPatch.color00        = color0;
            newPatch.color03        = color1;
            newPatch.color33        = color2;
            newPatch.color30        = color3;
            newPatch.topEdgeMode    = topEdgeMode;
            newPatch.leftEdgeMode   = leftEdgeMode;
            newPatch.bottomEdgeMode = bottomEdgeMode;
            newPatch.rightEdgeMode  = rightEdgeMode;

            return(newPatch);
        }
Exemple #4
0
    public static D2D_MATRIX_3X2_F Rotation(float angle, D2D_POINT_2F center = default)
    {
        D2D_MATRIX_3X2_F rotation;

        D2D1MakeRotateMatrix(angle, center, &rotation);
        return(rotation);
    }
Exemple #5
0
    public static D2D_MATRIX_3X2_F Skew(float angleX, float angleY, D2D_POINT_2F center = default)
    {
        D2D_MATRIX_3X2_F skew;

        D2D1MakeSkewMatrix(angleX, angleY, center, &skew);

        return(skew);
    }
Exemple #6
0
    public static D2D_POINT_2F Point2F(float x = 0.0f, float y = 0.0f)
    {
        D2D_POINT_2F point = new D2D_POINT_2F {
            x = x,
            y = y,
        };

        return(point);
    }
 public void ScreenResized(D2D_POINT_2F location, D2D_SIZE_F size)
 {
     _currentXLocation = (int)location.X;
     if (size.Width > 0)
     {
         _currentXWidth = (int)size.Width;
     }
     _startYForPaddleInput = (int)(location.Y + size.Height) * 2 / 3;
 }
Exemple #8
0
 public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F *worldTransform, float flatteningTolerance, BOOL *contains)
 {
     return(((delegate * unmanaged <ID2D1GeometryGroup *, D2D_POINT_2F, D2D_MATRIX_3X2_F *, float, BOOL *, int>)(lpVtbl[7]))((ID2D1GeometryGroup *)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains));
 }
 public void DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN *glyphRun, ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL)
 {
     ((delegate * unmanaged <ID2D1BitmapRenderTarget *, D2D_POINT_2F, DWRITE_GLYPH_RUN *, ID2D1Brush *, DWRITE_MEASURING_MODE, void>)(lpVtbl[29]))((ID2D1BitmapRenderTarget *)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode);
 }
 public void DrawTextLayout([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F origin, IDWriteTextLayout *textLayout, ID2D1Brush *defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE)
 {
     ((delegate * unmanaged <ID2D1BitmapRenderTarget *, D2D_POINT_2F, IDWriteTextLayout *, ID2D1Brush *, D2D1_DRAW_TEXT_OPTIONS, void>)(lpVtbl[28]))((ID2D1BitmapRenderTarget *)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options);
 }
Exemple #11
0
 public void SetEndPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F endPoint)
 {
     ((delegate * unmanaged <ID2D1LinearGradientBrush *, D2D_POINT_2F, void>)(lpVtbl[9]))((ID2D1LinearGradientBrush *)Unsafe.AsPointer(ref this), endPoint);
 }
 public HRESULT DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush *brush, float strokeWidth, ID2D1StrokeStyle *strokeStyle)
 {
     return(((delegate * unmanaged <ID2D1CommandSink4 *, D2D_POINT_2F, D2D_POINT_2F, ID2D1Brush *, float, ID2D1StrokeStyle *, int>)(lpVtbl[14]))((ID2D1CommandSink4 *)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle));
 }
Exemple #13
0
 public void BeginFigure([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin)
 {
     ((delegate * unmanaged <ID2D1SimplifiedGeometrySink *, D2D_POINT_2F, D2D1_FIGURE_BEGIN, void>)(lpVtbl[5]))((ID2D1SimplifiedGeometrySink *)Unsafe.AsPointer(ref this), startPoint, figureBegin);
 }
Exemple #14
0
 public D2D1_GRADIENT_MESH_PATCH([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point00, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point01, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point02, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point03, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point10, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point11, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point12, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point13, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point20, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point21, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point22, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point23, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point30, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point31, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point32, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point33, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color00, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color03, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color30, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color33, D2D1_PATCH_EDGE_MODE topEdgeMode, D2D1_PATCH_EDGE_MODE leftEdgeMode, D2D1_PATCH_EDGE_MODE bottomEdgeMode, D2D1_PATCH_EDGE_MODE rightEdgeMode)
 {
     this = GradientMeshPatch(point00, point01, point02, point03, point10, point11, point12, point13, point20, point21, point22, point23, point30, point31, point32, point33, color00, color03, color30, color33, topEdgeMode, leftEdgeMode, bottomEdgeMode, rightEdgeMode);
 }
Exemple #15
0
 public static D2D_MATRIX_3X2_F Scale(float x, float y, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F center = default)
 {
     return(Scale(new D2D_SIZE_F(x, y), center));
 }
Exemple #16
0
    public static D2D_MATRIX_3X2_F Scale([NativeTypeName("D2D1_SIZE_F")] D2D_SIZE_F size, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F center = default)
    {
        D2D_MATRIX_3X2_F scale = default;

        scale.m11 = size.width;
        scale.m12 = 0.0f;
        scale.m21 = 0.0f;
        scale.m22 = size.height;
        scale.dx  = center.x - size.width * center.x;
        scale.dy  = center.y - size.height * center.y;

        return(scale);
    }
 public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle *strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F *worldTransform, float flatteningTolerance, BOOL *contains)
 {
     return(((delegate * unmanaged <ID2D1PathGeometry *, D2D_POINT_2F, float, ID2D1StrokeStyle *, D2D_MATRIX_3X2_F *, float, BOOL *, int>)(lpVtbl[6]))((ID2D1PathGeometry *)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains));
 }
Exemple #18
0
 public HRESULT ComputeGlyphOrigins([NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN *glyphRun, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX *worldAndDpiTransform, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F *glyphOrigins)
 {
     return(((delegate * unmanaged <IDWriteFactory4 *, DWRITE_GLYPH_RUN *, DWRITE_MEASURING_MODE, D2D_POINT_2F, DWRITE_MATRIX *, D2D_POINT_2F *, int>)(lpVtbl[42]))((IDWriteFactory4 *)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins));
 }
Exemple #19
0
 public HRESULT ComputeGlyphOrigins([NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN *glyphRun, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("D2D1_POINT_2F *")] D2D_POINT_2F *glyphOrigins)
 {
     return(((delegate * unmanaged <IDWriteFactory4 *, DWRITE_GLYPH_RUN *, D2D_POINT_2F, D2D_POINT_2F *, int>)(lpVtbl[41]))((IDWriteFactory4 *)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins));
 }
Exemple #20
0
 public HRESULT TranslateColorGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN *glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, DWRITE_GLYPH_IMAGE_FORMATS desiredGlyphImageFormats, DWRITE_MEASURING_MODE measuringMode, [NativeTypeName("const DWRITE_MATRIX *")] DWRITE_MATRIX *worldAndDpiTransform, [NativeTypeName("UINT32")] uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1 **colorLayers)
 {
     return(((delegate * unmanaged <IDWriteFactory4 *, D2D_POINT_2F, DWRITE_GLYPH_RUN *, DWRITE_GLYPH_RUN_DESCRIPTION *, DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_MEASURING_MODE, DWRITE_MATRIX *, uint, IDWriteColorGlyphRunEnumerator1 **, int>)(lpVtbl[40]))((IDWriteFactory4 *)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers));
 }
 public D2D1_ELLIPSE(D2D_POINT_2F point, float radiusX, float radiusY)
 {
     this.point   = point;
     this.radiusX = radiusX;
     this.radiusY = radiusY;
 }
Exemple #22
0
 public HRESULT StrokeContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, float strokeWidth, ID2D1StrokeStyle *strokeStyle, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F *worldTransform, BOOL *contains)
 {
     return(StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, (0.25f), contains));
 }
Exemple #23
0
 public HRESULT FillContainsPoint([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point, [NativeTypeName("const D2D1_MATRIX_3X2_F *")] D2D_MATRIX_3X2_F *worldTransform, BOOL *contains)
 {
     return(FillContainsPoint(point, worldTransform, (0.25f), contains));
 }
 public D2D1_ELLIPSE(D2D_POINT_2F point, float radius)
     : this(point, radius, radius)
 {
 }
Exemple #25
0
 public static D2D1_GRADIENT_MESH_PATCH FromCoonsPatch([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point2, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point3, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point4, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point5, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point6, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point7, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point8, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point9, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point10, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point11, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color0, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color1, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color2, [NativeTypeName("D2D1_COLOR_F")] DXGI_RGBA color3, D2D1_PATCH_EDGE_MODE topEdgeMode, D2D1_PATCH_EDGE_MODE leftEdgeMode, D2D1_PATCH_EDGE_MODE bottomEdgeMode, D2D1_PATCH_EDGE_MODE rightEdgeMode)
 {
     return(GradientMeshPatchFromCoonsPatch(point0, point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11, color0, color1, color2, color3, topEdgeMode, leftEdgeMode, bottomEdgeMode, rightEdgeMode));
 }
 public D2D1_BEZIER_SEGMENT(D2D_POINT_2F point1, D2D_POINT_2F point2, D2D_POINT_2F point3)
 {
     this.point1 = point1;
     this.point2 = point2;
     this.point3 = point3;
 }
 public HRESULT DrawGlyphRun([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F baselineOrigin, [NativeTypeName("const DWRITE_GLYPH_RUN *")] DWRITE_GLYPH_RUN *glyphRun, [NativeTypeName("const DWRITE_GLYPH_RUN_DESCRIPTION *")] DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode)
 {
     return(((delegate * unmanaged <ID2D1CommandSink4 *, D2D_POINT_2F, DWRITE_GLYPH_RUN *, DWRITE_GLYPH_RUN_DESCRIPTION *, ID2D1Brush *, DWRITE_MEASURING_MODE, int>)(lpVtbl[13]))((ID2D1CommandSink4 *)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode));
 }
Exemple #28
0
 public void ScreenResized(D2D_POINT_2F location, D2D_SIZE_F size)
 {
 }
 public void DrawLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point0, [NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point1, ID2D1Brush *brush, float strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = null)
 {
     ((delegate * unmanaged <ID2D1BitmapRenderTarget *, D2D_POINT_2F, D2D_POINT_2F, ID2D1Brush *, float, ID2D1StrokeStyle *, void>)(lpVtbl[15]))((ID2D1BitmapRenderTarget *)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle);
 }
 public void AddLine([NativeTypeName("D2D1_POINT_2F")] D2D_POINT_2F point)
 {
     ((delegate * unmanaged <ID2D1GeometrySink *, D2D_POINT_2F, void>)(lpVtbl[10]))((ID2D1GeometrySink *)Unsafe.AsPointer(ref this), point);
 }