394 references to ThrowIfFailed
System.Drawing.Common (381)
System\Drawing\Bitmap.cs (14)
43status.ThrowIfFailed(); 64status.ThrowIfFailed(); 93PInvokeGdiPlus.GdipCreateBitmapFromGraphics(width, height, g.NativeGraphics, &bitmap).ThrowIfFailed(); 101PInvokeGdiPlus.GdipCreateBitmapFromScan0(width, height, stride, (int)format, (byte*)scan0, &bitmap).ThrowIfFailed(); 108PInvokeGdiPlus.GdipCreateBitmapFromScan0(width, height, 0, (int)format, null, &bitmap).ThrowIfFailed(); 137PInvokeGdiPlus.GdipCreateBitmapFromHICON((HICON)hicon, &bitmap).ThrowIfFailed(); 147PInvokeGdiPlus.GdipCreateBitmapFromResource((HINSTANCE)hinstance, bn, &bitmap).ThrowIfFailed(); 182PInvokeGdiPlus.GdipCreateHICONFromBitmap(this.Pointer(), &hicon).ThrowIfFailed(); 310PInvokeGdiPlus.GdipBitmapGetPixel(this.Pointer(), x, y, &color).ThrowIfFailed(); 332PInvokeGdiPlus.GdipBitmapSetPixel(this.Pointer(), x, y, (uint)color.ToArgb()).ThrowIfFailed(); 338PInvokeGdiPlus.GdipBitmapSetResolution(this.Pointer(), xDpi, yDpi).ThrowIfFailed(); 380auxDataSize: null).ThrowIfFailed(); 461alphaThresholdPercent).ThrowIfFailed(); 474alphaThresholdPercent).ThrowIfFailed();
System\Drawing\Drawing2D\AdjustableArrowCap.cs (9)
15PInvokeGdiPlus.GdipCreateAdjustableArrowCap(height, width, isFilled, &nativeCap).ThrowIfFailed(); 26PInvokeGdiPlus.GdipGetAdjustableArrowCapHeight(NativeArrowCap, &height).ThrowIfFailed(); 32PInvokeGdiPlus.GdipSetAdjustableArrowCapHeight(NativeArrowCap, value).ThrowIfFailed(); 42PInvokeGdiPlus.GdipGetAdjustableArrowCapWidth(NativeArrowCap, &width).ThrowIfFailed(); 48PInvokeGdiPlus.GdipSetAdjustableArrowCapWidth(NativeArrowCap, value).ThrowIfFailed(); 58PInvokeGdiPlus.GdipGetAdjustableArrowCapMiddleInset(NativeArrowCap, &middleInset).ThrowIfFailed(); 64PInvokeGdiPlus.GdipSetAdjustableArrowCapMiddleInset(NativeArrowCap, value).ThrowIfFailed(); 74PInvokeGdiPlus.GdipGetAdjustableArrowCapFillState(NativeArrowCap, &isFilled).ThrowIfFailed(); 80PInvokeGdiPlus.GdipSetAdjustableArrowCapFillState(NativeArrowCap, value).ThrowIfFailed();
System\Drawing\Drawing2D\CustomLineCap.cs (12)
27&lineCap).ThrowIfFailed(); 94PInvokeGdiPlus.GdipCloneCustomLineCap(_nativeCap, &clonedCap).ThrowIfFailed(); 101PInvokeGdiPlus.GdipSetCustomLineCapStrokeCaps(_nativeCap, (GdiPlus.LineCap)startCap, (GdiPlus.LineCap)endCap).ThrowIfFailed(); 110PInvokeGdiPlus.GdipGetCustomLineCapStrokeCaps(_nativeCap, (GdiPlus.LineCap*)sc, (GdiPlus.LineCap*)ec).ThrowIfFailed(); 120PInvokeGdiPlus.GdipGetCustomLineCapStrokeJoin(_nativeCap, (GdiPlus.LineJoin*)&lineJoin).ThrowIfFailed(); 126PInvokeGdiPlus.GdipSetCustomLineCapStrokeJoin(_nativeCap, (GdiPlus.LineJoin)value).ThrowIfFailed(); 136PInvokeGdiPlus.GdipGetCustomLineCapBaseCap(_nativeCap, (GdiPlus.LineCap*)&baseCap).ThrowIfFailed(); 142PInvokeGdiPlus.GdipSetCustomLineCapBaseCap(_nativeCap, (GdiPlus.LineCap)value).ThrowIfFailed(); 152PInvokeGdiPlus.GdipGetCustomLineCapBaseInset(_nativeCap, &inset).ThrowIfFailed(); 158PInvokeGdiPlus.GdipSetCustomLineCapBaseInset(_nativeCap, value).ThrowIfFailed(); 168PInvokeGdiPlus.GdipGetCustomLineCapWidthScale(_nativeCap, &widthScale).ThrowIfFailed(); 174PInvokeGdiPlus.GdipSetCustomLineCapWidthScale(_nativeCap, value).ThrowIfFailed();
System\Drawing\Drawing2D\GraphicsPath.cs (44)
22PInvokeGdiPlus.GdipCreatePath((GdiPlus.FillMode)fillMode, &path).ThrowIfFailed(); 52PInvokeGdiPlus.GdipCreatePath2((GdiPlus.PointF*)p, t, types.Length, (GdiPlus.FillMode)fillMode, &path).ThrowIfFailed(); 88PInvokeGdiPlus.GdipCreatePath2I((GdiPlus.Point*)p, t, types.Length, (GdiPlus.FillMode)fillMode, &path).ThrowIfFailed(); 96PInvokeGdiPlus.GdipClonePath(_nativePath, &path).ThrowIfFailed(); 144PInvokeGdiPlus.GdipResetPath(_nativePath).ThrowIfFailed(); 153PInvokeGdiPlus.GdipGetPathFillMode(_nativePath, &fillMode).ThrowIfFailed(); 162PInvokeGdiPlus.GdipSetPathFillMode(_nativePath, (GdiPlus.FillMode)value).ThrowIfFailed(); 192PInvokeGdiPlus.GdipGetPathData(_nativePath, (GdiPlus.PathData*)&data).ThrowIfFailed(); 208PInvokeGdiPlus.GdipClosePathFigure(_nativePath).ThrowIfFailed(); 214PInvokeGdiPlus.GdipClosePathFigures(_nativePath).ThrowIfFailed(); 220PInvokeGdiPlus.GdipSetPathMarker(_nativePath).ThrowIfFailed(); 226PInvokeGdiPlus.GdipClearPathMarkers(_nativePath).ThrowIfFailed(); 232PInvokeGdiPlus.GdipReversePath(_nativePath).ThrowIfFailed(); 255&isVisible).ThrowIfFailed(); 285&isVisible).ThrowIfFailed(); 307PInvokeGdiPlus.GdipAddPathLine(_nativePath, x1, y1, x2, y2).ThrowIfFailed(); 341PInvokeGdiPlus.GdipAddPathLine2(_nativePath, (GdiPlus.PointF*)p, points.Length).ThrowIfFailed(); 368PInvokeGdiPlus.GdipAddPathLine2I(_nativePath, (GdiPlus.Point*)p, points.Length).ThrowIfFailed(); 378PInvokeGdiPlus.GdipAddPathArc(_nativePath, x, y, width, height, startAngle, sweepAngle).ThrowIfFailed(); 393PInvokeGdiPlus.GdipAddPathBezier(_nativePath, x1, y1, x2, y2, x3, y3, x4, y4).ThrowIfFailed(); 413PInvokeGdiPlus.GdipAddPathBeziers(_nativePath, (GdiPlus.PointF*)p, points.Length).ThrowIfFailed(); 440PInvokeGdiPlus.GdipAddPathBeziersI(_nativePath, (GdiPlus.Point*)p, points.Length).ThrowIfFailed(); 475tension).ThrowIfFailed(); 500tension).ThrowIfFailed(); 523tension).ThrowIfFailed(); 548tension).ThrowIfFailed(); 575PInvokeGdiPlus.GdipAddPathClosedCurve2(_nativePath, (GdiPlus.PointF*)p, points.Length, tension).ThrowIfFailed(); 605PInvokeGdiPlus.GdipAddPathClosedCurve2I(_nativePath, (GdiPlus.Point*)p, points.Length, tension).ThrowIfFailed(); 614rect.X, rect.Y, rect.Width, rect.Height).ThrowIfFailed(); 634PInvokeGdiPlus.GdipAddPathRectangles(_nativePath, (RectF*)r, rects.Length).ThrowIfFailed(); 654PInvokeGdiPlus.GdipAddPathRectanglesI(_nativePath, (Rect*)r, rects.Length).ThrowIfFailed(); 705PInvokeGdiPlus.GdipAddPathEllipse(_nativePath, x, y, width, height).ThrowIfFailed(); 722sweepAngle).ThrowIfFailed(); 743PInvokeGdiPlus.GdipAddPathPolygon(_nativePath, (GdiPlus.PointF*)p, points.Length).ThrowIfFailed(); 764PInvokeGdiPlus.GdipAddPathPolygonI(_nativePath, (GdiPlus.Point*)p, points.Length).ThrowIfFailed(); 772PInvokeGdiPlus.GdipAddPathPath(_nativePath, addingPath.Pointer(), connect).ThrowIfFailed(); 811PInvokeGdiPlus.GdipTransformPath(_nativePath, matrix.NativeMatrix).ThrowIfFailed(); 827pen.Pointer()).ThrowIfFailed(); 841PInvokeGdiPlus.GdipFlattenPath(_nativePath, matrix.Pointer(), flatness).ThrowIfFailed(); 858PInvokeGdiPlus.GdipWidenPath(_nativePath, pen.Pointer(), matrix.Pointer(), flatness).ThrowIfFailed(); 918flatness).ThrowIfFailed(); 929PInvokeGdiPlus.GdipGetPointCount(_nativePath, &count).ThrowIfFailed(); 974PInvokeGdiPlus.GdipGetPathTypes(_nativePath, t, destination.Length).ThrowIfFailed(); 1019PInvokeGdiPlus.GdipGetPathPoints(_nativePath, (GdiPlus.PointF*)p, destination.Length).ThrowIfFailed();
System\Drawing\Drawing2D\GraphicsPathIterator.cs (12)
14PInvokeGdiPlus.GdipCreatePathIter(&iterator, path.Pointer()).ThrowIfFailed(); 64PInvokeGdiPlus.GdipPathIterNextSubpath(_nativeIterator, &resultCount, s, e, &tempIsClosed).ThrowIfFailed(); 75PInvokeGdiPlus.GdipPathIterNextSubpathPath(_nativeIterator, &resultCount, path.Pointer(), &tempIsClosed).ThrowIfFailed(); 88PInvokeGdiPlus.GdipPathIterNextPathType(_nativeIterator, &resultCount, pt, s, e).ThrowIfFailed(); 100PInvokeGdiPlus.GdipPathIterNextMarker(_nativeIterator, &resultCount, s, e).ThrowIfFailed(); 109PInvokeGdiPlus.GdipPathIterNextMarkerPath(_nativeIterator, &resultCount, path.Pointer()).ThrowIfFailed(); 119PInvokeGdiPlus.GdipPathIterGetCount(_nativeIterator, &resultCount).ThrowIfFailed(); 130PInvokeGdiPlus.GdipPathIterGetSubpathCount(_nativeIterator, &resultCount).ThrowIfFailed(); 139PInvokeGdiPlus.GdipPathIterHasCurve(_nativeIterator, &hasCurve).ThrowIfFailed(); 146PInvokeGdiPlus.GdipPathIterRewind(_nativeIterator).ThrowIfFailed(); 182points.Length).ThrowIfFailed(); 231endIndex).ThrowIfFailed();
System\Drawing\Drawing2D\HatchBrush.cs (5)
21PInvokeGdiPlus.GdipCreateHatchBrush((GdiPlus.HatchStyle)hatchstyle, (ARGB)foreColor, (ARGB)backColor, &nativeBrush).ThrowIfFailed(); 34PInvokeGdiPlus.GdipCloneBrush(NativeBrush, &clonedBrush).ThrowIfFailed(); 44PInvokeGdiPlus.GdipGetHatchStyle((GpHatch*)NativeBrush, &hatchStyle).ThrowIfFailed(); 55PInvokeGdiPlus.GdipGetHatchForegroundColor((GpHatch*)NativeBrush, (uint*)&foregroundArgb).ThrowIfFailed(); 66PInvokeGdiPlus.GdipGetHatchBackgroundColor((GpHatch*)NativeBrush, (uint*)&backgroundArgb).ThrowIfFailed();
System\Drawing\Drawing2D\LinearGradientBrush.cs (26)
19&nativeBrush).ThrowIfFailed(); 44&nativeBrush).ThrowIfFailed(); 72&nativeBrush).ThrowIfFailed(); 98PInvokeGdiPlus.GdipCloneBrush(NativeBrush, &clonedBrush).ThrowIfFailed(); 108PInvokeGdiPlus.GdipGetLineColors(NativeLineGradient, colors).ThrowIfFailed(); 119PInvokeGdiPlus.GdipSetLineColors(NativeLineGradient, (uint)value[0].ToArgb(), (uint)value[1].ToArgb()).ThrowIfFailed(); 129PInvokeGdiPlus.GdipGetLineRect(NativeLineGradient, (RectF*)&rect).ThrowIfFailed(); 140PInvokeGdiPlus.GdipGetLineGammaCorrection(NativeLineGradient, &useGammaCorrection).ThrowIfFailed(); 146PInvokeGdiPlus.GdipSetLineGammaCorrection(NativeLineGradient, value).ThrowIfFailed(); 162PInvokeGdiPlus.GdipGetLineBlendCount(NativeLineGradient, &count).ThrowIfFailed(); 174PInvokeGdiPlus.GdipGetLineBlend(NativeLineGradient, f, p, count).ThrowIfFailed(); 190PInvokeGdiPlus.GdipSetLineBlend(NativeLineGradient, f, p, value.Factors.Length).ThrowIfFailed(); 200PInvokeGdiPlus.GdipSetLineSigmaBlend(NativeLineGradient, focus, scale).ThrowIfFailed(); 209PInvokeGdiPlus.GdipSetLineLinearBlend(NativeLineGradient, focus, scale).ThrowIfFailed(); 218PInvokeGdiPlus.GdipGetLinePresetBlendCount(NativeLineGradient, &count).ThrowIfFailed(); 234PInvokeGdiPlus.GdipGetLinePresetBlend(NativeLineGradient, c, p, count).ThrowIfFailed(); 260PInvokeGdiPlus.GdipSetLinePresetBlend(NativeLineGradient, a, p, count).ThrowIfFailed(); 271PInvokeGdiPlus.GdipGetLineWrapMode(NativeLineGradient, (GdiPlus.WrapMode*)&mode).ThrowIfFailed(); 280PInvokeGdiPlus.GdipSetLineWrapMode(NativeLineGradient, (GdiPlus.WrapMode)value).ThrowIfFailed(); 290PInvokeGdiPlus.GdipGetLineTransform(NativeLineGradient, matrix.NativeMatrix).ThrowIfFailed(); 297PInvokeGdiPlus.GdipSetLineTransform(NativeLineGradient, value.NativeMatrix).ThrowIfFailed(); 305PInvokeGdiPlus.GdipResetLineTransform(NativeLineGradient).ThrowIfFailed(); 315PInvokeGdiPlus.GdipMultiplyLineTransform(NativeLineGradient, matrix.NativeMatrix, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 323PInvokeGdiPlus.GdipTranslateLineTransform(NativeLineGradient, dx, dy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 331PInvokeGdiPlus.GdipScaleLineTransform(NativeLineGradient, sx, sy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 339PInvokeGdiPlus.GdipRotateLineTransform(NativeLineGradient, angle, (GdiPlus.MatrixOrder)order).ThrowIfFailed();
System\Drawing\Drawing2D\Matrix.cs (25)
15PInvokeGdiPlus.GdipCreateMatrix(&matrix).ThrowIfFailed(); 22PInvokeGdiPlus.GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, &matrix).ThrowIfFailed(); 46&nativeMatrix).ThrowIfFailed(); 60PInvokeGdiPlus.GdipCreateMatrix3((RectF*)&rect, (GdiPlus.PointF*)p, &matrix).ThrowIfFailed(); 74PInvokeGdiPlus.GdipCreateMatrix3I((Rect*)&rect, (GdiPlus.Point*)p, &matrix).ThrowIfFailed(); 103PInvokeGdiPlus.GdipCloneMatrix(NativeMatrix, &matrix).ThrowIfFailed(); 126PInvokeGdiPlus.GdipGetMatrixElements(NativeMatrix, (float*)&matrix).ThrowIfFailed(); 139value.M32).ThrowIfFailed(); 151PInvokeGdiPlus.GdipGetMatrixElements(NativeMatrix, m).ThrowIfFailed(); 1751.0f, 0.0f, 0.0f).ThrowIfFailed(); 189PInvokeGdiPlus.GdipMultiplyMatrix(NativeMatrix, matrix.NativeMatrix, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 198PInvokeGdiPlus.GdipTranslateMatrix(NativeMatrix, offsetX, offsetY, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 206PInvokeGdiPlus.GdipScaleMatrix(NativeMatrix, scaleX, scaleY, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 214PInvokeGdiPlus.GdipRotateMatrix(NativeMatrix, angle, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 235status.ThrowIfFailed(); 241PInvokeGdiPlus.GdipShearMatrix(NativeMatrix, shearX, shearY, GdiPlus.MatrixOrder.MatrixOrderPrepend).ThrowIfFailed(); 247PInvokeGdiPlus.GdipShearMatrix(NativeMatrix, shearX, shearY, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 253PInvokeGdiPlus.GdipInvertMatrix(NativeMatrix).ThrowIfFailed(); 277pts.Length).ThrowIfFailed(); 306pts.Length).ThrowIfFailed(); 335pts.Length).ThrowIfFailed(); 369pts.Length).ThrowIfFailed(); 380PInvokeGdiPlus.GdipIsMatrixInvertible(NativeMatrix, &invertible).ThrowIfFailed(); 391PInvokeGdiPlus.GdipIsMatrixIdentity(NativeMatrix, &identity).ThrowIfFailed(); 406&equal).ThrowIfFailed();
System\Drawing\Drawing2D\PathGradientBrush.cs (31)
50&nativeBrush).ThrowIfFailed(); 91&nativeBrush).ThrowIfFailed(); 101PInvokeGdiPlus.GdipCreatePathGradientFromPath(path._nativePath, &nativeBrush).ThrowIfFailed(); 116PInvokeGdiPlus.GdipCloneBrush(NativeBrush, &clonedBrush).ThrowIfFailed(); 126PInvokeGdiPlus.GdipGetPathGradientCenterColor(NativePathGradient, (uint*)&argb).ThrowIfFailed(); 132PInvokeGdiPlus.GdipSetPathGradientCenterColor(NativePathGradient, (ARGB)value).ThrowIfFailed(); 142PInvokeGdiPlus.GdipGetPathGradientSurroundColorCount(NativePathGradient, &count).ThrowIfFailed(); 147PInvokeGdiPlus.GdipGetPathGradientSurroundColorsWithCount(NativePathGradient, b, &count).ThrowIfFailed(); 164&count).ThrowIfFailed(); 176PInvokeGdiPlus.GdipGetPathGradientCenterPoint(NativePathGradient, (GdiPlus.PointF*)&point).ThrowIfFailed(); 182PInvokeGdiPlus.GdipSetPathGradientCenterPoint(NativePathGradient, (GdiPlus.PointF*)&value).ThrowIfFailed(); 192PInvokeGdiPlus.GdipGetPathGradientRect(NativePathGradient, (RectF*)&rect).ThrowIfFailed(); 204PInvokeGdiPlus.GdipGetPathGradientBlendCount(NativePathGradient, &count).ThrowIfFailed(); 212PInvokeGdiPlus.GdipGetPathGradientBlend(NativePathGradient, f, p, count).ThrowIfFailed(); 239PInvokeGdiPlus.GdipSetPathGradientBlend(NativePathGradient, f, p, count).ThrowIfFailed(); 249PInvokeGdiPlus.GdipSetPathGradientSigmaBlend(NativePathGradient, focus, scale).ThrowIfFailed(); 257PInvokeGdiPlus.GdipSetPathGradientLinearBlend(NativePathGradient, focus, scale).ThrowIfFailed(); 267PInvokeGdiPlus.GdipGetPathGradientPresetBlendCount(NativePathGradient, &count).ThrowIfFailed(); 283PInvokeGdiPlus.GdipGetPathGradientPresetBlend(NativePathGradient, c, p, count).ThrowIfFailed(); 306PInvokeGdiPlus.GdipSetPathGradientPresetBlend(NativePathGradient, a, p, count).ThrowIfFailed(); 317PInvokeGdiPlus.GdipGetPathGradientTransform(NativePathGradient, matrix.NativeMatrix).ThrowIfFailed(); 324PInvokeGdiPlus.GdipSetPathGradientTransform(NativePathGradient, value.NativeMatrix).ThrowIfFailed(); 332PInvokeGdiPlus.GdipResetPathGradientTransform(NativePathGradient).ThrowIfFailed(); 344(GdiPlus.MatrixOrder)order).ThrowIfFailed(); 354PInvokeGdiPlus.GdipTranslatePathGradientTransform(NativePathGradient, dx, dy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 362PInvokeGdiPlus.GdipScalePathGradientTransform(NativePathGradient, sx, sy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 370PInvokeGdiPlus.GdipRotatePathGradientTransform(NativePathGradient, angle, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 380PInvokeGdiPlus.GdipGetPathGradientFocusScales(NativePathGradient, &scaleX, &scaleY).ThrowIfFailed(); 386PInvokeGdiPlus.GdipSetPathGradientFocusScales(NativePathGradient, value.X, value.Y).ThrowIfFailed(); 396PInvokeGdiPlus.GdipGetPathGradientWrapMode(NativePathGradient, (GdiPlus.WrapMode*)&mode).ThrowIfFailed(); 405PInvokeGdiPlus.GdipSetPathGradientWrapMode(NativePathGradient, (GdiPlus.WrapMode)value).ThrowIfFailed();
System\Drawing\Font.cs (8)
210PInvokeGdiPlus.GdipGetFontHeight(NativeFont, graphics.Pointer(), &height).ThrowIfFailed(); 219PInvokeGdiPlus.GdipGetFontHeightGivenDPI(NativeFont, dpi, &height).ThrowIfFailed(); 311PInvokeGdiPlus.GdipGetLogFont(NativeFont, graphics.Pointer(), (LOGFONTW*)lf).ThrowIfFailed(); 485PInvokeGdiPlus.GdipGetFontUnit(_nativeFont, (Unit*)&unit).ThrowIfFailed(); 486PInvokeGdiPlus.GdipGetFontSize(_nativeFont, &size).ThrowIfFailed(); 487PInvokeGdiPlus.GdipGetFontStyle(_nativeFont, (int*)&style).ThrowIfFailed(); 488PInvokeGdiPlus.GdipGetFamily(_nativeFont, &family).ThrowIfFailed(); 678PInvokeGdiPlus.GdipCloneFont(_nativeFont, &font).ThrowIfFailed();
System\Drawing\FontFamily.cs (12)
38PInvokeGdiPlus.GdipCloneFontFamily(family, &clonedFamily).ThrowIfFailed(); 118status.ThrowIfFailed(); 143PInvokeGdiPlus.GdipGetGenericFontFamilySerif(&nativeFamily).ThrowIfFailed(); 146PInvokeGdiPlus.GdipGetGenericFontFamilySansSerif(&nativeFamily).ThrowIfFailed(); 150PInvokeGdiPlus.GdipGetGenericFontFamilyMonospace(&nativeFamily).ThrowIfFailed(); 242PInvokeGdiPlus.GdipGetFamilyName(NativeFamily, name, language).ThrowIfFailed(); 260PInvokeGdiPlus.GdipGetGenericFontFamilySansSerif(&nativeFamily).ThrowIfFailed(); 291PInvokeGdiPlus.GdipIsStyleAvailable(NativeFamily, (int)style, &isStyleAvailable).ThrowIfFailed(); 302PInvokeGdiPlus.GdipGetEmHeight(NativeFamily, (int)style, &emHeight).ThrowIfFailed(); 313PInvokeGdiPlus.GdipGetCellAscent(NativeFamily, (int)style, &cellAscent).ThrowIfFailed(); 324PInvokeGdiPlus.GdipGetCellDescent(NativeFamily, (int)style, &cellDescent).ThrowIfFailed(); 336PInvokeGdiPlus.GdipGetLineSpacing(NativeFamily, (int)style, &lineSpacing).ThrowIfFailed();
System\Drawing\Gdiplus.cs (1)
20internal static void CheckStatus(Status status) => status.ThrowIfFailed();
System\Drawing\Graphics.cs (10)
2953imageAttr.Pointer()).ThrowIfFailed(); 2982imageAttr.Pointer()).ThrowIfFailed(); 3017imageAttr.Pointer()).ThrowIfFailed(); 3046imageAttr.Pointer()).ThrowIfFailed(); 3072imageAttr.Pointer()).ThrowIfFailed(); 3113imageAttr.Pointer()).ThrowIfFailed(); 3154imageAttr.Pointer()).ThrowIfFailed(); 3187imageAttr.Pointer()).ThrowIfFailed(); 3642(Unit)srcUnit).ThrowIfFailed(); 3653status.ThrowIfFailed();
System\Drawing\Image.cs (38)
106PInvokeGdiPlus.GdipLoadImageFromFileICM(fn, &image).ThrowIfFailed(); 110PInvokeGdiPlus.GdipLoadImageFromFile(fn, &image).ThrowIfFailed(); 151PInvokeGdiPlus.GdipGetImageType(_nativeImage, &type).ThrowIfFailed(); 168PInvokeGdiPlus.GdipLoadImageFromStreamICM(stream, &image).ThrowIfFailed(); 172PInvokeGdiPlus.GdipLoadImageFromStream(stream, &image).ThrowIfFailed(); 200PInvokeGdiPlus.GdipCloneImage(_nativeImage, &cloneImage).ThrowIfFailed(); 275PInvokeGdiPlus.GdipSaveImageToFile(_nativeImage, fn, &encoder, nativeParameters).ThrowIfFailed(); 346PInvokeGdiPlus.GdipSaveAdd(_nativeImage, nativeParameters).ThrowIfFailed(); 378PInvokeGdiPlus.GdipSaveAddImage(_nativeImage, image._nativeImage, nativeParameters).ThrowIfFailed(); 412PInvokeGdiPlus.GdipGetImageDimension(_nativeImage, &width, &height).ThrowIfFailed(); 434PInvokeGdiPlus.GdipGetImageWidth(_nativeImage, &width).ThrowIfFailed(); 451PInvokeGdiPlus.GdipGetImageHeight(_nativeImage, &height).ThrowIfFailed(); 465PInvokeGdiPlus.GdipGetImageHorizontalResolution(_nativeImage, &horzRes).ThrowIfFailed(); 479PInvokeGdiPlus.GdipGetImageVerticalResolution(_nativeImage, &vertRes).ThrowIfFailed(); 494PInvokeGdiPlus.GdipGetImageFlags(_nativeImage, &flags).ThrowIfFailed(); 508PInvokeGdiPlus.GdipGetImageRawFormat(_nativeImage, &guid).ThrowIfFailed(); 528PInvokeGdiPlus.GdipGetPropertyCount(_nativeImage, &count).ThrowIfFailed(); 537PInvokeGdiPlus.GdipGetPropertyIdList(_nativeImage, count, (uint*)pPropid).ThrowIfFailed(); 554PInvokeGdiPlus.GdipGetPropertySize(_nativeImage, &size, &count).ThrowIfFailed(); 602PInvokeGdiPlus.GdipGetImagePaletteSize(_nativeImage, &size).ThrowIfFailed(); 607PInvokeGdiPlus.GdipGetImagePalette(_nativeImage, (GdiPlus.ColorPalette*)b, size).ThrowIfFailed(); 617PInvokeGdiPlus.GdipSetImagePalette(_nativeImage, (GdiPlus.ColorPalette*)b).ThrowIfFailed(); 640null).ThrowIfFailed(); 650PInvokeGdiPlus.GdipImageForceValidation(image).ThrowIfFailed(); 666PInvokeGdiPlus.GdipImageGetFrameCount(_nativeImage, &dimensionID, &count).ThrowIfFailed(); 677PInvokeGdiPlus.GdipGetPropertyItemSize(_nativeImage, (uint)propid, &size).ThrowIfFailed(); 688PInvokeGdiPlus.GdipGetPropertyItem(_nativeImage, (uint)propid, size, property).ThrowIfFailed(); 700PInvokeGdiPlus.GdipImageSelectActiveFrame(_nativeImage, &dimensionID, (uint)frameIndex).ThrowIfFailed(); 720PInvokeGdiPlus.GdipSetPropertyItem(_nativeImage, &native).ThrowIfFailed(); 727PInvokeGdiPlus.GdipImageRotateFlip(_nativeImage, (GdiPlus.RotateFlipType)rotateFlipType).ThrowIfFailed(); 736PInvokeGdiPlus.GdipRemovePropertyItem(_nativeImage, (uint)propid).ThrowIfFailed(); 748PInvokeGdiPlus.GdipGetEncoderParameterListSize(_nativeImage, &encoder, &size).ThrowIfFailed(); 762(GdiPlus.EncoderParameters*)b).ThrowIfFailed(); 782PInvokeGdiPlus.GdipCreateBitmapFromHBITMAP((HBITMAP)hbitmap, (HPALETTE)hpalette, &bitmap).ThrowIfFailed(); 825PInvokeGdiPlus.GdipImageGetFrameDimensionsCount(_nativeImage, &count).ThrowIfFailed(); 836PInvokeGdiPlus.GdipImageGetFrameDimensionsList(_nativeImage, g, count).ThrowIfFailed(); 880PInvokeGdiPlus.GdipImageGetFrameDimensionsCount(image._nativeImage, &dimensions).ThrowIfFailed(); 890PInvokeGdiPlus.GdipImageGetFrameDimensionsList(image._nativeImage, g, dimensions).ThrowIfFailed();
System\Drawing\Imaging\ColorPalette.cs (1)
111bitmap is null ? null : bitmap.GetPointer()).ThrowIfFailed();
System\Drawing\Imaging\Effects\ColorMatrixEffect.cs (1)
29PInvokeGdiPlus.GdipSetEffectParameters(NativeEffect, p, (uint)sizeof(GdiPlus.ColorMatrix)).ThrowIfFailed();
System\Drawing\Imaging\Effects\Effect.cs (2)
20PInvokeGdiPlus.GdipCreateEffect(guid, &nativeEffect).ThrowIfFailed(); 34PInvokeGdiPlus.GdipSetEffectParameters(NativeEffect, p, (uint)sizeof(T)).ThrowIfFailed();
System\Drawing\Imaging\ImageAttributes.cs (17)
58PInvokeGdiPlus.GdipCreateImageAttributes(&newImageAttributes).ThrowIfFailed(); 92PInvokeGdiPlus.GdipCloneImageAttributes(_nativeImageAttributes, &clone).ThrowIfFailed(); 132(ColorMatrixFlags)ColorMatrixFlag.Default).ThrowIfFailed(); 165(ColorMatrixFlags)mode).ThrowIfFailed(); 178(ColorMatrixFlags)mode).ThrowIfFailed(); 199threshold).ThrowIfFailed(); 218gamma).ThrowIfFailed(); 236enableFlag).ThrowIfFailed(); 258(uint)colorHigh.ToArgb()).ThrowIfFailed(); 279(ColorChannelFlags)flags).ThrowIfFailed(); 298n).ThrowIfFailed(); 312ColorChannelFlags.ColorChannelFlagsLast).ThrowIfFailed(); 375(GdiPlus.ColorMap*)m).ThrowIfFailed(); 400(GdiPlus.ColorMap*)m).ThrowIfFailed(); 422null).ThrowIfFailed(); 449clamp).ThrowIfFailed(); 462(GdiPlus.ColorAdjustType)type).ThrowIfFailed();
System\Drawing\Imaging\ImageCodecInfo.cs (4)
47PInvokeGdiPlus.GdipGetImageDecodersSize(&numDecoders, &size).ThrowIfFailed(); 53PInvokeGdiPlus.GdipGetImageDecoders(numDecoders, size, (GdiPlus.ImageCodecInfo*)b).ThrowIfFailed(); 68PInvokeGdiPlus.GdipGetImageEncodersSize(&numEncoders, &size).ThrowIfFailed(); 74PInvokeGdiPlus.GdipGetImageEncoders(numEncoders, size, (GdiPlus.ImageCodecInfo*)b).ThrowIfFailed();
System\Drawing\Imaging\Metafile.cs (19)
39&metafile).ThrowIfFailed(); 52PInvokeGdiPlus.GdipCreateMetafileFromEmf((HENHMETAFILE)henhmetafile, deleteEmf, &metafile).ThrowIfFailed(); 66PInvokeGdiPlus.GdipCreateMetafileFromFile(fn, &metafile).ThrowIfFailed(); 132&metafile).ThrowIfFailed(); 228&metafile).ThrowIfFailed(); 348PInvokeGdiPlus.GdipCreateMetafileFromStream(iStream, &metafile).ThrowIfFailed(); 366&metafile).ThrowIfFailed(); 390&metafile).ThrowIfFailed(); 415&metafile).ThrowIfFailed(); 441&metafile).ThrowIfFailed(); 465&metafile).ThrowIfFailed(); 490&metafile).ThrowIfFailed(); 515&metafile).ThrowIfFailed(); 546d).ThrowIfFailed(); 562PInvokeGdiPlus.GdipGetMetafileHeaderFromWmf((HMETAFILE)hmetafile, wmf, mf).ThrowIfFailed(); 575PInvokeGdiPlus.GdipGetMetafileHeaderFromEmf((HENHMETAFILE)henhmetafile, mf).ThrowIfFailed(); 593PInvokeGdiPlus.GdipGetMetafileHeaderFromFile(fn, mf).ThrowIfFailed(); 610PInvokeGdiPlus.GdipGetMetafileHeaderFromStream(iStream, mf).ThrowIfFailed(); 624PInvokeGdiPlus.GdipGetMetafileHeaderFromMetafile(this.Pointer(), mf).ThrowIfFailed();
System\Drawing\Pen.cs (44)
48PInvokeGdiPlus.GdipCreatePen1((uint)color.ToArgb(), width, (int)GraphicsUnit.World, &pen).ThrowIfFailed(); 71PInvokeGdiPlus.GdipCreatePen2(brush.NativeBrush, width, (int)GraphicsUnit.World, &pen).ThrowIfFailed(); 91PInvokeGdiPlus.GdipClonePen(NativePen, &clonedPen).ThrowIfFailed(); 140PInvokeGdiPlus.GdipGetPenWidth(NativePen, &width).ThrowIfFailed(); 151PInvokeGdiPlus.GdipSetPenWidth(NativePen, value).ThrowIfFailed(); 170(GdiPlus.DashCap)dashCap).ThrowIfFailed(); 183PInvokeGdiPlus.GdipGetPenStartCap(NativePen, (GdiPlus.LineCap*)&startCap).ThrowIfFailed(); 212PInvokeGdiPlus.GdipSetPenStartCap(NativePen, (GdiPlus.LineCap)value).ThrowIfFailed(); 225PInvokeGdiPlus.GdipGetPenEndCap(NativePen, (GdiPlus.LineCap*)&endCap).ThrowIfFailed(); 254PInvokeGdiPlus.GdipSetPenEndCap(NativePen, (GdiPlus.LineCap)value).ThrowIfFailed(); 267PInvokeGdiPlus.GdipGetPenCustomStartCap(NativePen, &lineCap).ThrowIfFailed(); 278PInvokeGdiPlus.GdipSetPenCustomStartCap(NativePen, value is null ? null : value._nativeCap).ThrowIfFailed(); 292PInvokeGdiPlus.GdipGetPenCustomEndCap(NativePen, &lineCap).ThrowIfFailed(); 303PInvokeGdiPlus.GdipSetPenCustomEndCap(NativePen, value is null ? null : value._nativeCap).ThrowIfFailed(); 317PInvokeGdiPlus.GdipGetPenDashCap197819(NativePen, (GdiPlus.DashCap*)&dashCap).ThrowIfFailed(); 333PInvokeGdiPlus.GdipSetPenDashCap197819(NativePen, (GdiPlus.DashCap)value).ThrowIfFailed(); 346PInvokeGdiPlus.GdipGetPenLineJoin(NativePen, (GdiPlus.LineJoin*)&lineJoin).ThrowIfFailed(); 362PInvokeGdiPlus.GdipSetPenLineJoin(NativePen, (GdiPlus.LineJoin)value).ThrowIfFailed(); 375PInvokeGdiPlus.GdipGetPenMiterLimit(NativePen, &miterLimit).ThrowIfFailed(); 386PInvokeGdiPlus.GdipSetPenMiterLimit(NativePen, value).ThrowIfFailed(); 399PInvokeGdiPlus.GdipGetPenMode(NativePen, (GdiPlus.PenAlignment*)&penMode).ThrowIfFailed(); 415PInvokeGdiPlus.GdipSetPenMode(NativePen, (GdiPlus.PenAlignment)value).ThrowIfFailed(); 428PInvokeGdiPlus.GdipGetPenTransform(NativePen, matrix.NativeMatrix).ThrowIfFailed(); 441PInvokeGdiPlus.GdipSetPenTransform(NativePen, value.NativeMatrix).ThrowIfFailed(); 452PInvokeGdiPlus.GdipResetPenTransform(NativePen).ThrowIfFailed(); 474PInvokeGdiPlus.GdipMultiplyPenTransform(NativePen, matrix.NativeMatrix, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 490PInvokeGdiPlus.GdipTranslatePenTransform(NativePen, dx, dy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 504PInvokeGdiPlus.GdipScalePenTransform(NativePen, sx, sy, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 518PInvokeGdiPlus.GdipRotatePenTransform(NativePen, angle, (GdiPlus.MatrixOrder)order).ThrowIfFailed(); 524PInvokeGdiPlus.GdipSetPenColor(NativePen, (uint)_color.ToArgb()).ThrowIfFailed(); 537PInvokeGdiPlus.GdipGetPenFillType(NativePen, &type).ThrowIfFailed(); 558PInvokeGdiPlus.GdipGetPenColor(NativePen, (uint*)&color).ThrowIfFailed(); 634PInvokeGdiPlus.GdipSetPenBrushFill(NativePen, value.Pointer()).ThrowIfFailed(); 642PInvokeGdiPlus.GdipGetPenBrushFill(NativePen, &nativeBrush).ThrowIfFailed(); 655PInvokeGdiPlus.GdipGetPenDashStyle(NativePen, (GdiPlus.DashStyle*)&dashStyle).ThrowIfFailed(); 671PInvokeGdiPlus.GdipSetPenDashStyle(NativePen, (GdiPlus.DashStyle)value).ThrowIfFailed(); 713PInvokeGdiPlus.GdipGetPenDashOffset(NativePen, &dashOffset).ThrowIfFailed(); 724PInvokeGdiPlus.GdipSetPenDashOffset(NativePen, value).ThrowIfFailed(); 737PInvokeGdiPlus.GdipGetPenDashCount(NativePen, &count).ThrowIfFailed(); 748PInvokeGdiPlus.GdipGetPenDashArray(NativePen, p, count).ThrowIfFailed(); 784PInvokeGdiPlus.GdipSetPenDashArray(NativePen, f, value.Length).ThrowIfFailed(); 798PInvokeGdiPlus.GdipGetPenCompoundCount(NativePen, &count).ThrowIfFailed(); 808PInvokeGdiPlus.GdipGetPenCompoundArray(NativePen, f, count).ThrowIfFailed(); 823PInvokeGdiPlus.GdipSetPenCompoundArray(NativePen, f, value.Length).ThrowIfFailed();
System\Drawing\SolidBrush.cs (4)
19PInvokeGdiPlus.GdipCreateSolidFill((ARGB)_color, &nativeBrush).ThrowIfFailed(); 39PInvokeGdiPlus.GdipCloneBrush(NativeBrush, &clonedBrush).ThrowIfFailed(); 67PInvokeGdiPlus.GdipGetSolidFillColor((GpSolidFill*)NativeBrush, (uint*)&color).ThrowIfFailed(); 100PInvokeGdiPlus.GdipSetSolidFillColor((GpSolidFill*)NativeBrush, (ARGB)value).ThrowIfFailed();
System\Drawing\StringFormat.cs (22)
40PInvokeGdiPlus.GdipCreateStringFormat((int)options, (ushort)language, &format).ThrowIfFailed(); 52PInvokeGdiPlus.GdipCloneStringFormat(format._nativeFormat, &newFormat).ThrowIfFailed(); 109PInvokeGdiPlus.GdipGetStringFormatFlags(_nativeFormat, (int*)&format).ThrowIfFailed(); 115PInvokeGdiPlus.GdipSetStringFormatFlags(_nativeFormat, (int)value).ThrowIfFailed(); 135r is null ? &stub : (GdiPlus.CharacterRange*)r).ThrowIfFailed(); 149PInvokeGdiPlus.GdipGetStringFormatAlign(_nativeFormat, (GdiPlus.StringAlignment*)&alignment).ThrowIfFailed(); 160PInvokeGdiPlus.GdipSetStringFormatAlign(_nativeFormat, (GdiPlus.StringAlignment)value).ThrowIfFailed(); 173PInvokeGdiPlus.GdipGetStringFormatLineAlign(_nativeFormat, (GdiPlus.StringAlignment*)&alignment).ThrowIfFailed(); 184PInvokeGdiPlus.GdipSetStringFormatLineAlign(_nativeFormat, (GdiPlus.StringAlignment)value).ThrowIfFailed(); 197PInvokeGdiPlus.GdipGetStringFormatHotkeyPrefix(_nativeFormat, (int*)&hotkeyPrefix).ThrowIfFailed(); 208PInvokeGdiPlus.GdipSetStringFormatHotkeyPrefix(_nativeFormat, (int)value).ThrowIfFailed(); 234ts is null ? &stub : ts).ThrowIfFailed(); 245PInvokeGdiPlus.GdipGetStringFormatTabStopCount(_nativeFormat, &count).ThrowIfFailed(); 258PInvokeGdiPlus.GdipGetStringFormatTabStops(_nativeFormat, count, fto, ts).ThrowIfFailed(); 275PInvokeGdiPlus.GdipGetStringFormatTrimming(_nativeFormat, (GdiPlus.StringTrimming*)&trimming).ThrowIfFailed(); 286PInvokeGdiPlus.GdipSetStringFormatTrimming(_nativeFormat, (GdiPlus.StringTrimming)value).ThrowIfFailed(); 311PInvokeGdiPlus.GdipStringFormatGetGenericDefault(&format).ThrowIfFailed(); 337PInvokeGdiPlus.GdipStringFormatGetGenericTypographic(&format).ThrowIfFailed(); 347(GdiPlus.StringDigitSubstitute)substitute).ThrowIfFailed(); 363(GdiPlus.StringDigitSubstitute*)&digitSubstitute).ThrowIfFailed(); 378PInvokeGdiPlus.GdipGetStringFormatDigitSubstitution(_nativeFormat, &language, null).ThrowIfFailed(); 387PInvokeGdiPlus.GdipGetStringFormatMeasurableCharacterRangeCount(_nativeFormat, &count).ThrowIfFailed();
System\Drawing\Text\FontCollection.cs (2)
35PInvokeGdiPlus.GdipGetFontCollectionFamilyCount(_nativeFontCollection, &numFound).ThrowIfFailed(); 47PInvokeGdiPlus.GdipGetFontCollectionFamilyList(_nativeFontCollection, numFound, f, &numFound).ThrowIfFailed();
System\Drawing\Text\InstalledFontCollection.cs (1)
24PInvokeGdiPlus.GdipNewInstalledFontCollection(&fontCollection).ThrowIfFailed();
System\Drawing\Text\PrivateFontCollection.cs (3)
23PInvokeGdiPlus.GdipNewPrivateFontCollection(&fontCollection).ThrowIfFailed(); 60PInvokeGdiPlus.GdipPrivateAddFontFile(this.Pointer(), p).ThrowIfFailed(); 73PInvokeGdiPlus.GdipPrivateAddMemoryFont(this.Pointer(), (void*)memory, length).ThrowIfFailed();
System\Drawing\TextureBrush.cs (14)
31PInvokeGdiPlus.GdipCreateTexture(image.Pointer(), (WrapMode)wrapMode, &brush).ThrowIfFailed(); 49dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &brush).ThrowIfFailed(); 74&brush).ThrowIfFailed(); 97PInvokeGdiPlus.GdipCloneBrush(NativeBrush, &cloneBrush).ThrowIfFailed(); 108PInvokeGdiPlus.GdipGetTextureTransform((GpTexture*)NativeBrush, matrix.NativeMatrix).ThrowIfFailed(); 115PInvokeGdiPlus.GdipSetTextureTransform((GpTexture*)NativeBrush, value.NativeMatrix).ThrowIfFailed(); 125PInvokeGdiPlus.GdipGetTextureWrapMode((GpTexture*)NativeBrush, &mode).ThrowIfFailed(); 136PInvokeGdiPlus.GdipSetTextureWrapMode((GpTexture*)NativeBrush, (WrapMode)value).ThrowIfFailed(); 146PInvokeGdiPlus.GdipGetTextureImage((GpTexture*)NativeBrush, &image).ThrowIfFailed(); 154PInvokeGdiPlus.GdipResetTextureTransform((GpTexture*)NativeBrush).ThrowIfFailed(); 172(GdiPlus.MatrixOrder)order).ThrowIfFailed(); 185(GdiPlus.MatrixOrder)order).ThrowIfFailed(); 197(GdiPlus.MatrixOrder)order).ThrowIfFailed(); 209(GdiPlus.MatrixOrder)order).ThrowIfFailed();
System.Private.Windows.Core (1)
Windows\Win32\Graphics\GdiPlus\GdiPlusInitialization.cs (1)
22PInvokeCore.GdiplusStartup(&token, (GdiplusStartupInput*)&startup, null).ThrowIfFailed();
System.Private.Windows.GdiPlus (12)
System\Drawing\CoreImageExtensions.cs (2)
28PInvokeGdiPlus.GdipSaveImageToStream(image.GetPointer(), iStream, &encoder, encoderParameters).ThrowIfFailed(); 34PInvokeGdiPlus.GdipGetImageRawFormat(image.GetPointer(), &format).ThrowIfFailed();
System\Drawing\ImageCodecInfoHelper.cs (2)
44PInvokeGdiPlus.GdipGetImageEncodersSize(&numEncoders, &size).ThrowIfFailed(); 50PInvokeGdiPlus.GdipGetImageEncoders(numEncoders, size, (ImageCodecInfo*)b).ThrowIfFailed();
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (3)
26(BitmapData*)Unsafe.AsPointer(ref data)).ThrowIfFailed(); 33PInvokeGdiPlus.GdipBitmapUnlockBits(bitmap.GetPointer(), (BitmapData*)Unsafe.AsPointer(ref data)).ThrowIfFailed(); 45(uint)ColorTranslator.ToWin32(background)).ThrowIfFailed();
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (1)
18PInvokeGdiPlus.GdipGetImageBounds(image.GetPointer(), (RectF*)&bounds, &unit).ThrowIfFailed();
Windows\Win32\Graphics\GdiPlus\GpMetafileExtensions.cs (1)
13PInvokeGdiPlus.GdipGetHemfFromMetafile(metafile.GetPointer(), &hemf).ThrowIfFailed();
Windows\Win32\Graphics\GdiPlus\GpRegionExtensions.cs (3)
25PInvokeGdiPlus.GdipCreateFromHWND(hwnd, &graphics).ThrowIfFailed(); 34PInvokeGdiPlus.GdipIsInfiniteRegion(region, graphics, &isInfinite).ThrowIfFailed(); 52PInvokeGdiPlus.GdipGetRegionHRgn(region, graphics, &hrgn).ThrowIfFailed();