2 writes to NativeGraphics
System.Drawing.Common (2)
System\Drawing\Graphics.cs (2)
75
NativeGraphics
= gdipNativeGraphics;
185
NativeGraphics
= null;
142 references to NativeGraphics
System.Drawing.Common (142)
System\Drawing\Bitmap.cs (1)
93
PInvokeGdiPlus.GdipCreateBitmapFromGraphics(width, height, g.
NativeGraphics
, &bitmap).ThrowIfFailed();
System\Drawing\Drawing2D\GraphicsPath.cs (2)
254
graphics is null ? null : graphics.
NativeGraphics
,
284
graphics is null ? null : graphics.
NativeGraphics
,
System\Drawing\Font.cs (1)
203
if (graphics.
NativeGraphics
is null)
System\Drawing\Graphics.cs (130)
145
CheckStatus(!Gdip.Initialized ? Status.Ok : PInvokeGdiPlus.GdipReleaseDC(
NativeGraphics
, (HDC)hdc));
182
if (
NativeGraphics
is not null)
184
Status status = !Gdip.Initialized ? Status.Ok : PInvokeGdiPlus.GdipDeleteGraphics(
NativeGraphics
);
197
nint IPointer<GpGraphics>.Pointer => (nint)
NativeGraphics
;
204
CheckStatus(PInvokeGdiPlus.GdipGetClip(
NativeGraphics
, region.NativeRegion));
215
CheckStatus(PInvokeGdiPlus.GdipGetClipBounds(
NativeGraphics
, &rect));
228
CheckStatus(PInvokeGdiPlus.GdipGetCompositingMode(
NativeGraphics
, &mode));
236
CheckStatus(PInvokeGdiPlus.GdipSetCompositingMode(
NativeGraphics
, (GdiPlus.CompositingMode)value));
245
CheckStatus(PInvokeGdiPlus.GdipGetCompositingQuality(
NativeGraphics
, &quality));
253
CheckStatus(PInvokeGdiPlus.GdipSetCompositingQuality(
NativeGraphics
, (GdiPlus.CompositingQuality)value));
262
CheckStatus(PInvokeGdiPlus.GdipGetDpiX(
NativeGraphics
, &dpi));
272
CheckStatus(PInvokeGdiPlus.GdipGetDpiY(
NativeGraphics
, &dpi));
285
CheckStatus(PInvokeGdiPlus.GdipGetInterpolationMode(
NativeGraphics
, &mode));
293
CheckStatus(PInvokeGdiPlus.GdipSetInterpolationMode(
NativeGraphics
, (GdiPlus.InterpolationMode)value));
302
CheckStatus(PInvokeGdiPlus.GdipIsClipEmpty(
NativeGraphics
, &isEmpty));
312
CheckStatus(PInvokeGdiPlus.GdipIsVisibleClipEmpty(
NativeGraphics
, &isEmpty));
322
CheckStatus(PInvokeGdiPlus.GdipGetPageScale(
NativeGraphics
, &scale));
325
set => CheckStatus(PInvokeGdiPlus.GdipSetPageScale(
NativeGraphics
, value));
333
CheckStatus(PInvokeGdiPlus.GdipGetPageUnit(
NativeGraphics
, &unit));
341
CheckStatus(PInvokeGdiPlus.GdipSetPageUnit(
NativeGraphics
, (Unit)value));
350
CheckStatus(PInvokeGdiPlus.GdipGetPixelOffsetMode(
NativeGraphics
, &mode));
358
CheckStatus(PInvokeGdiPlus.GdipSetPixelOffsetMode(
NativeGraphics
, (GdiPlus.PixelOffsetMode)value));
367
CheckStatus(PInvokeGdiPlus.GdipGetRenderingOrigin(
NativeGraphics
, &x, &y));
370
set => CheckStatus(PInvokeGdiPlus.GdipSetRenderingOrigin(
NativeGraphics
, value.X, value.Y));
378
CheckStatus(PInvokeGdiPlus.GdipGetSmoothingMode(
NativeGraphics
, &mode));
386
CheckStatus(PInvokeGdiPlus.GdipSetSmoothingMode(
NativeGraphics
, (GdiPlus.SmoothingMode)value));
395
CheckStatus(PInvokeGdiPlus.GdipGetTextContrast(
NativeGraphics
, &textContrast));
398
set => CheckStatus(PInvokeGdiPlus.GdipSetTextContrast(
NativeGraphics
, (uint)value));
409
CheckStatus(PInvokeGdiPlus.GdipGetTextRenderingHint(
NativeGraphics
, &hint));
417
CheckStatus(PInvokeGdiPlus.GdipSetTextRenderingHint(
NativeGraphics
, (GdiPlus.TextRenderingHint)value));
429
CheckStatus(PInvokeGdiPlus.GdipGetWorldTransform(
NativeGraphics
, matrix.NativeMatrix));
434
CheckStatus(PInvokeGdiPlus.GdipSetWorldTransform(
NativeGraphics
, value.NativeMatrix));
456
CheckStatus(PInvokeGdiPlus.GdipGetWorldTransform(
NativeGraphics
, nativeMatrix));
476
CheckStatus(PInvokeGdiPlus.GdipSetWorldTransform(
NativeGraphics
, nativeMatrix));
493
CheckStatus(PInvokeGdiPlus.GdipGetDC(
NativeGraphics
, &hdc));
514
CheckStatus(PInvokeGdiPlus.GdipFlush(
NativeGraphics
, (GdiPlus.FlushIntention)intention));
522
CheckStatus(PInvokeGdiPlus.GdipSetClipGraphics(
NativeGraphics
, g.
NativeGraphics
, (GdiPlus.CombineMode)combineMode));
533
CheckStatus(PInvokeGdiPlus.GdipSetClipRect(
NativeGraphics
, rect.X, rect.Y, rect.Width, rect.Height, (GdiPlus.CombineMode)combineMode));
540
CheckStatus(PInvokeGdiPlus.GdipSetClipPath(
NativeGraphics
, path._nativePath, (GdiPlus.CombineMode)combineMode));
547
CheckStatus(PInvokeGdiPlus.GdipSetClipRegion(
NativeGraphics
, region.NativeRegion, (GdiPlus.CombineMode)combineMode));
555
NativeGraphics
,
562
CheckStatus(PInvokeGdiPlus.GdipSetClipRegion(
NativeGraphics
, region.NativeRegion, GdiPlus.CombineMode.CombineModeIntersect));
568
NativeGraphics
,
575
CheckStatus(PInvokeGdiPlus.GdipSetClipRegion(
NativeGraphics
, region.NativeRegion, GdiPlus.CombineMode.CombineModeExclude));
579
public void ResetClip() => CheckStatus(PInvokeGdiPlus.GdipResetClip(
NativeGraphics
));
581
public void TranslateClip(float dx, float dy) => CheckStatus(PInvokeGdiPlus.GdipTranslateClip(
NativeGraphics
, dx, dy));
583
public void TranslateClip(int dx, int dy) => CheckStatus(PInvokeGdiPlus.GdipTranslateClip(
NativeGraphics
, dx, dy));
592
CheckStatus(PInvokeGdiPlus.GdipIsVisiblePoint(
NativeGraphics
, x, y, &isVisible));
605
CheckStatus(PInvokeGdiPlus.GdipIsVisibleRect(
NativeGraphics
, x, y, width, height, &isVisible));
614
public void ResetTransform() => CheckStatus(PInvokeGdiPlus.GdipResetWorldTransform(
NativeGraphics
));
627
CheckStatus(PInvokeGdiPlus.GdipMultiplyWorldTransform(
NativeGraphics
, matrix.NativeMatrix, (GdiPlus.MatrixOrder)order));
634
CheckStatus(PInvokeGdiPlus.GdipTranslateWorldTransform(
NativeGraphics
, dx, dy, (GdiPlus.MatrixOrder)order));
639
CheckStatus(PInvokeGdiPlus.GdipScaleWorldTransform(
NativeGraphics
, sx, sy, (GdiPlus.MatrixOrder)order));
644
CheckStatus(PInvokeGdiPlus.GdipRotateWorldTransform(
NativeGraphics
, angle, (GdiPlus.MatrixOrder)order));
654
NativeGraphics
,
689
NativeGraphics
,
745
CheckErrorStatus(PInvokeGdiPlus.GdipDrawRectangle(
NativeGraphics
, pen.NativePen, x, y, width, height));
770
CheckErrorStatus(PInvokeGdiPlus.GdipDrawRectangles(
NativeGraphics
, pen.NativePen, (RectF*)r, rects.Length));
795
CheckErrorStatus(PInvokeGdiPlus.GdipDrawRectanglesI(
NativeGraphics
, pen.NativePen, (Rect*)r, rects.Length));
812
CheckErrorStatus(PInvokeGdiPlus.GdipDrawEllipse(
NativeGraphics
, pen.NativePen, x, y, width, height));
838
CheckErrorStatus(PInvokeGdiPlus.GdipDrawPie(
NativeGraphics
, pen.NativePen, x, y, width, height, startAngle, sweepAngle));
869
CheckErrorStatus(PInvokeGdiPlus.GdipDrawPolygon(
NativeGraphics
, pen.NativePen, (GdiPlus.PointF*)p, points.Length));
894
CheckErrorStatus(PInvokeGdiPlus.GdipDrawPolygonI(
NativeGraphics
, pen.NativePen, (GdiPlus.Point*)p, points.Length));
908
CheckErrorStatus(PInvokeGdiPlus.GdipDrawPath(
NativeGraphics
, pen.NativePen, path._nativePath));
929
CheckErrorStatus(PInvokeGdiPlus.GdipDrawCurve(
NativeGraphics
, pen.NativePen, (GdiPlus.PointF*)p, points.Length));
952
NativeGraphics
,
988
NativeGraphics
,
1014
CheckErrorStatus(PInvokeGdiPlus.GdipDrawCurveI(
NativeGraphics
, pen.NativePen, (GdiPlus.Point*)p, points.Length));
1037
NativeGraphics
,
1070
NativeGraphics
,
1098
NativeGraphics
,
1129
NativeGraphics
,
1154
NativeGraphics
,
1180
NativeGraphics
,
1192
public void Clear(Color color) => CheckStatus(PInvokeGdiPlus.GdipGraphicsClear(
NativeGraphics
, (uint)color.ToArgb()));
1226
NativeGraphics
,
1266
CheckErrorStatus(PInvokeGdiPlus.GdipFillRectangles(
NativeGraphics
, brush.NativeBrush, (RectF*)r, rects.Length));
1288
CheckErrorStatus(PInvokeGdiPlus.GdipFillRectanglesI(
NativeGraphics
, brush.NativeBrush, (Rect*)r, rects.Length));
1319
NativeGraphics
,
1358
NativeGraphics
,
1380
NativeGraphics
,
1429
NativeGraphics
,
1461
NativeGraphics
,
1502
NativeGraphics
,
1529
NativeGraphics
,
1565
NativeGraphics
,
1748
NativeGraphics
,
1809
NativeGraphics
,
1977
NativeGraphics
,
2001
Status status = PInvokeGdiPlus.GdipDrawImage(
NativeGraphics
, image.Pointer(), x, y);
2011
Status status = PInvokeGdiPlus.GdipDrawImageRect(
NativeGraphics
, image.Pointer(), x, y, width, height);
2066
Status status = PInvokeGdiPlus.GdipDrawImagePoints(
NativeGraphics
, image.Pointer(), (GdiPlus.PointF*)p, count);
2083
Status status = PInvokeGdiPlus.GdipDrawImagePointsI(
NativeGraphics
, image.Pointer(), (GdiPlus.Point*)p, count);
2094
NativeGraphics
,
2112
NativeGraphics
,
2140
NativeGraphics
,
2185
NativeGraphics
,
2238
NativeGraphics
,
2300
NativeGraphics
,
2377
CheckErrorStatus(PInvokeGdiPlus.GdipDrawLines(
NativeGraphics
, pen.NativePen, (GdiPlus.PointF*)p, points.Length));
2406
CheckErrorStatus(PInvokeGdiPlus.GdipDrawLinesI(
NativeGraphics
, pen.NativePen, (GdiPlus.Point*)p, points.Length));
2424
CheckErrorStatus(PInvokeGdiPlus.GdipDrawLinesI(
NativeGraphics
, pen.NativePen, (GdiPlus.Point*)p, points.Length));
2602
NativeGraphics
,
2628
NativeGraphics
,
2662
PInvokeGdiPlus.GdipGetClip(
NativeGraphics
, regionHandle);
2666
NativeGraphics
,
2774
CheckStatus(PInvokeGdiPlus.GdipGetNearestColor(
NativeGraphics
, &nearest));
2784
CheckErrorStatus(PInvokeGdiPlus.GdipDrawLine(
NativeGraphics
, pen.NativePen, x1, y1, x2, y2));
2805
NativeGraphics
,
2836
NativeGraphics
,
2854
NativeGraphics
,
2871
NativeGraphics
,
2948
NativeGraphics
,
2977
NativeGraphics
,
3012
NativeGraphics
,
3041
NativeGraphics
,
3065
NativeGraphics
,
3106
NativeGraphics
,
3147
NativeGraphics
,
3180
NativeGraphics
,
3390
CheckStatus(PInvokeGdiPlus.GdipGetVisibleClipBounds(
NativeGraphics
, &rect));
3442
Status status = PInvokeGdiPlus.GdipSaveGraphics(
NativeGraphics
, &state);
3460
CheckStatus(PInvokeGdiPlus.GdipRestoreGraphics(
NativeGraphics
, (uint)gstate._nativeState));
3469
Status status = PInvokeGdiPlus.GdipBeginContainer(
NativeGraphics
, (RectF*)&dstrect, (RectF*)&srcrect, (Unit)unit, &state);
3488
Status status = PInvokeGdiPlus.GdipBeginContainer2(
NativeGraphics
, &state);
3506
CheckStatus(PInvokeGdiPlus.GdipEndContainer(
NativeGraphics
, (uint)container._nativeGraphicsContainer));
3518
CheckStatus(PInvokeGdiPlus.GdipComment(
NativeGraphics
, (uint)data.Length, b));
3604
NativeGraphics
,
3636
NativeGraphics
,
System\Drawing\PointerExtensions.cs (1)
25
public static GpGraphics* Pointer(this Graphics? graphics) => graphics is null ? null : graphics.
NativeGraphics
;
System\Drawing\Region.cs (7)
220
CheckStatus(PInvokeGdiPlus.GdipGetRegionBounds(NativeRegion, g.
NativeGraphics
, &bounds));
229
CheckStatus(PInvokeGdiPlus.GdipGetRegionHRgn(NativeRegion, g.
NativeGraphics
, &hrgn));
238
CheckStatus(PInvokeGdiPlus.GdipIsEmptyRegion(NativeRegion, g.
NativeGraphics
, &isEmpty));
247
CheckStatus(PInvokeGdiPlus.GdipIsInfiniteRegion(NativeRegion, g.
NativeGraphics
, &isInfinite));
256
CheckStatus(PInvokeGdiPlus.GdipIsEqualRegion(NativeRegion, region.NativeRegion, g.
NativeGraphics
, &isEqual));
292
g is null ? null : g.
NativeGraphics
,
311
g is null ? null : g.
NativeGraphics
,