3110 references to SafeNativeMethods
System.Drawing (3110)
commonui\System\Drawing\Advanced\AdjustableArrowCap.cs (27)
54int status = SafeNativeMethods.Gdip.GdipCreateAdjustableArrowCap( 57if (status != SafeNativeMethods.Gdip.Ok) 58throw SafeNativeMethods.Gdip.StatusException(status); 65int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), height); 67if (status != SafeNativeMethods.Gdip.Ok) 68throw SafeNativeMethods.Gdip.StatusException(status); 74int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), out height); 76if (status != SafeNativeMethods.Gdip.Ok) 77throw SafeNativeMethods.Gdip.StatusException(status); 94int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), width); 96if (status != SafeNativeMethods.Gdip.Ok) 97throw SafeNativeMethods.Gdip.StatusException(status); 103int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), out width); 105if (status != SafeNativeMethods.Gdip.Ok) 106throw SafeNativeMethods.Gdip.StatusException(status); 123int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), middleInset); 125if (status != SafeNativeMethods.Gdip.Ok) 126throw SafeNativeMethods.Gdip.StatusException(status); 132int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), out middleInset); 134if (status != SafeNativeMethods.Gdip.Ok) 135throw SafeNativeMethods.Gdip.StatusException(status); 154int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), isFilled); 156if (status != SafeNativeMethods.Gdip.Ok) 157throw SafeNativeMethods.Gdip.StatusException(status); 163int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), out isFilled); 165if (status != SafeNativeMethods.Gdip.Ok) 166throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\CustomLineCap.cs (43)
86int status = SafeNativeMethods.Gdip.GdipCreateCustomLineCap( 91if (status != SafeNativeMethods.Gdip.Ok) 92throw SafeNativeMethods.Gdip.StatusException(status); 155int status = SafeNativeMethods.Gdip.GdipCloneCustomLineCap(new HandleRef(this, nativeCap), out cloneCap); 157if (status != SafeNativeMethods.Gdip.Ok) 158throw SafeNativeMethods.Gdip.StatusException(status); 167int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapType(new HandleRef(null, cap), out capType); 169if (status != SafeNativeMethods.Gdip.Ok) 171SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 172throw SafeNativeMethods.Gdip.StatusException(status); 184SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 185throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.NotImplemented); 194int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), startCap, endCap); 196if (status != SafeNativeMethods.Gdip.Ok) 197throw SafeNativeMethods.Gdip.StatusException(status); 206int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), out startCap, out endCap); 208if (status != SafeNativeMethods.Gdip.Ok) 209throw SafeNativeMethods.Gdip.StatusException(status); 214int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), lineJoin); 216if (status != SafeNativeMethods.Gdip.Ok) 217throw SafeNativeMethods.Gdip.StatusException(status); 224int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), out lineJoin); 226if (status != SafeNativeMethods.Gdip.Ok) 227throw SafeNativeMethods.Gdip.StatusException(status); 244int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new HandleRef(this, nativeCap), baseCap); 246if (status != SafeNativeMethods.Gdip.Ok) 247throw SafeNativeMethods.Gdip.StatusException(status); 253int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseCap(new HandleRef(this, nativeCap), out baseCap); 255if (status != SafeNativeMethods.Gdip.Ok) 256throw SafeNativeMethods.Gdip.StatusException(status); 273int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseInset(new HandleRef(this, nativeCap), inset); 275if (status != SafeNativeMethods.Gdip.Ok) 276throw SafeNativeMethods.Gdip.StatusException(status); 282int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseInset(new HandleRef(this, nativeCap), out inset); 284if (status != SafeNativeMethods.Gdip.Ok) 285throw SafeNativeMethods.Gdip.StatusException(status); 303int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapWidthScale(new HandleRef(this, nativeCap), widthScale); 305if (status != SafeNativeMethods.Gdip.Ok) 306throw SafeNativeMethods.Gdip.StatusException(status); 312int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapWidthScale(new HandleRef(this, nativeCap), out widthScale); 314if (status != SafeNativeMethods.Gdip.Ok) 315throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\EncoderParameter.cs (44)
106throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 128throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 147throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 166throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 187throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 209throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 233throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 256throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 273throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 296throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 317throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 338throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 359throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 368throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 388throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 397throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 421throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 430throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 466throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.WrongState); 475throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 510throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.WrongState); 519throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory);
commonui\System\Drawing\Advanced\EncoderParameters.cs (4)
84throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 105throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter);
commonui\System\Drawing\Advanced\Font.cs (58)
47byte gdiCharSet = SafeNativeMethods.DEFAULT_CHARSET; 64int status = SafeNativeMethods.Gdip.GdipCreateFont( 72if (status == SafeNativeMethods.Gdip.FontStyleNotFound) 76else if (status != SafeNativeMethods.Gdip.Ok) 78throw SafeNativeMethods.Gdip.StatusException(status); 121Initialize(name, size, style, unit, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(name)); 153Initialize(prototype.FontFamily, prototype.Size, newStyle, prototype.Unit, SafeNativeMethods.DEFAULT_CHARSET, false); 164Initialize(family, emSize, style, unit, SafeNativeMethods.DEFAULT_CHARSET, false); 224Initialize(family, emSize, style, GraphicsUnit.Point, SafeNativeMethods.DEFAULT_CHARSET, false); 235Initialize(family, emSize, FontStyle.Regular, unit, SafeNativeMethods.DEFAULT_CHARSET, false); 246Initialize(family, emSize, FontStyle.Regular, GraphicsUnit.Point, SafeNativeMethods.DEFAULT_CHARSET, false); 257Initialize(familyName, emSize, style, unit, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName)); 271Initialize(familyName, emSize, style, GraphicsUnit.Point, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName)); 282Initialize(familyName, emSize, FontStyle.Regular, unit, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName)); 293Initialize(familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, SafeNativeMethods.DEFAULT_CHARSET, IsVerticalName(familyName)); 315status = SafeNativeMethods.Gdip.GdipGetFontUnit(new HandleRef(this, nativeFont), out unit); 317if (status != SafeNativeMethods.Gdip.Ok) 318throw SafeNativeMethods.Gdip.StatusException(status); 320status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, nativeFont), out size); 322if (status != SafeNativeMethods.Gdip.Ok) 323throw SafeNativeMethods.Gdip.StatusException(status); 325status = SafeNativeMethods.Gdip.GdipGetFontStyle(new HandleRef(this, nativeFont), out style); 327if (status != SafeNativeMethods.Gdip.Ok) 328throw SafeNativeMethods.Gdip.StatusException(status); 330status = SafeNativeMethods.Gdip.GdipGetFamily(new HandleRef(this, nativeFont), out nativeFamily); 332if (status != SafeNativeMethods.Gdip.Ok) 333throw SafeNativeMethods.Gdip.StatusException(status); 390status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, this.nativeFont), out this.fontSize); 392if (status != SafeNativeMethods.Gdip.Ok) 393throw SafeNativeMethods.Gdip.StatusException(status); 406SafeNativeMethods.LOGFONT lf = new SafeNativeMethods.LOGFONT(); 407SafeNativeMethods.GetObject(new HandleRef(null, hfont), lf); 454status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontA(new HandleRef(null, hdc), lf, out font); 456status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(new HandleRef(null, hdc), lf, out font); 459if (status == SafeNativeMethods.Gdip.NotTrueTypeFont) 461else if (status != SafeNativeMethods.Gdip.Ok) 462throw SafeNativeMethods.Gdip.StatusException(status); 491int status = SafeNativeMethods.Gdip.GdipCreateFontFromDC(new HandleRef(null, hdc), ref font); 494if (status == SafeNativeMethods.Gdip.NotTrueTypeFont) 496else if (status != SafeNativeMethods.Gdip.Ok) 497throw SafeNativeMethods.Gdip.StatusException(status); 513int status = SafeNativeMethods.Gdip.GdipCloneFont(new HandleRef(this, nativeFont), out cloneFont); 515if (status != SafeNativeMethods.Gdip.Ok) 516throw SafeNativeMethods.Gdip.StatusException(status); 590SafeNativeMethods.Gdip.GdipDeleteFont(new HandleRef(this, this.nativeFont)); 833status = SafeNativeMethods.Gdip.GdipGetLogFontA(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 835status = SafeNativeMethods.Gdip.GdipGetLogFontW(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 874if (status != SafeNativeMethods.Gdip.Ok) 875throw SafeNativeMethods.Gdip.StatusException(status); 885SafeNativeMethods.LOGFONT lf = new SafeNativeMethods.LOGFONT(); 917int status = SafeNativeMethods.Gdip.GdipGetFontHeight(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), out ht); 919if (status != SafeNativeMethods.Gdip.Ok) 920throw SafeNativeMethods.Gdip.StatusException(status); 954int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(new HandleRef(this, this.NativeFont), dpi, out ht); 956if (status != SafeNativeMethods.Gdip.Ok) 957throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\FontCollection.cs (7)
59int status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyCount(new HandleRef(this, nativeFontCollection), out numSought); 61if (status != SafeNativeMethods.Gdip.Ok) 62throw SafeNativeMethods.Gdip.StatusException(status); 68status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyList(new HandleRef(this, nativeFontCollection), numSought, gpfamilies, 71if (status != SafeNativeMethods.Gdip.Ok) 72throw SafeNativeMethods.Gdip.StatusException(status); 79SafeNativeMethods.Gdip.GdipCloneFontFamily(new HandleRef(null, (IntPtr)gpfamilies[f]), out native);
commonui\System\Drawing\Advanced\FontFamily.cs (38)
126int status = SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(name, new HandleRef(fontCollection, nativeFontCollection), out fontfamily); 128if (status != SafeNativeMethods.Gdip.Ok) 137if (status == SafeNativeMethods.Gdip.FontFamilyNotFound) 141else if (status == SafeNativeMethods.Gdip.NotTrueTypeFont) 147throw SafeNativeMethods.Gdip.StatusException(status); 169status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilySerif(out fontfamily); 174status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(out fontfamily); 180status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilyMonospace(out fontfamily); 185if (status != SafeNativeMethods.Gdip.Ok) 186throw SafeNativeMethods.Gdip.StatusException(status); 280SafeNativeMethods.Gdip.GdipDeleteFontFamily(new HandleRef(this, this.nativeFamily)); 325int status = SafeNativeMethods.Gdip.GdipGetFamilyName(new HandleRef(this, this.NativeFamily), name, language); 327if (status != SafeNativeMethods.Gdip.Ok) 328throw SafeNativeMethods.Gdip.StatusException(status); 367int status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(out fontfamily); 369if (status != SafeNativeMethods.Gdip.Ok) 370throw SafeNativeMethods.Gdip.StatusException(status); 392int status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilySerif(out fontfamily); 394if (status != SafeNativeMethods.Gdip.Ok) 395throw SafeNativeMethods.Gdip.StatusException(status); 417int status = SafeNativeMethods.Gdip.GdipGetGenericFontFamilyMonospace(out fontfamily); 419if (status != SafeNativeMethods.Gdip.Ok) 420throw SafeNativeMethods.Gdip.StatusException(status); 453int status = SafeNativeMethods.Gdip.GdipIsStyleAvailable(new HandleRef(this, this.NativeFamily), style, out bresult); 455if (status != SafeNativeMethods.Gdip.Ok) 456throw SafeNativeMethods.Gdip.StatusException(status); 469int status = SafeNativeMethods.Gdip.GdipGetEmHeight(new HandleRef(this, this.NativeFamily), style, out result); 471if (status != SafeNativeMethods.Gdip.Ok) 472throw SafeNativeMethods.Gdip.StatusException(status); 487int status = SafeNativeMethods.Gdip.GdipGetCellAscent(new HandleRef(this, this.NativeFamily), style, out result); 489if (status != SafeNativeMethods.Gdip.Ok) 490throw SafeNativeMethods.Gdip.StatusException(status); 504int status = SafeNativeMethods.Gdip.GdipGetCellDescent(new HandleRef(this, this.NativeFamily), style, out result); 506if (status != SafeNativeMethods.Gdip.Ok) 507throw SafeNativeMethods.Gdip.StatusException(status); 520int status = SafeNativeMethods.Gdip.GdipGetLineSpacing(new HandleRef(this, this.NativeFamily), style, out result); 522if (status != SafeNativeMethods.Gdip.Ok) 523throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\Gdiplus.cs (38)
149if (status != SafeNativeMethods.Gdip.Ok) { 150throw SafeNativeMethods.Gdip.StatusException(status); 157currentDomain.ProcessExit += new EventHandler(SafeNativeMethods.Gdip.OnProcessExit); 163currentDomain.DomainUnload += new EventHandler(SafeNativeMethods.Gdip.OnProcessExit); 206currentDomain.ProcessExit -= new EventHandler(SafeNativeMethods.Gdip.OnProcessExit); 208currentDomain.DomainUnload -= new EventHandler(SafeNativeMethods.Gdip.OnProcessExit); 311if (!Initialized) return SafeNativeMethods.Gdip.Ok; 590if (!Initialized) return SafeNativeMethods.Gdip.Ok; 678if (!Initialized) return SafeNativeMethods.Gdip.Ok; 786if (!Initialized) return SafeNativeMethods.Gdip.Ok; 902if (!Initialized) return SafeNativeMethods.Gdip.Ok; 1320if (!Initialized) return SafeNativeMethods.Gdip.Ok; 1501if (!Initialized) return SafeNativeMethods.Gdip.Ok; 1643if (!Initialized) return SafeNativeMethods.Gdip.Ok; 1910if (!Initialized) return SafeNativeMethods.Gdip.Ok; 2012if (!Initialized) return SafeNativeMethods.Gdip.Ok; 2025if (!Initialized) return SafeNativeMethods.Gdip.Ok; 2881return SafeNativeMethods.Gdip.Ok; 2929if (!Initialized) return SafeNativeMethods.Gdip.Ok; 2998if (!Initialized) return SafeNativeMethods.Gdip.Ok; 3065if (!Initialized) return SafeNativeMethods.Gdip.Ok; 3927return System.Internal.HandleCollector.Add(IntCreateCompatibleBitmap(hDC, width, height), SafeNativeMethods.CommonHandles.GDI); 3939return System.Internal.HandleCollector.Add(IntCreateBitmap(width, height, planes, bpp, bitmapData), SafeNativeMethods.CommonHandles.GDI); 3984return System.Internal.HandleCollector.Add(IntCreateDIBSection(hdc, ref bmi, iUsage, ref ppvBits, hSection, dwOffset), SafeNativeMethods.CommonHandles.GDI); 4062return System.Internal.HandleCollector.Add(IntCreateRectRgn(x1, y1, x2, y2), SafeNativeMethods.CommonHandles.GDI); 4780System.Internal.HandleCollector.Remove((IntPtr)hObject, SafeNativeMethods.CommonHandles.GDI); 4813return System.Internal.HandleCollector.Add(IntCreateIconFromResourceEx(pbIconBits, cbIconBits, fIcon, dwVersion, csDesired, cyDesired, flags), SafeNativeMethods.CommonHandles.Icon); 4823 return System.Internal.HandleCollector.Add(IntExtractAssociatedIcon(hInst, iconPath, ref index), SafeNativeMethods.CommonHandles.Icon); 4848System.Internal.HandleCollector.Remove((IntPtr)hIcon, SafeNativeMethods.CommonHandles.Icon); 4860case SafeNativeMethods.IMAGE_ICON: 4861handleType = SafeNativeMethods.CommonHandles.Icon; 4864handleType = SafeNativeMethods.CommonHandles.GDI; 4873public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] SafeNativeMethods.BITMAP bm); 4877public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] SafeNativeMethods.LOGFONT lf); 4878public static int GetObject(HandleRef hObject, SafeNativeMethods.LOGFONT lp) { 4879return GetObject(hObject, System.Runtime.InteropServices.Marshal.SizeOf(typeof(SafeNativeMethods.LOGFONT)), lp); 4907public static extern bool GetIconInfo(HandleRef hIcon, [In, Out] SafeNativeMethods.ICONINFO info); 4942public static extern IPicture OleCreatePictureIndirect(SafeNativeMethods.PICTDESC pictdesc, [In]ref Guid refiid, bool fOwn);
commonui\System\Drawing\Advanced\GPStream.cs (5)
107throw new ExternalException(msg, SafeNativeMethods.E_FAIL); 111throw new ExternalException(SR.GetString(SR.NotImplemented), SafeNativeMethods.E_NOTIMPL); 139case SafeNativeMethods.StreamConsts.STREAM_SEEK_SET: 148case SafeNativeMethods.StreamConsts.STREAM_SEEK_END: 157case SafeNativeMethods.StreamConsts.STREAM_SEEK_CUR:
commonui\System\Drawing\Advanced\GraphicsPath.cs (215)
61int status = SafeNativeMethods.Gdip.GdipCreatePath(unchecked((int)fillMode), out nativePath); 63if (status != SafeNativeMethods.Gdip.Ok) 64throw SafeNativeMethods.Gdip.StatusException(status); 100throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 103IntPtr ptbuf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 108int status = SafeNativeMethods.Gdip.GdipCreatePath2(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 112if (status != SafeNativeMethods.Gdip.Ok) 113throw SafeNativeMethods.Gdip.StatusException(status); 153throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 156IntPtr ptbuf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 161int status = SafeNativeMethods.Gdip.GdipCreatePath2I(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 163if (status != SafeNativeMethods.Gdip.Ok) 164throw SafeNativeMethods.Gdip.StatusException(status); 185int status = SafeNativeMethods.Gdip.GdipClonePath(new HandleRef(this, nativePath), out clonePath); 187if (status != SafeNativeMethods.Gdip.Ok) 188throw SafeNativeMethods.Gdip.StatusException(status); 223SafeNativeMethods.Gdip.GdipDeletePath(new HandleRef(this, nativePath)); 260int status = SafeNativeMethods.Gdip.GdipResetPath(new HandleRef(this, nativePath)); 262if (status != SafeNativeMethods.Gdip.Ok) 263throw SafeNativeMethods.Gdip.StatusException(status); 278int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(new HandleRef(this, nativePath), out fillmode); 280if (status != SafeNativeMethods.Gdip.Ok) 281throw SafeNativeMethods.Gdip.StatusException(status); 293int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(new HandleRef(this, nativePath), (int) value); 295if (status != SafeNativeMethods.Gdip.Ok) 296throw SafeNativeMethods.Gdip.StatusException(status); 321int status = SafeNativeMethods.Gdip.GdipGetPathData(new HandleRef(this, nativePath), memoryPathData); 323if (status != SafeNativeMethods.Gdip.Ok) { 324throw SafeNativeMethods.Gdip.StatusException(status); 327pathData.Points = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(memoryPoints, numPts); 359int status = SafeNativeMethods.Gdip.GdipStartPathFigure(new HandleRef(this, nativePath)); 361if (status != SafeNativeMethods.Gdip.Ok) 362throw SafeNativeMethods.Gdip.StatusException(status); 373int status = SafeNativeMethods.Gdip.GdipClosePathFigure(new HandleRef(this, nativePath)); 375if (status != SafeNativeMethods.Gdip.Ok) 376throw SafeNativeMethods.Gdip.StatusException(status); 386int status = SafeNativeMethods.Gdip.GdipClosePathFigures(new HandleRef(this, nativePath)); 388if (status != SafeNativeMethods.Gdip.Ok) 389throw SafeNativeMethods.Gdip.StatusException(status); 399int status = SafeNativeMethods.Gdip.GdipSetPathMarker(new HandleRef(this, nativePath)); 401if (status != SafeNativeMethods.Gdip.Ok) 402throw SafeNativeMethods.Gdip.StatusException(status); 410int status = SafeNativeMethods.Gdip.GdipClearPathMarkers(new HandleRef(this, nativePath)); 412if (status != SafeNativeMethods.Gdip.Ok) 413throw SafeNativeMethods.Gdip.StatusException(status); 421int status = SafeNativeMethods.Gdip.GdipReversePath(new HandleRef(this, nativePath)); 423if (status != SafeNativeMethods.Gdip.Ok) 424throw SafeNativeMethods.Gdip.StatusException(status); 434int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(new HandleRef(this, nativePath), gppt); 436if (status != SafeNativeMethods.Gdip.Ok) 437throw SafeNativeMethods.Gdip.StatusException(status); 489int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(new HandleRef(this, nativePath), 496if (status != SafeNativeMethods.Gdip.Ok) 497throw SafeNativeMethods.Gdip.StatusException(status); 542int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(new HandleRef(this, nativePath), 549if (status != SafeNativeMethods.Gdip.Ok) 550throw SafeNativeMethods.Gdip.StatusException(status); 603int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(new HandleRef(this, nativePath), 611if (status != SafeNativeMethods.Gdip.Ok) 612throw SafeNativeMethods.Gdip.StatusException(status); 666int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(new HandleRef(this, nativePath), 674if (status != SafeNativeMethods.Gdip.Ok) 675throw SafeNativeMethods.Gdip.StatusException(status); 697int status = SafeNativeMethods.Gdip.GdipAddPathLine(new HandleRef(this, nativePath), x1, y1, x2, y2); 699if (status != SafeNativeMethods.Gdip.Ok) 700throw SafeNativeMethods.Gdip.StatusException(status); 711IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 713int status = SafeNativeMethods.Gdip.GdipAddPathLine2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 714if (status != SafeNativeMethods.Gdip.Ok) 715throw SafeNativeMethods.Gdip.StatusException(status); 740int status = SafeNativeMethods.Gdip.GdipAddPathLineI(new HandleRef(this, nativePath), x1, y1, x2, y2); 742if (status != SafeNativeMethods.Gdip.Ok) 743throw SafeNativeMethods.Gdip.StatusException(status); 755IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 757int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 758if (status != SafeNativeMethods.Gdip.Ok) 759throw SafeNativeMethods.Gdip.StatusException(status); 788int status = SafeNativeMethods.Gdip.GdipAddPathArc(new HandleRef(this, nativePath), x, y, width, height, 791if (status != SafeNativeMethods.Gdip.Ok) 792throw SafeNativeMethods.Gdip.StatusException(status); 814int status = SafeNativeMethods.Gdip.GdipAddPathArcI(new HandleRef(this, nativePath), x, y, width, height, 817if (status != SafeNativeMethods.Gdip.Ok) 818throw SafeNativeMethods.Gdip.StatusException(status); 845int status = SafeNativeMethods.Gdip.GdipAddPathBezier(new HandleRef(this, nativePath), x1, y1, x2, y2, 848if (status != SafeNativeMethods.Gdip.Ok) 849throw SafeNativeMethods.Gdip.StatusException(status); 862IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 864int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 865if (status != SafeNativeMethods.Gdip.Ok) 866throw SafeNativeMethods.Gdip.StatusException(status); 892int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(new HandleRef(this, nativePath), x1, y1, x2, y2, 895if (status != SafeNativeMethods.Gdip.Ok) 896throw SafeNativeMethods.Gdip.StatusException(status); 909IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 911int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 912if (status != SafeNativeMethods.Gdip.Ok) 913throw SafeNativeMethods.Gdip.StatusException(status); 934IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 936int status = SafeNativeMethods.Gdip.GdipAddPathCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 937if (status != SafeNativeMethods.Gdip.Ok) 938throw SafeNativeMethods.Gdip.StatusException(status); 951IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 953int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), 955if (status != SafeNativeMethods.Gdip.Ok) 956throw SafeNativeMethods.Gdip.StatusException(status); 972IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 974int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(new HandleRef(this, nativePath), new HandleRef(null, buf), 977if (status != SafeNativeMethods.Gdip.Ok) 978throw SafeNativeMethods.Gdip.StatusException(status); 995IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 997int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 998if (status != SafeNativeMethods.Gdip.Ok) 999throw SafeNativeMethods.Gdip.StatusException(status); 1014IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1016int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1018if (status != SafeNativeMethods.Gdip.Ok) 1019throw SafeNativeMethods.Gdip.StatusException(status); 1035IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1037int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1040if (status != SafeNativeMethods.Gdip.Ok) 1041throw SafeNativeMethods.Gdip.StatusException(status); 1058IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1060int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1061if (status != SafeNativeMethods.Gdip.Ok) 1062throw SafeNativeMethods.Gdip.StatusException(status); 1078IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1080int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1081if (status != SafeNativeMethods.Gdip.Ok) 1082throw SafeNativeMethods.Gdip.StatusException(status); 1099IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1101int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1102if (status != SafeNativeMethods.Gdip.Ok) 1103throw SafeNativeMethods.Gdip.StatusException(status); 1119IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1121int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1122if (status != SafeNativeMethods.Gdip.Ok) 1123throw SafeNativeMethods.Gdip.StatusException(status); 1134int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(new HandleRef(this, nativePath), rect.X, rect.Y, 1137if (status != SafeNativeMethods.Gdip.Ok) 1138throw SafeNativeMethods.Gdip.StatusException(status); 1151IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1153int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1154if (status != SafeNativeMethods.Gdip.Ok) 1155throw SafeNativeMethods.Gdip.StatusException(status); 1169int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(new HandleRef(this, nativePath), rect.X, rect.Y, 1172if (status != SafeNativeMethods.Gdip.Ok) 1173throw SafeNativeMethods.Gdip.StatusException(status); 1185IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1187int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1188if (status != SafeNativeMethods.Gdip.Ok) 1189throw SafeNativeMethods.Gdip.StatusException(status); 1215int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(new HandleRef(this, nativePath), x, y, width, height); 1217if (status != SafeNativeMethods.Gdip.Ok) 1218throw SafeNativeMethods.Gdip.StatusException(status); 1245int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(new HandleRef(this, nativePath), x, y, width, height); 1247if (status != SafeNativeMethods.Gdip.Ok) 1248throw SafeNativeMethods.Gdip.StatusException(status); 1272int status = SafeNativeMethods.Gdip.GdipAddPathPie(new HandleRef(this, nativePath), x, y, width, height, 1275if (status != SafeNativeMethods.Gdip.Ok) 1276throw SafeNativeMethods.Gdip.StatusException(status); 1289int status = SafeNativeMethods.Gdip.GdipAddPathPieI(new HandleRef(this, nativePath), x, y, width, height, 1292if (status != SafeNativeMethods.Gdip.Ok) 1293throw SafeNativeMethods.Gdip.StatusException(status); 1304IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1306int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1307if (status != SafeNativeMethods.Gdip.Ok) 1308throw SafeNativeMethods.Gdip.StatusException(status); 1322IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1324int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1325if (status != SafeNativeMethods.Gdip.Ok) 1326throw SafeNativeMethods.Gdip.StatusException(status); 1342int status = SafeNativeMethods.Gdip.GdipAddPathPath(new HandleRef(this, nativePath), new HandleRef(addingPath, addingPath.nativePath), connect); 1344if (status != SafeNativeMethods.Gdip.Ok) 1345throw SafeNativeMethods.Gdip.StatusException(status); 1365int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1374if (status != SafeNativeMethods.Gdip.Ok) 1375throw SafeNativeMethods.Gdip.StatusException(status); 1388int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1397if (status != SafeNativeMethods.Gdip.Ok) 1398throw SafeNativeMethods.Gdip.StatusException(status); 1410int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1419if (status != SafeNativeMethods.Gdip.Ok) 1420throw SafeNativeMethods.Gdip.StatusException(status); 1432int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1441if (status != SafeNativeMethods.Gdip.Ok) 1442throw SafeNativeMethods.Gdip.StatusException(status); 1457int status = SafeNativeMethods.Gdip.GdipTransformPath(new HandleRef(this, nativePath), 1460if (status != SafeNativeMethods.Gdip.Ok) 1461throw SafeNativeMethods.Gdip.StatusException(status); 1503int status = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(new HandleRef(this, nativePath), 1508if (status != SafeNativeMethods.Gdip.Ok) 1509throw SafeNativeMethods.Gdip.StatusException(status); 1543int status = SafeNativeMethods.Gdip.GdipFlattenPath(new HandleRef(this, nativePath), 1547if (status != SafeNativeMethods.Gdip.Ok) 1548throw SafeNativeMethods.Gdip.StatusException(status); 1598SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out pointCount); 1603int status = SafeNativeMethods.Gdip.GdipWidenPath(new HandleRef(this, nativePath), 1608if (status != SafeNativeMethods.Gdip.Ok) 1609throw SafeNativeMethods.Gdip.StatusException(status); 1648IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 1650int status = SafeNativeMethods.Gdip.GdipWarpPath(new HandleRef(this, nativePath), 1660if (status != SafeNativeMethods.Gdip.Ok) 1661throw SafeNativeMethods.Gdip.StatusException(status); 1678int status = SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out count); 1680if (status != SafeNativeMethods.Gdip.Ok) 1681throw SafeNativeMethods.Gdip.StatusException(status); 1700int status = SafeNativeMethods.Gdip.GdipGetPathTypes(new HandleRef(this, nativePath), types, count); 1702if (status != SafeNativeMethods.Gdip.Ok) 1703throw SafeNativeMethods.Gdip.StatusException(status); 1725int status = SafeNativeMethods.Gdip.GdipGetPathPoints(new HandleRef(this, nativePath), new HandleRef(null, buf), count); 1727if (status != SafeNativeMethods.Gdip.Ok) { 1728throw SafeNativeMethods.Gdip.StatusException(status); 1731PointF[] points = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(buf, count);
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (45)
43int status = SafeNativeMethods.Gdip.GdipCreatePathIter(out nativeIter, new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 45if (status != SafeNativeMethods.Gdip.Ok) 46throw SafeNativeMethods.Gdip.StatusException(status); 70SafeNativeMethods.Gdip.GdipDeletePathIter(new HandleRef(this, nativeIter)); 110int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpath(new HandleRef(this, nativeIter), out resultCount, 113if (status != SafeNativeMethods.Gdip.Ok) 114throw SafeNativeMethods.Gdip.StatusException(status); 132int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpathPath(new HandleRef(this, nativeIter), out resultCount, 135if (status != SafeNativeMethods.Gdip.Ok) 136throw SafeNativeMethods.Gdip.StatusException(status); 151int status = SafeNativeMethods.Gdip.GdipPathIterNextPathType(new HandleRef(this, nativeIter), out resultCount, 154if (status != SafeNativeMethods.Gdip.Ok) 155throw SafeNativeMethods.Gdip.StatusException(status); 170int status = SafeNativeMethods.Gdip.GdipPathIterNextMarker(new HandleRef(this, nativeIter), out resultCount, 173if (status != SafeNativeMethods.Gdip.Ok) 174throw SafeNativeMethods.Gdip.StatusException(status); 189int status = SafeNativeMethods.Gdip.GdipPathIterNextMarkerPath(new HandleRef(this, nativeIter), out resultCount, 192if (status != SafeNativeMethods.Gdip.Ok) 193throw SafeNativeMethods.Gdip.StatusException(status); 206int status = SafeNativeMethods.Gdip.GdipPathIterGetCount(new HandleRef(this, nativeIter), out resultCount); 208if (status != SafeNativeMethods.Gdip.Ok) 209throw SafeNativeMethods.Gdip.StatusException(status); 223int status = SafeNativeMethods.Gdip.GdipPathIterGetSubpathCount(new HandleRef(this, nativeIter), out resultCount); 225if (status != SafeNativeMethods.Gdip.Ok) 226throw SafeNativeMethods.Gdip.StatusException(status); 240int status = SafeNativeMethods.Gdip.GdipPathIterHasCurve(new HandleRef(this, nativeIter), out hasCurve); 242if (status != SafeNativeMethods.Gdip.Ok) 243throw SafeNativeMethods.Gdip.StatusException(status); 254int status = SafeNativeMethods.Gdip.GdipPathIterRewind(new HandleRef(this, nativeIter)); 256if (status != SafeNativeMethods.Gdip.Ok) 257throw SafeNativeMethods.Gdip.StatusException(status); 267throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 276int status = SafeNativeMethods.Gdip.GdipPathIterEnumerate(new HandleRef(this, nativeIter), out resultCount, 279if (status != SafeNativeMethods.Gdip.Ok) { 280throw SafeNativeMethods.Gdip.StatusException(status); 284SafeNativeMethods.ZeroMemory((IntPtr)(checked((long)memoryPts + resultCount * size)), (UIntPtr)((count - resultCount) * size)); 287points = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(memoryPts, count); 309throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 318int status = SafeNativeMethods.Gdip.GdipPathIterCopyData(new HandleRef(this, nativeIter), out resultCount, 321if (status != SafeNativeMethods.Gdip.Ok) { 322throw SafeNativeMethods.Gdip.StatusException(status); 326SafeNativeMethods.ZeroMemory((IntPtr)(checked((long)memoryPts + resultCount * size)), (UIntPtr)((count - resultCount) * size)); 329points = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(memoryPts, count);
commonui\System\Drawing\Advanced\HatchBrush.cs (15)
55int status = SafeNativeMethods.Gdip.GdipCreateHatchBrush(unchecked((int) hatchstyle), foreColor.ToArgb(), backColor.ToArgb(), out brush); 57if (status != SafeNativeMethods.Gdip.Ok) 58throw SafeNativeMethods.Gdip.StatusException(status); 82int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 84if (status != SafeNativeMethods.Gdip.Ok) 85throw SafeNativeMethods.Gdip.StatusException(status); 102int status = SafeNativeMethods.Gdip.GdipGetHatchStyle(new HandleRef(this, this.NativeBrush), out hatchStyle); 104if (status != SafeNativeMethods.Gdip.Ok) 105throw SafeNativeMethods.Gdip.StatusException(status); 121int status = SafeNativeMethods.Gdip.GdipGetHatchForegroundColor(new HandleRef(this, this.NativeBrush), out forecol); 123if (status != SafeNativeMethods.Gdip.Ok) 124throw SafeNativeMethods.Gdip.StatusException(status); 142int status = SafeNativeMethods.Gdip.GdipGetHatchBackgroundColor(new HandleRef(this, this.NativeBrush), out backcol); 144if (status != SafeNativeMethods.Gdip.Ok) 145throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\ImageAttributes.cs (64)
74int status = SafeNativeMethods.Gdip.GdipCreateImageAttributes(out newImageAttributes); 76if (status != SafeNativeMethods.Gdip.Ok) 77throw SafeNativeMethods.Gdip.StatusException(status); 107SafeNativeMethods.Gdip.GdipDisposeImageAttributes(new HandleRef(this, nativeImageAttributes)); 145int status = SafeNativeMethods.Gdip.GdipCloneImageAttributes( 149if (status != SafeNativeMethods.Gdip.Ok) 150throw SafeNativeMethods.Gdip.StatusException(status); 215int status = SafeNativeMethods.Gdip.GdipSetImageAttributesColorMatrix( 223if (status != SafeNativeMethods.Gdip.Ok) 224throw SafeNativeMethods.Gdip.StatusException(status); 245int status = SafeNativeMethods.Gdip.GdipSetImageAttributesColorMatrix( 253if (status != SafeNativeMethods.Gdip.Ok) 254throw SafeNativeMethods.Gdip.StatusException(status); 285int status = SafeNativeMethods.Gdip.GdipSetImageAttributesColorMatrix( 293if (status != SafeNativeMethods.Gdip.Ok) 294throw SafeNativeMethods.Gdip.StatusException(status); 312int status = SafeNativeMethods.Gdip.GdipSetImageAttributesThreshold( 318if (status != SafeNativeMethods.Gdip.Ok) 319throw SafeNativeMethods.Gdip.StatusException(status); 337int status = SafeNativeMethods.Gdip.GdipSetImageAttributesThreshold( 343if (status != SafeNativeMethods.Gdip.Ok) 344throw SafeNativeMethods.Gdip.StatusException(status); 362int status = SafeNativeMethods.Gdip.GdipSetImageAttributesGamma( 368if (status != SafeNativeMethods.Gdip.Ok) 369throw SafeNativeMethods.Gdip.StatusException(status); 387int status = SafeNativeMethods.Gdip.GdipSetImageAttributesGamma( 393if (status != SafeNativeMethods.Gdip.Ok) 394throw SafeNativeMethods.Gdip.StatusException(status); 412int status = SafeNativeMethods.Gdip.GdipSetImageAttributesNoOp( 417if (status != SafeNativeMethods.Gdip.Ok) 418throw SafeNativeMethods.Gdip.StatusException(status); 436int status = SafeNativeMethods.Gdip.GdipSetImageAttributesNoOp( 441if (status != SafeNativeMethods.Gdip.Ok) 442throw SafeNativeMethods.Gdip.StatusException(status); 463int status = SafeNativeMethods.Gdip.GdipSetImageAttributesColorKeys( 470if (status != SafeNativeMethods.Gdip.Ok) 471throw SafeNativeMethods.Gdip.StatusException(status); 490int status = SafeNativeMethods.Gdip.GdipSetImageAttributesColorKeys( 497if (status != SafeNativeMethods.Gdip.Ok) 498throw SafeNativeMethods.Gdip.StatusException(status); 516int status = SafeNativeMethods.Gdip.GdipSetImageAttributesOutputChannel( 522if (status != SafeNativeMethods.Gdip.Ok) 523throw SafeNativeMethods.Gdip.StatusException(status); 541int status = SafeNativeMethods.Gdip.GdipSetImageAttributesOutputChannel( 547if (status != SafeNativeMethods.Gdip.Ok) 548throw SafeNativeMethods.Gdip.StatusException(status); 569int status = SafeNativeMethods.Gdip.GdipSetImageAttributesOutputChannelColorProfile( 575if (status != SafeNativeMethods.Gdip.Ok) 576throw SafeNativeMethods.Gdip.StatusException(status); 594int status = SafeNativeMethods.Gdip.GdipSetImageAttributesOutputChannel( 600if (status != SafeNativeMethods.Gdip.Ok) 601throw SafeNativeMethods.Gdip.StatusException(status); 629int status = SafeNativeMethods.Gdip.GdipSetImageAttributesRemapTable( 636if (status != SafeNativeMethods.Gdip.Ok) { 637throw SafeNativeMethods.Gdip.StatusException(status); 660int status = SafeNativeMethods.Gdip.GdipSetImageAttributesRemapTable( 667if (status != SafeNativeMethods.Gdip.Ok) 668throw SafeNativeMethods.Gdip.StatusException(status); 713int status = SafeNativeMethods.Gdip.GdipSetImageAttributesWrapMode( 719if (status != SafeNativeMethods.Gdip.Ok) 720throw SafeNativeMethods.Gdip.StatusException(status); 732int status = SafeNativeMethods.Gdip.GdipGetImageAttributesAdjustedPalette( 735if (status != SafeNativeMethods.Gdip.Ok) { 736throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\ImageCodecInfo.cs (12)
155int status = SafeNativeMethods.Gdip.GdipGetImageDecodersSize(out numDecoders, out size); 157if (status != SafeNativeMethods.Gdip.Ok) { 158throw SafeNativeMethods.Gdip.StatusException(status); 164status = SafeNativeMethods.Gdip.GdipGetImageDecoders(numDecoders, size, memory); 166if (status != SafeNativeMethods.Gdip.Ok) { 167throw SafeNativeMethods.Gdip.StatusException(status); 188int status = SafeNativeMethods.Gdip.GdipGetImageEncodersSize(out numEncoders, out size); 190if (status != SafeNativeMethods.Gdip.Ok) { 191throw SafeNativeMethods.Gdip.StatusException(status); 197status = SafeNativeMethods.Gdip.GdipGetImageEncoders(numEncoders, size, memory); 199if (status != SafeNativeMethods.Gdip.Ok) { 200throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\InstalledFontCollection.cs (3)
37int status = SafeNativeMethods.Gdip.GdipNewInstalledFontCollection(out nativeFontCollection); 39if (status != SafeNativeMethods.Gdip.Ok) 40throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (87)
45int status = SafeNativeMethods.Gdip.GdipCreateLineBrush(new GPPOINTF(point1), 52if (status != SafeNativeMethods.Gdip.Ok) 53throw SafeNativeMethods.Gdip.StatusException(status); 72int status = SafeNativeMethods.Gdip.GdipCreateLineBrushI(new GPPOINT(point1), 79if (status != SafeNativeMethods.Gdip.Ok) 80throw SafeNativeMethods.Gdip.StatusException(status); 111int status = SafeNativeMethods.Gdip.GdipCreateLineBrushFromRect(ref gprectf, 118if (status != SafeNativeMethods.Gdip.Ok) 119throw SafeNativeMethods.Gdip.StatusException(status); 151int status = SafeNativeMethods.Gdip.GdipCreateLineBrushFromRectI(ref gpRect, 158if (status != SafeNativeMethods.Gdip.Ok) 159throw SafeNativeMethods.Gdip.StatusException(status); 197int status = SafeNativeMethods.Gdip.GdipCreateLineBrushFromRectWithAngle(ref gprectf, 205if (status != SafeNativeMethods.Gdip.Ok) 206throw SafeNativeMethods.Gdip.StatusException(status); 245int status = SafeNativeMethods.Gdip.GdipCreateLineBrushFromRectWithAngleI(ref gprect, 253if (status != SafeNativeMethods.Gdip.Ok) 254throw SafeNativeMethods.Gdip.StatusException(status); 277int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 279if (status != SafeNativeMethods.Gdip.Ok) 280throw SafeNativeMethods.Gdip.StatusException(status); 291int status = SafeNativeMethods.Gdip.GdipSetLineColors(new HandleRef(this, this.NativeBrush), 295if (status != SafeNativeMethods.Gdip.Ok) 296throw SafeNativeMethods.Gdip.StatusException(status); 308int status = SafeNativeMethods.Gdip.GdipGetLineColors(new HandleRef(this, this.NativeBrush), colors); 310if (status != SafeNativeMethods.Gdip.Ok) 311throw SafeNativeMethods.Gdip.StatusException(status); 338int status = SafeNativeMethods.Gdip.GdipGetLineRect(new HandleRef(this, this.NativeBrush), ref rect); 340if (status != SafeNativeMethods.Gdip.Ok) 341throw SafeNativeMethods.Gdip.StatusException(status); 370int status = SafeNativeMethods.Gdip.GdipGetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 372if (status != SafeNativeMethods.Gdip.Ok) 373throw SafeNativeMethods.Gdip.StatusException(status); 378int status = SafeNativeMethods.Gdip.GdipSetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 380if (status != SafeNativeMethods.Gdip.Ok) 381throw SafeNativeMethods.Gdip.StatusException(status); 408int status = SafeNativeMethods.Gdip.GdipGetLineBlendCount(new HandleRef(this, this.NativeBrush), out retval); 410if (status != SafeNativeMethods.Gdip.Ok) { 411throw SafeNativeMethods.Gdip.StatusException(status); 429status = SafeNativeMethods.Gdip.GdipGetLineBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 431if (status != SafeNativeMethods.Gdip.Ok) { 432throw SafeNativeMethods.Gdip.StatusException(status); 472int status = SafeNativeMethods.Gdip.GdipSetLineBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 474if (status != SafeNativeMethods.Gdip.Ok) { 475throw SafeNativeMethods.Gdip.StatusException(status); 520int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 522if (status != SafeNativeMethods.Gdip.Ok) 523throw SafeNativeMethods.Gdip.StatusException(status); 545int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 547if (status != SafeNativeMethods.Gdip.Ok) 548throw SafeNativeMethods.Gdip.StatusException(status); 565int status = SafeNativeMethods.Gdip.GdipGetLinePresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 567if (status != SafeNativeMethods.Gdip.Ok) { 568throw SafeNativeMethods.Gdip.StatusException(status); 585status = SafeNativeMethods.Gdip.GdipGetLinePresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 587if (status != SafeNativeMethods.Gdip.Ok) { 588throw SafeNativeMethods.Gdip.StatusException(status); 671int status = SafeNativeMethods.Gdip.GdipSetLinePresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 673if (status != SafeNativeMethods.Gdip.Ok) { 674throw SafeNativeMethods.Gdip.StatusException(status); 704int status = SafeNativeMethods.Gdip.GdipSetLineWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 706if (status != SafeNativeMethods.Gdip.Ok) 707throw SafeNativeMethods.Gdip.StatusException(status); 713int status = SafeNativeMethods.Gdip.GdipGetLineWrapMode(new HandleRef(this, this.NativeBrush), out mode); 715if (status != SafeNativeMethods.Gdip.Ok) 716throw SafeNativeMethods.Gdip.StatusException(status); 751int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 753if (status != SafeNativeMethods.Gdip.Ok) 754throw SafeNativeMethods.Gdip.StatusException(status); 762int status = SafeNativeMethods.Gdip.GdipGetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 764if (status != SafeNativeMethods.Gdip.Ok) 765throw SafeNativeMethods.Gdip.StatusException(status); 788int status = SafeNativeMethods.Gdip.GdipResetLineTransform(new HandleRef(this, this.NativeBrush)); 790if (status != SafeNativeMethods.Gdip.Ok) 791throw SafeNativeMethods.Gdip.StatusException(status); 819int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new HandleRef(this, this.NativeBrush), 823if (status != SafeNativeMethods.Gdip.Ok) 824throw SafeNativeMethods.Gdip.StatusException(status); 844int status = SafeNativeMethods.Gdip.GdipTranslateLineTransform(new HandleRef(this, this.NativeBrush), 848if (status != SafeNativeMethods.Gdip.Ok) 849throw SafeNativeMethods.Gdip.StatusException(status); 869int status = SafeNativeMethods.Gdip.GdipScaleLineTransform(new HandleRef(this, this.NativeBrush), 874if (status != SafeNativeMethods.Gdip.Ok) 875throw SafeNativeMethods.Gdip.StatusException(status); 895int status = SafeNativeMethods.Gdip.GdipRotateLineTransform(new HandleRef(this, this.NativeBrush), 899if (status != SafeNativeMethods.Gdip.Ok) 900throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\Matrix.cs (86)
40int status = SafeNativeMethods.Gdip.GdipCreateMatrix(out matrix); 42if (status != SafeNativeMethods.Gdip.Ok) 43throw SafeNativeMethods.Gdip.StatusException(status); 63int status = SafeNativeMethods.Gdip.GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, 66if (status != SafeNativeMethods.Gdip.Ok) 67throw SafeNativeMethods.Gdip.StatusException(status); 85throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 88IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(plgpts); 94int status = SafeNativeMethods.Gdip.GdipCreateMatrix3(ref gprectf, new HandleRef(null, buf), out matrix); 96if (status != SafeNativeMethods.Gdip.Ok) { 97throw SafeNativeMethods.Gdip.StatusException(status); 120throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 123IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(plgpts); 129int status = SafeNativeMethods.Gdip.GdipCreateMatrix3I(ref gprect, new HandleRef(null, buf), out matrix); 131if (status != SafeNativeMethods.Gdip.Ok) { 132throw SafeNativeMethods.Gdip.StatusException(status); 154SafeNativeMethods.Gdip.GdipDeleteMatrix(new HandleRef(this, nativeMatrix)); 175int status = SafeNativeMethods.Gdip.GdipCloneMatrix(new HandleRef(this, nativeMatrix), out cloneMatrix); 177if (status != SafeNativeMethods.Gdip.Ok) 178throw SafeNativeMethods.Gdip.StatusException(status); 196int status = SafeNativeMethods.Gdip.GdipGetMatrixElements(new HandleRef(this, nativeMatrix), buf); 198if (status != SafeNativeMethods.Gdip.Ok) { 199throw SafeNativeMethods.Gdip.StatusException(status); 238int status = SafeNativeMethods.Gdip.GdipSetMatrixElements(new HandleRef(this, nativeMatrix), 242if (status != SafeNativeMethods.Gdip.Ok) 243throw SafeNativeMethods.Gdip.StatusException(status); 268int status = SafeNativeMethods.Gdip.GdipMultiplyMatrix(new HandleRef(this, nativeMatrix), new HandleRef(matrix, matrix.nativeMatrix), 271if (status != SafeNativeMethods.Gdip.Ok) 272throw SafeNativeMethods.Gdip.StatusException(status); 295int status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), 298if (status != SafeNativeMethods.Gdip.Ok) 299throw SafeNativeMethods.Gdip.StatusException(status); 319int status = SafeNativeMethods.Gdip.GdipScaleMatrix(new HandleRef(this, nativeMatrix), scaleX, scaleY, order); 321if (status != SafeNativeMethods.Gdip.Ok) 322throw SafeNativeMethods.Gdip.StatusException(status); 345int status = SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 347if (status != SafeNativeMethods.Gdip.Ok) 348throw SafeNativeMethods.Gdip.StatusException(status); 375status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 376status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 377status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 380status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 381status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 382status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 385if (status != SafeNativeMethods.Gdip.Ok) 386throw SafeNativeMethods.Gdip.StatusException(status); 395int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, MatrixOrder.Prepend); 397if (status != SafeNativeMethods.Gdip.Ok) 398throw SafeNativeMethods.Gdip.StatusException(status); 409int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, order); 411if (status != SafeNativeMethods.Gdip.Ok) 412throw SafeNativeMethods.Gdip.StatusException(status); 421int status = SafeNativeMethods.Gdip.GdipInvertMatrix(new HandleRef(this, nativeMatrix)); 423if (status != SafeNativeMethods.Gdip.Ok) 424throw SafeNativeMethods.Gdip.StatusException(status); 438IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 441int status = SafeNativeMethods.Gdip.GdipTransformMatrixPoints(new HandleRef(this, nativeMatrix), 445if (status != SafeNativeMethods.Gdip.Ok) { 446throw SafeNativeMethods.Gdip.StatusException(status); 449PointF[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(buf, pts.Length); 470IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 473int status = SafeNativeMethods.Gdip.GdipTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 477if (status != SafeNativeMethods.Gdip.Ok) { 478throw SafeNativeMethods.Gdip.StatusException(status); 482Point[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTArray(buf, pts.Length); 502IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 505int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPoints(new HandleRef(this, nativeMatrix), 509if (status != SafeNativeMethods.Gdip.Ok) { 510throw SafeNativeMethods.Gdip.StatusException(status); 514PointF[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(buf, pts.Length); 543IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 546int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 550if (status != SafeNativeMethods.Gdip.Ok) { 551throw SafeNativeMethods.Gdip.StatusException(status); 555Point[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTArray(buf, pts.Length); 575int status = SafeNativeMethods.Gdip.GdipIsMatrixInvertible(new HandleRef(this, nativeMatrix), out isInvertible); 577if (status != SafeNativeMethods.Gdip.Ok) 578throw SafeNativeMethods.Gdip.StatusException(status); 592int status = SafeNativeMethods.Gdip.GdipIsMatrixIdentity(new HandleRef(this, nativeMatrix), out isIdentity); 594if (status != SafeNativeMethods.Gdip.Ok) 595throw SafeNativeMethods.Gdip.StatusException(status); 615int status = SafeNativeMethods.Gdip.GdipIsMatrixEqual(new HandleRef(this, nativeMatrix), 619if (status != SafeNativeMethods.Gdip.Ok) 620throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\Metafile.cs (63)
68int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromWmf(new HandleRef(null, hmetafile), deleteWmf, wmfHeader, out metafile); 70if (status != SafeNativeMethods.Gdip.Ok) 71throw SafeNativeMethods.Gdip.StatusException(status); 94int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(new HandleRef(null, henhmetafile), deleteEmf, out metafile); 96if (status != SafeNativeMethods.Gdip.Ok) 97throw SafeNativeMethods.Gdip.StatusException(status); 116int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromFile(filename, out metafile); 118if (status != SafeNativeMethods.Gdip.Ok) 119throw SafeNativeMethods.Gdip.StatusException(status); 140int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromStream(new GPStream(stream), out metafile); 142if (status != SafeNativeMethods.Gdip.Ok) 143throw SafeNativeMethods.Gdip.StatusException(status); 172int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 179if (status != SafeNativeMethods.Gdip.Ok) 180throw SafeNativeMethods.Gdip.StatusException(status); 237int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 243if (status != SafeNativeMethods.Gdip.Ok) 244throw SafeNativeMethods.Gdip.StatusException(status); 303status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 312status = SafeNativeMethods.Gdip.GdipRecordMetafileI(new HandleRef(null, referenceHdc), 320if (status != SafeNativeMethods.Gdip.Ok) 321throw SafeNativeMethods.Gdip.StatusException(status); 363int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, new HandleRef(null, referenceHdc), 370if (status != SafeNativeMethods.Gdip.Ok) 371throw SafeNativeMethods.Gdip.StatusException(status); 441int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, 449if (status != SafeNativeMethods.Gdip.Ok) 450throw SafeNativeMethods.Gdip.StatusException(status); 524status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, 534status = SafeNativeMethods.Gdip.GdipRecordMetafileFileNameI(fileName, 543if (status != SafeNativeMethods.Gdip.Ok) 544throw SafeNativeMethods.Gdip.StatusException(status); 586int status = SafeNativeMethods.Gdip.GdipRecordMetafileStream(new GPStream(stream), 594if (status != SafeNativeMethods.Gdip.Ok) 595throw SafeNativeMethods.Gdip.StatusException(status); 653int status = SafeNativeMethods.Gdip.GdipRecordMetafileStream(new GPStream(stream), 661if (status != SafeNativeMethods.Gdip.Ok) 662throw SafeNativeMethods.Gdip.StatusException(status); 724status = SafeNativeMethods.Gdip.GdipRecordMetafileStream(new GPStream(stream), 734status = SafeNativeMethods.Gdip.GdipRecordMetafileStreamI(new GPStream(stream), 743if (status != SafeNativeMethods.Gdip.Ok) 744throw SafeNativeMethods.Gdip.StatusException(status); 773int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromWmf(new HandleRef(null, hmetafile), wmfHeader, header.wmf); 775if (status != SafeNativeMethods.Gdip.Ok) 776throw SafeNativeMethods.Gdip.StatusException(status); 796int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(new HandleRef(null, henhmetafile), header.emf); 798if (status != SafeNativeMethods.Gdip.Ok) 799throw SafeNativeMethods.Gdip.StatusException(status); 821int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromFile(fileName, memory); 823if (status != SafeNativeMethods.Gdip.Ok) { 824throw SafeNativeMethods.Gdip.StatusException(status); 866int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromStream(new GPStream(stream), memory); 868if (status != SafeNativeMethods.Gdip.Ok) { 869throw SafeNativeMethods.Gdip.StatusException(status); 913int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(new HandleRef(this, nativeImage), memory); 915if (status != SafeNativeMethods.Gdip.Ok) { 916throw SafeNativeMethods.Gdip.StatusException(status); 956int status = SafeNativeMethods.Gdip.GdipGetHemfFromMetafile(new HandleRef(this, nativeImage), out hEmf); 958if (status != SafeNativeMethods.Gdip.Ok) 959throw SafeNativeMethods.Gdip.StatusException(status); 977int status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(new HandleRef(this, nativeImage), 983if (status != SafeNativeMethods.Gdip.Ok) 984throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\MetafileHeader.cs (22)
133throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 154throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 168throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 182throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 196throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 211throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 226throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 253throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 288 throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 305 throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 320 throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter);
commonui\System\Drawing\Advanced\MetafileHeaderEmf.cs (1)
34public SafeNativeMethods.ENHMETAHEADER EmfHeader;
commonui\System\Drawing\Advanced\PathGradientBrush.cs (100)
64IntPtr pointsBuf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 67int status = SafeNativeMethods.Gdip.GdipCreatePathGradient(new HandleRef(null, pointsBuf), 72if (status != SafeNativeMethods.Gdip.Ok) 73throw SafeNativeMethods.Gdip.StatusException(status); 124IntPtr pointsBuf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 127int status = SafeNativeMethods.Gdip.GdipCreatePathGradientI(new HandleRef(null, pointsBuf), 132if (status != SafeNativeMethods.Gdip.Ok) 133throw SafeNativeMethods.Gdip.StatusException(status); 164int status = SafeNativeMethods.Gdip.GdipCreatePathGradientFromPath(new HandleRef(path, path.nativePath), 167if (status != SafeNativeMethods.Gdip.Ok) 168throw SafeNativeMethods.Gdip.StatusException(status); 191int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 193if (status != SafeNativeMethods.Gdip.Ok) 194throw SafeNativeMethods.Gdip.StatusException(status); 212int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), out argb); 214if (status != SafeNativeMethods.Gdip.Ok) 215throw SafeNativeMethods.Gdip.StatusException(status); 221int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), value.ToArgb()); 223if (status != SafeNativeMethods.Gdip.Ok) 224throw SafeNativeMethods.Gdip.StatusException(status); 238int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 241if (status != SafeNativeMethods.Gdip.Ok) 242throw SafeNativeMethods.Gdip.StatusException(status); 245throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.InvalidParameter); 252status = SafeNativeMethods.Gdip.GdipSetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 256if (status != SafeNativeMethods.Gdip.Ok) 257throw SafeNativeMethods.Gdip.StatusException(status); 264int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 267if (status != SafeNativeMethods.Gdip.Ok) 268throw SafeNativeMethods.Gdip.StatusException(status); 272status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 277if (status != SafeNativeMethods.Gdip.Ok) 278throw SafeNativeMethods.Gdip.StatusException(status); 315int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), point); 317if (status != SafeNativeMethods.Gdip.Ok) 318throw SafeNativeMethods.Gdip.StatusException(status); 324int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), new GPPOINTF(value)); 326if (status != SafeNativeMethods.Gdip.Ok) 327throw SafeNativeMethods.Gdip.StatusException(status); 337int status = SafeNativeMethods.Gdip.GdipGetPathGradientRect(new HandleRef(this, this.NativeBrush), ref rect); 339if (status != SafeNativeMethods.Gdip.Ok) 340throw SafeNativeMethods.Gdip.StatusException(status); 364int status = SafeNativeMethods.Gdip.GdipGetPathGradientBlendCount(new HandleRef(this, this.NativeBrush), out retval); 366if (status != SafeNativeMethods.Gdip.Ok) { 367throw SafeNativeMethods.Gdip.StatusException(status); 384status = SafeNativeMethods.Gdip.GdipGetPathGradientBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 386if (status != SafeNativeMethods.Gdip.Ok) { 387throw SafeNativeMethods.Gdip.StatusException(status); 429int status = SafeNativeMethods.Gdip.GdipSetPathGradientBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 431if (status != SafeNativeMethods.Gdip.Ok) { 432throw SafeNativeMethods.Gdip.StatusException(status); 481int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 483if (status != SafeNativeMethods.Gdip.Ok) 484throw SafeNativeMethods.Gdip.StatusException(status); 506int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 508if (status != SafeNativeMethods.Gdip.Ok) 509throw SafeNativeMethods.Gdip.StatusException(status); 521int status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 523if (status != SafeNativeMethods.Gdip.Ok) { 524throw SafeNativeMethods.Gdip.StatusException(status); 548status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 550if (status != SafeNativeMethods.Gdip.Ok) { 551throw SafeNativeMethods.Gdip.StatusException(status); 605int status = SafeNativeMethods.Gdip.GdipSetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 607if (status != SafeNativeMethods.Gdip.Ok) { 608throw SafeNativeMethods.Gdip.StatusException(status); 641int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 643if (status != SafeNativeMethods.Gdip.Ok) 644throw SafeNativeMethods.Gdip.StatusException(status); 650int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 652if (status != SafeNativeMethods.Gdip.Ok) 653throw SafeNativeMethods.Gdip.StatusException(status); 679int status = SafeNativeMethods.Gdip.GdipResetPathGradientTransform(new HandleRef(this, this.NativeBrush)); 681if (status != SafeNativeMethods.Gdip.Ok) 682throw SafeNativeMethods.Gdip.StatusException(status); 709int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, this.NativeBrush), 713if (status != SafeNativeMethods.Gdip.Ok) 714throw SafeNativeMethods.Gdip.StatusException(status); 738int status = SafeNativeMethods.Gdip.GdipTranslatePathGradientTransform(new HandleRef(this, this.NativeBrush), 741if (status != SafeNativeMethods.Gdip.Ok) 742throw SafeNativeMethods.Gdip.StatusException(status); 766int status = SafeNativeMethods.Gdip.GdipScalePathGradientTransform(new HandleRef(this, this.NativeBrush), 769if (status != SafeNativeMethods.Gdip.Ok) 770throw SafeNativeMethods.Gdip.StatusException(status); 794int status = SafeNativeMethods.Gdip.GdipRotatePathGradientTransform(new HandleRef(this, this.NativeBrush), 797if (status != SafeNativeMethods.Gdip.Ok) 798throw SafeNativeMethods.Gdip.StatusException(status); 815int status = SafeNativeMethods.Gdip.GdipGetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), scaleX, scaleY); 817if (status != SafeNativeMethods.Gdip.Ok) 818throw SafeNativeMethods.Gdip.StatusException(status); 823int status = SafeNativeMethods.Gdip.GdipSetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), value.X, value.Y); 825if (status != SafeNativeMethods.Gdip.Ok) 826throw SafeNativeMethods.Gdip.StatusException(status); 834int status = SafeNativeMethods.Gdip.GdipSetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 836if (status != SafeNativeMethods.Gdip.Ok) 837throw SafeNativeMethods.Gdip.StatusException(status); 843int status = SafeNativeMethods.Gdip.GdipGetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), out mode); 845if (status != SafeNativeMethods.Gdip.Ok) 846throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (12)
41int status = SafeNativeMethods.Gdip.GdipNewPrivateFontCollection(out nativeFontCollection); 43if (status != SafeNativeMethods.Gdip.Ok) 44throw SafeNativeMethods.Gdip.StatusException(status); 63SafeNativeMethods.Gdip.GdipDeletePrivateFontCollection(out nativeFontCollection); 69SafeNativeMethods.RemoveFontFile(fontFile); 99int status = SafeNativeMethods.Gdip.GdipPrivateAddFontFile(new HandleRef(this, nativeFontCollection), filename); 101if (status != SafeNativeMethods.Gdip.Ok) 102throw SafeNativeMethods.Gdip.StatusException(status); 105if (SafeNativeMethods.AddFontFile(filename) != 0) { 125int status = SafeNativeMethods.Gdip.GdipPrivateAddMemoryFont(new HandleRef(this, nativeFontCollection), new HandleRef(null, memory), length); 127if (status != SafeNativeMethods.Gdip.Ok) 128throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (4)
31int status = SafeNativeMethods.Gdip.Ok; 35status = SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(this, handle)); 47Debug.Assert(status == SafeNativeMethods.Gdip.Ok, "GDI+ returned an error status: " + status.ToString(CultureInfo.InvariantCulture)); 49return status == SafeNativeMethods.Gdip.Ok;
commonui\System\Drawing\Advanced\StringFormat.cs (67)
143int status = SafeNativeMethods.Gdip.GdipCreateStringFormat(options, language, out nativeFormat); 145if (status != SafeNativeMethods.Gdip.Ok) 146throw SafeNativeMethods.Gdip.StatusException(status); 164int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(format, format.nativeFormat), out nativeFormat); 166if (status != SafeNativeMethods.Gdip.Ok) 167throw SafeNativeMethods.Gdip.StatusException(status); 187SafeNativeMethods.Gdip.GdipDeleteStringFormat(new HandleRef(this, nativeFormat)); 214int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(this, nativeFormat), out cloneFormat); 216if (status != SafeNativeMethods.Gdip.Ok) 217throw SafeNativeMethods.Gdip.StatusException(status); 233int status = SafeNativeMethods.Gdip.GdipGetStringFormatFlags(new HandleRef(this, nativeFormat), out format); 235if (status != SafeNativeMethods.Gdip.Ok) 236throw SafeNativeMethods.Gdip.StatusException(status); 242int status = SafeNativeMethods.Gdip.GdipSetStringFormatFlags(new HandleRef(this, nativeFormat), value); 244if (status != SafeNativeMethods.Gdip.Ok) 245throw SafeNativeMethods.Gdip.StatusException(status); 258int status = SafeNativeMethods.Gdip.GdipSetStringFormatMeasurableCharacterRanges(new HandleRef(this, nativeFormat), ranges.Length, ranges); 260if (status != SafeNativeMethods.Gdip.Ok) 261throw SafeNativeMethods.Gdip.StatusException(status); 274int status = SafeNativeMethods.Gdip.GdipGetStringFormatAlign(new HandleRef(this, nativeFormat), out alignment); 276if (status != SafeNativeMethods.Gdip.Ok) 277throw SafeNativeMethods.Gdip.StatusException(status); 289int status = SafeNativeMethods.Gdip.GdipSetStringFormatAlign(new HandleRef(this, nativeFormat), value); 291if (status != SafeNativeMethods.Gdip.Ok) 292throw SafeNativeMethods.Gdip.StatusException(status); 305int status = SafeNativeMethods.Gdip.GdipGetStringFormatLineAlign(new HandleRef(this, nativeFormat), out alignment); 307if (status != SafeNativeMethods.Gdip.Ok) 308throw SafeNativeMethods.Gdip.StatusException(status); 318int status = SafeNativeMethods.Gdip.GdipSetStringFormatLineAlign(new HandleRef(this, nativeFormat), value); 320if (status != SafeNativeMethods.Gdip.Ok) 321throw SafeNativeMethods.Gdip.StatusException(status); 335int status = SafeNativeMethods.Gdip.GdipGetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), out hotkeyPrefix); 337if (status != SafeNativeMethods.Gdip.Ok) 338throw SafeNativeMethods.Gdip.StatusException(status); 350int status = SafeNativeMethods.Gdip.GdipSetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), value); 352if (status != SafeNativeMethods.Gdip.Ok) 353throw SafeNativeMethods.Gdip.StatusException(status); 365int status = SafeNativeMethods.Gdip.GdipSetStringFormatTabStops(new HandleRef(this, nativeFormat), firstTabOffset, tabStops.Length, tabStops); 367if (status != SafeNativeMethods.Gdip.Ok) 368throw SafeNativeMethods.Gdip.StatusException(status); 378int status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStopCount(new HandleRef(this, nativeFormat), out count); 380if (status != SafeNativeMethods.Gdip.Ok) 381throw SafeNativeMethods.Gdip.StatusException(status); 384status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStops(new HandleRef(this, nativeFormat), count, out firstTabOffset, tabStops); 386if (status != SafeNativeMethods.Gdip.Ok) 387throw SafeNativeMethods.Gdip.StatusException(status); 404int status = SafeNativeMethods.Gdip.GdipGetStringFormatTrimming(new HandleRef(this, nativeFormat), out trimming); 406if (status != SafeNativeMethods.Gdip.Ok) 407throw SafeNativeMethods.Gdip.StatusException(status); 418int status = SafeNativeMethods.Gdip.GdipSetStringFormatTrimming(new HandleRef(this, nativeFormat), value); 420if (status != SafeNativeMethods.Gdip.Ok) 421throw SafeNativeMethods.Gdip.StatusException(status); 442int status = SafeNativeMethods.Gdip.GdipStringFormatGetGenericDefault(out format); 444if (status != SafeNativeMethods.Gdip.Ok) 445throw SafeNativeMethods.Gdip.StatusException(status); 468int status = SafeNativeMethods.Gdip.GdipStringFormatGetGenericTypographic(out format); 470if (status != SafeNativeMethods.Gdip.Ok) 471throw SafeNativeMethods.Gdip.StatusException(status); 483int status = SafeNativeMethods.Gdip.GdipSetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), language, substitute); 485if (status != SafeNativeMethods.Gdip.Ok) 486throw SafeNativeMethods.Gdip.StatusException(status); 499int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out lang, out digitSubstitute); 501if (status != SafeNativeMethods.Gdip.Ok) 502throw SafeNativeMethods.Gdip.StatusException(status); 517int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out language, out digitSubstitute); 519if (status != SafeNativeMethods.Gdip.Ok) 520throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Advanced\TextureBrush.cs (48)
83int status = SafeNativeMethods.Gdip.GdipCreateTexture(new HandleRef(image, image.nativeImage), 87if (status != SafeNativeMethods.Gdip.Ok) 88throw SafeNativeMethods.Gdip.StatusException(status); 121int status = SafeNativeMethods.Gdip.GdipCreateTexture2(new HandleRef(image, image.nativeImage), 129if (status != SafeNativeMethods.Gdip.Ok) 130throw SafeNativeMethods.Gdip.StatusException(status); 163int status = SafeNativeMethods.Gdip.GdipCreateTexture2I(new HandleRef(image, image.nativeImage), 171if (status != SafeNativeMethods.Gdip.Ok) { 172throw SafeNativeMethods.Gdip.StatusException(status); 218int status = SafeNativeMethods.Gdip.GdipCreateTextureIA(new HandleRef(image, image.nativeImage), 227if (status != SafeNativeMethods.Gdip.Ok) { 228throw SafeNativeMethods.Gdip.StatusException(status); 273int status = SafeNativeMethods.Gdip.GdipCreateTextureIAI(new HandleRef(image, image.nativeImage), 282if (status != SafeNativeMethods.Gdip.Ok) { 283throw SafeNativeMethods.Gdip.StatusException(status); 307int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 309if (status != SafeNativeMethods.Gdip.Ok) 310throw SafeNativeMethods.Gdip.StatusException(status); 320int status = SafeNativeMethods.Gdip.GdipSetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 322if (status != SafeNativeMethods.Gdip.Ok) 323throw SafeNativeMethods.Gdip.StatusException(status); 329int status = SafeNativeMethods.Gdip.GdipGetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 331if (status != SafeNativeMethods.Gdip.Ok) { 332throw SafeNativeMethods.Gdip.StatusException(status); 361int status = SafeNativeMethods.Gdip.GdipSetTextureWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 363if (status != SafeNativeMethods.Gdip.Ok) { 364throw SafeNativeMethods.Gdip.StatusException(status); 371int status = SafeNativeMethods.Gdip.GdipGetTextureWrapMode(new HandleRef(this, this.NativeBrush), out mode); 373if (status != SafeNativeMethods.Gdip.Ok) { 374throw SafeNativeMethods.Gdip.StatusException(status); 414int status = SafeNativeMethods.Gdip.GdipGetTextureImage(new HandleRef(this, this.NativeBrush), out image); 416if (status != SafeNativeMethods.Gdip.Ok) { 417throw SafeNativeMethods.Gdip.StatusException(status); 433int status = SafeNativeMethods.Gdip.GdipResetTextureTransform(new HandleRef(this, this.NativeBrush)); 435if (status != SafeNativeMethods.Gdip.Ok) { 436throw SafeNativeMethods.Gdip.StatusException(status); 463int status = SafeNativeMethods.Gdip.GdipMultiplyTextureTransform(new HandleRef(this, this.NativeBrush), 467if (status != SafeNativeMethods.Gdip.Ok) { 468throw SafeNativeMethods.Gdip.StatusException(status); 491int status = SafeNativeMethods.Gdip.GdipTranslateTextureTransform(new HandleRef(this, this.NativeBrush), 496if (status != SafeNativeMethods.Gdip.Ok) { 497throw SafeNativeMethods.Gdip.StatusException(status); 520int status = SafeNativeMethods.Gdip.GdipScaleTextureTransform(new HandleRef(this, this.NativeBrush), 525if (status != SafeNativeMethods.Gdip.Ok) { 526throw SafeNativeMethods.Gdip.StatusException(status); 549int status = SafeNativeMethods.Gdip.GdipRotateTextureTransform(new HandleRef(this, this.NativeBrush), 553if (status != SafeNativeMethods.Gdip.Ok) { 554throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Bitmap.cs (79)
65int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromFile(filename, out bitmap); 67if (status != SafeNativeMethods.Gdip.Ok) 68throw SafeNativeMethods.Gdip.StatusException(status); 70status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 72if (status != SafeNativeMethods.Gdip.Ok) { 73SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 74throw SafeNativeMethods.Gdip.StatusException(status); 103status = SafeNativeMethods.Gdip.GdipCreateBitmapFromFileICM(filename, out bitmap); 106status = SafeNativeMethods.Gdip.GdipCreateBitmapFromFile(filename, out bitmap); 109if (status != SafeNativeMethods.Gdip.Ok) 110throw SafeNativeMethods.Gdip.StatusException(status); 112status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 114if (status != SafeNativeMethods.Gdip.Ok) { 115SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 116throw SafeNativeMethods.Gdip.StatusException(status); 139int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromStream(new GPStream(stream), out bitmap); 141if (status != SafeNativeMethods.Gdip.Ok) 142throw SafeNativeMethods.Gdip.StatusException(status); 144status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 146if (status != SafeNativeMethods.Gdip.Ok) { 147SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 148throw SafeNativeMethods.Gdip.StatusException(status); 174int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromStream(new GPStream(stream), out bitmap); 176if (status != SafeNativeMethods.Gdip.Ok) 177throw SafeNativeMethods.Gdip.StatusException(status); 179status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 181if (status != SafeNativeMethods.Gdip.Ok) { 182SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 183throw SafeNativeMethods.Gdip.StatusException(status); 209status = SafeNativeMethods.Gdip.GdipCreateBitmapFromStreamICM(new GPStream(stream), out bitmap); 212status = SafeNativeMethods.Gdip.GdipCreateBitmapFromStream(new GPStream(stream), out bitmap); 215if (status != SafeNativeMethods.Gdip.Ok) 216throw SafeNativeMethods.Gdip.StatusException(status); 218status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 220if (status != SafeNativeMethods.Gdip.Ok) { 221SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 222throw SafeNativeMethods.Gdip.StatusException(status); 244int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, unchecked((int) format), new HandleRef(null, scan0), out bitmap); 246if (status != SafeNativeMethods.Gdip.Ok) 247throw SafeNativeMethods.Gdip.StatusException(status); 264int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, 0, unchecked((int) format), NativeMethods.NullHandleRef, out bitmap); 266if (status != SafeNativeMethods.Gdip.Ok) 267throw SafeNativeMethods.Gdip.StatusException(status); 297int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, new HandleRef(g, g.NativeGraphics), out bitmap); 299if (status != SafeNativeMethods.Gdip.Ok) 300throw SafeNativeMethods.Gdip.StatusException(status); 358int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(new HandleRef(null, hicon), out bitmap); 360if (status != SafeNativeMethods.Gdip.Ok) 361throw SafeNativeMethods.Gdip.StatusException(status); 379int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(new HandleRef(null, hinstance), 384if (status != SafeNativeMethods.Gdip.Ok) { 385throw SafeNativeMethods.Gdip.StatusException(status); 421int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(new HandleRef(this, nativeImage), out hBitmap, 427if (status != SafeNativeMethods.Gdip.Ok) 428throw SafeNativeMethods.Gdip.StatusException(status); 444int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(new HandleRef(this, nativeImage), out hIcon); 446if (status != SafeNativeMethods.Gdip.Ok) 447throw SafeNativeMethods.Gdip.StatusException(status); 496int status = SafeNativeMethods.Gdip.GdipCloneBitmapAreaI( 505if (status != SafeNativeMethods.Gdip.Ok || dstHandle == IntPtr.Zero) 506throw SafeNativeMethods.Gdip.StatusException(status); 530int status = SafeNativeMethods.Gdip.GdipCloneBitmapArea( 539if (status != SafeNativeMethods.Gdip.Ok || dstHandle == IntPtr.Zero) 540throw SafeNativeMethods.Gdip.StatusException(status); 647int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(new HandleRef(this, nativeImage), ref gprect, 650if (status != SafeNativeMethods.Gdip.Ok) 651throw SafeNativeMethods.Gdip.StatusException(status); 663int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(new HandleRef(this, nativeImage), bitmapdata); 665if (status != SafeNativeMethods.Gdip.Ok) 666throw SafeNativeMethods.Gdip.StatusException(status); 688int status = SafeNativeMethods.Gdip.GdipBitmapGetPixel(new HandleRef(this, nativeImage), x, y, out color); 690if (status != SafeNativeMethods.Gdip.Ok) 691throw SafeNativeMethods.Gdip.StatusException(status); 715int status = SafeNativeMethods.Gdip.GdipBitmapSetPixel(new HandleRef(this, nativeImage), x, y, color.ToArgb()); 717if (status != SafeNativeMethods.Gdip.Ok) 718throw SafeNativeMethods.Gdip.StatusException(status); 727int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(new HandleRef(this, nativeImage), xDpi, yDpi); 729if (status != SafeNativeMethods.Gdip.Ok) 730throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Brush.cs (1)
104SafeNativeMethods.Gdip.GdipDeleteBrush(new HandleRef(this, this.nativeBrush));
commonui\System\Drawing\Brushes.cs (282)
175Brush transparent = (Brush)SafeNativeMethods.Gdip.ThreadData[TransparentKey]; 178SafeNativeMethods.Gdip.ThreadData[TransparentKey] = transparent; 192Brush aliceBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[AliceBlueKey]; 195SafeNativeMethods.Gdip.ThreadData[AliceBlueKey] = aliceBlue; 209Brush antiqueWhite = (Brush)SafeNativeMethods.Gdip.ThreadData[AntiqueWhiteKey]; 212SafeNativeMethods.Gdip.ThreadData[AntiqueWhiteKey] = antiqueWhite; 226Brush aqua = (Brush)SafeNativeMethods.Gdip.ThreadData[AquaKey]; 229SafeNativeMethods.Gdip.ThreadData[AquaKey] = aqua; 243Brush aquamarine = (Brush)SafeNativeMethods.Gdip.ThreadData[AquamarineKey]; 246SafeNativeMethods.Gdip.ThreadData[AquamarineKey] = aquamarine; 260Brush azure = (Brush)SafeNativeMethods.Gdip.ThreadData[AzureKey]; 263SafeNativeMethods.Gdip.ThreadData[AzureKey] = azure; 277Brush beige = (Brush)SafeNativeMethods.Gdip.ThreadData[BeigeKey]; 280SafeNativeMethods.Gdip.ThreadData[BeigeKey] = beige; 294Brush bisque = (Brush)SafeNativeMethods.Gdip.ThreadData[BisqueKey]; 297SafeNativeMethods.Gdip.ThreadData[BisqueKey] = bisque; 311Brush black = (Brush)SafeNativeMethods.Gdip.ThreadData[BlackKey]; 314SafeNativeMethods.Gdip.ThreadData[BlackKey] = black; 328Brush blanchedAlmond = (Brush)SafeNativeMethods.Gdip.ThreadData[BlanchedAlmondKey]; 331SafeNativeMethods.Gdip.ThreadData[BlanchedAlmondKey] = blanchedAlmond; 345Brush blue = (Brush)SafeNativeMethods.Gdip.ThreadData[BlueKey]; 348SafeNativeMethods.Gdip.ThreadData[BlueKey] = blue; 362Brush blueViolet = (Brush)SafeNativeMethods.Gdip.ThreadData[BlueVioletKey]; 365SafeNativeMethods.Gdip.ThreadData[BlueVioletKey] = blueViolet; 379Brush brown = (Brush)SafeNativeMethods.Gdip.ThreadData[BrownKey]; 382SafeNativeMethods.Gdip.ThreadData[BrownKey] = brown; 396Brush burlyWood = (Brush)SafeNativeMethods.Gdip.ThreadData[BurlyWoodKey]; 399SafeNativeMethods.Gdip.ThreadData[BurlyWoodKey] = burlyWood; 413Brush cadetBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[CadetBlueKey]; 416SafeNativeMethods.Gdip.ThreadData[CadetBlueKey] = cadetBlue; 430Brush chartreuse = (Brush)SafeNativeMethods.Gdip.ThreadData[ChartreuseKey]; 433SafeNativeMethods.Gdip.ThreadData[ChartreuseKey] = chartreuse; 447Brush chocolate = (Brush)SafeNativeMethods.Gdip.ThreadData[ChocolateKey]; 450SafeNativeMethods.Gdip.ThreadData[ChocolateKey] = chocolate; 464Brush choral = (Brush)SafeNativeMethods.Gdip.ThreadData[ChoralKey]; 467SafeNativeMethods.Gdip.ThreadData[ChoralKey] = choral; 481Brush cornflowerBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[CornflowerBlueKey]; 484SafeNativeMethods.Gdip.ThreadData[CornflowerBlueKey] = cornflowerBlue; 498Brush cornsilk = (Brush)SafeNativeMethods.Gdip.ThreadData[CornsilkKey]; 501SafeNativeMethods.Gdip.ThreadData[CornsilkKey] = cornsilk; 515Brush crimson = (Brush)SafeNativeMethods.Gdip.ThreadData[CrimsonKey]; 518SafeNativeMethods.Gdip.ThreadData[CrimsonKey] = crimson; 532Brush cyan = (Brush)SafeNativeMethods.Gdip.ThreadData[CyanKey]; 535SafeNativeMethods.Gdip.ThreadData[CyanKey] = cyan; 549Brush darkBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkBlueKey]; 552SafeNativeMethods.Gdip.ThreadData[DarkBlueKey] = darkBlue; 566Brush darkCyan = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkCyanKey]; 569SafeNativeMethods.Gdip.ThreadData[DarkCyanKey] = darkCyan; 583Brush darkGoldenrod = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkGoldenrodKey]; 586SafeNativeMethods.Gdip.ThreadData[DarkGoldenrodKey] = darkGoldenrod; 600Brush darkGray = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkGrayKey]; 603SafeNativeMethods.Gdip.ThreadData[DarkGrayKey] = darkGray; 617Brush darkGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkGreenKey]; 620SafeNativeMethods.Gdip.ThreadData[DarkGreenKey] = darkGreen; 634Brush darkKhaki = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkKhakiKey]; 637SafeNativeMethods.Gdip.ThreadData[DarkKhakiKey] = darkKhaki; 651Brush darkMagenta = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkMagentaKey]; 654SafeNativeMethods.Gdip.ThreadData[DarkMagentaKey] = darkMagenta; 668Brush darkOliveGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkOliveGreenKey]; 671SafeNativeMethods.Gdip.ThreadData[DarkOliveGreenKey] = darkOliveGreen; 685Brush darkOrange = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkOrangeKey]; 688SafeNativeMethods.Gdip.ThreadData[DarkOrangeKey] = darkOrange; 702Brush darkOrchid = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkOrchidKey]; 705SafeNativeMethods.Gdip.ThreadData[DarkOrchidKey] = darkOrchid; 719Brush darkRed = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkRedKey]; 722SafeNativeMethods.Gdip.ThreadData[DarkRedKey] = darkRed; 736Brush darkSalmon = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkSalmonKey]; 739SafeNativeMethods.Gdip.ThreadData[DarkSalmonKey] = darkSalmon; 753Brush darkSeaGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkSeaGreenKey]; 756SafeNativeMethods.Gdip.ThreadData[DarkSeaGreenKey] = darkSeaGreen; 770Brush darkSlateBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkSlateBlueKey]; 773SafeNativeMethods.Gdip.ThreadData[DarkSlateBlueKey] = darkSlateBlue; 787Brush darkSlateGray = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkSlateGrayKey]; 790SafeNativeMethods.Gdip.ThreadData[DarkSlateGrayKey] = darkSlateGray; 804Brush darkTurquoise = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkTurquoiseKey]; 807SafeNativeMethods.Gdip.ThreadData[DarkTurquoiseKey] = darkTurquoise; 821Brush darkViolet = (Brush)SafeNativeMethods.Gdip.ThreadData[DarkVioletKey]; 824SafeNativeMethods.Gdip.ThreadData[DarkVioletKey] = darkViolet; 838Brush deepPink = (Brush)SafeNativeMethods.Gdip.ThreadData[DeepPinkKey]; 841SafeNativeMethods.Gdip.ThreadData[DeepPinkKey] = deepPink; 855Brush deepSkyBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[DeepSkyBlueKey]; 858SafeNativeMethods.Gdip.ThreadData[DeepSkyBlueKey] = deepSkyBlue; 872Brush dimGray = (Brush)SafeNativeMethods.Gdip.ThreadData[DimGrayKey]; 875SafeNativeMethods.Gdip.ThreadData[DimGrayKey] = dimGray; 889Brush dodgerBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[DodgerBlueKey]; 892SafeNativeMethods.Gdip.ThreadData[DodgerBlueKey] = dodgerBlue; 906Brush firebrick = (Brush)SafeNativeMethods.Gdip.ThreadData[FirebrickKey]; 909SafeNativeMethods.Gdip.ThreadData[FirebrickKey] = firebrick; 923Brush floralWhite = (Brush)SafeNativeMethods.Gdip.ThreadData[FloralWhiteKey]; 926SafeNativeMethods.Gdip.ThreadData[FloralWhiteKey] = floralWhite; 940Brush forestGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[ForestGreenKey]; 943SafeNativeMethods.Gdip.ThreadData[ForestGreenKey] = forestGreen; 957Brush fuchia = (Brush)SafeNativeMethods.Gdip.ThreadData[FuchiaKey]; 960SafeNativeMethods.Gdip.ThreadData[FuchiaKey] = fuchia; 974Brush gainsboro = (Brush)SafeNativeMethods.Gdip.ThreadData[GainsboroKey]; 977SafeNativeMethods.Gdip.ThreadData[GainsboroKey] = gainsboro; 991Brush ghostWhite = (Brush)SafeNativeMethods.Gdip.ThreadData[GhostWhiteKey]; 994SafeNativeMethods.Gdip.ThreadData[GhostWhiteKey] = ghostWhite; 1008Brush gold = (Brush)SafeNativeMethods.Gdip.ThreadData[GoldKey]; 1011SafeNativeMethods.Gdip.ThreadData[GoldKey] = gold; 1025Brush goldenrod = (Brush)SafeNativeMethods.Gdip.ThreadData[GoldenrodKey]; 1028SafeNativeMethods.Gdip.ThreadData[GoldenrodKey] = goldenrod; 1042Brush gray = (Brush)SafeNativeMethods.Gdip.ThreadData[GrayKey]; 1045SafeNativeMethods.Gdip.ThreadData[GrayKey] = gray; 1059Brush green = (Brush)SafeNativeMethods.Gdip.ThreadData[GreenKey]; 1062SafeNativeMethods.Gdip.ThreadData[GreenKey] = green; 1076Brush greenYellow = (Brush)SafeNativeMethods.Gdip.ThreadData[GreenYellowKey]; 1079SafeNativeMethods.Gdip.ThreadData[GreenYellowKey] = greenYellow; 1093Brush honeydew = (Brush)SafeNativeMethods.Gdip.ThreadData[HoneydewKey]; 1096SafeNativeMethods.Gdip.ThreadData[HoneydewKey] = honeydew; 1110Brush hotPink = (Brush)SafeNativeMethods.Gdip.ThreadData[HotPinkKey]; 1113SafeNativeMethods.Gdip.ThreadData[HotPinkKey] = hotPink; 1127Brush indianRed = (Brush)SafeNativeMethods.Gdip.ThreadData[IndianRedKey]; 1130SafeNativeMethods.Gdip.ThreadData[IndianRedKey] = indianRed; 1144Brush indigo = (Brush)SafeNativeMethods.Gdip.ThreadData[IndigoKey]; 1147SafeNativeMethods.Gdip.ThreadData[IndigoKey] = indigo; 1161Brush ivory = (Brush)SafeNativeMethods.Gdip.ThreadData[IvoryKey]; 1164SafeNativeMethods.Gdip.ThreadData[IvoryKey] = ivory; 1178Brush khaki = (Brush)SafeNativeMethods.Gdip.ThreadData[KhakiKey]; 1181SafeNativeMethods.Gdip.ThreadData[KhakiKey] = khaki; 1195Brush lavender = (Brush)SafeNativeMethods.Gdip.ThreadData[LavenderKey]; 1198SafeNativeMethods.Gdip.ThreadData[LavenderKey] = lavender; 1212Brush lavenderBlush = (Brush)SafeNativeMethods.Gdip.ThreadData[LavenderBlushKey]; 1215SafeNativeMethods.Gdip.ThreadData[LavenderBlushKey] = lavenderBlush; 1229Brush lawnGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[LawnGreenKey]; 1232SafeNativeMethods.Gdip.ThreadData[LawnGreenKey] = lawnGreen; 1246Brush lemonChiffon = (Brush)SafeNativeMethods.Gdip.ThreadData[LemonChiffonKey]; 1249SafeNativeMethods.Gdip.ThreadData[LemonChiffonKey] = lemonChiffon; 1263Brush lightBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[LightBlueKey]; 1266SafeNativeMethods.Gdip.ThreadData[LightBlueKey] = lightBlue; 1280Brush lightCoral = (Brush)SafeNativeMethods.Gdip.ThreadData[LightCoralKey]; 1283SafeNativeMethods.Gdip.ThreadData[LightCoralKey] = lightCoral; 1297Brush lightCyan = (Brush)SafeNativeMethods.Gdip.ThreadData[LightCyanKey]; 1300SafeNativeMethods.Gdip.ThreadData[LightCyanKey] = lightCyan; 1314Brush lightGoldenrodYellow = (Brush)SafeNativeMethods.Gdip.ThreadData[LightGoldenrodYellowKey]; 1317SafeNativeMethods.Gdip.ThreadData[LightGoldenrodYellowKey] = lightGoldenrodYellow; 1331Brush lightGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[LightGreenKey]; 1334SafeNativeMethods.Gdip.ThreadData[LightGreenKey] = lightGreen; 1348Brush lightGray = (Brush)SafeNativeMethods.Gdip.ThreadData[LightGrayKey]; 1351SafeNativeMethods.Gdip.ThreadData[LightGrayKey] = lightGray; 1365Brush lightPink = (Brush)SafeNativeMethods.Gdip.ThreadData[LightPinkKey]; 1368SafeNativeMethods.Gdip.ThreadData[LightPinkKey] = lightPink; 1382Brush lightSalmon = (Brush)SafeNativeMethods.Gdip.ThreadData[LightSalmonKey]; 1385SafeNativeMethods.Gdip.ThreadData[LightSalmonKey] = lightSalmon; 1399Brush lightSeaGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[LightSeaGreenKey]; 1402SafeNativeMethods.Gdip.ThreadData[LightSeaGreenKey] = lightSeaGreen; 1416Brush lightSkyBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[LightSkyBlueKey]; 1419SafeNativeMethods.Gdip.ThreadData[LightSkyBlueKey] = lightSkyBlue; 1433Brush lightSlateGray = (Brush)SafeNativeMethods.Gdip.ThreadData[LightSlateGrayKey]; 1436SafeNativeMethods.Gdip.ThreadData[LightSlateGrayKey] = lightSlateGray; 1450Brush lightSteelBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[LightSteelBlueKey]; 1453SafeNativeMethods.Gdip.ThreadData[LightSteelBlueKey] = lightSteelBlue; 1467Brush lightYellow = (Brush)SafeNativeMethods.Gdip.ThreadData[LightYellowKey]; 1470SafeNativeMethods.Gdip.ThreadData[LightYellowKey] = lightYellow; 1484Brush lime = (Brush)SafeNativeMethods.Gdip.ThreadData[LimeKey]; 1487SafeNativeMethods.Gdip.ThreadData[LimeKey] = lime; 1501Brush limeGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[LimeGreenKey]; 1504SafeNativeMethods.Gdip.ThreadData[LimeGreenKey] = limeGreen; 1518Brush linen = (Brush)SafeNativeMethods.Gdip.ThreadData[LinenKey]; 1521SafeNativeMethods.Gdip.ThreadData[LinenKey] = linen; 1535Brush magenta = (Brush)SafeNativeMethods.Gdip.ThreadData[MagentaKey]; 1538SafeNativeMethods.Gdip.ThreadData[MagentaKey] = magenta; 1552Brush maroon = (Brush)SafeNativeMethods.Gdip.ThreadData[MaroonKey]; 1555SafeNativeMethods.Gdip.ThreadData[MaroonKey] = maroon; 1569Brush mediumAquamarine = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumAquamarineKey]; 1572SafeNativeMethods.Gdip.ThreadData[MediumAquamarineKey] = mediumAquamarine; 1586Brush mediumBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumBlueKey]; 1589SafeNativeMethods.Gdip.ThreadData[MediumBlueKey] = mediumBlue; 1603Brush mediumOrchid = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumOrchidKey]; 1606SafeNativeMethods.Gdip.ThreadData[MediumOrchidKey] = mediumOrchid; 1620Brush mediumPurple = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumPurpleKey]; 1623SafeNativeMethods.Gdip.ThreadData[MediumPurpleKey] = mediumPurple; 1637Brush mediumSeaGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumSeaGreenKey]; 1640SafeNativeMethods.Gdip.ThreadData[MediumSeaGreenKey] = mediumSeaGreen; 1654Brush mediumSlateBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumSlateBlueKey]; 1657SafeNativeMethods.Gdip.ThreadData[MediumSlateBlueKey] = mediumSlateBlue; 1671Brush mediumSpringGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumSpringGreenKey]; 1674SafeNativeMethods.Gdip.ThreadData[MediumSpringGreenKey] = mediumSpringGreen; 1688Brush mediumTurquoise = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumTurquoiseKey]; 1691SafeNativeMethods.Gdip.ThreadData[MediumTurquoiseKey] = mediumTurquoise; 1705Brush mediumVioletRed = (Brush)SafeNativeMethods.Gdip.ThreadData[MediumVioletRedKey]; 1708SafeNativeMethods.Gdip.ThreadData[MediumVioletRedKey] = mediumVioletRed; 1722Brush midnightBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[MidnightBlueKey]; 1725SafeNativeMethods.Gdip.ThreadData[MidnightBlueKey] = midnightBlue; 1739Brush mintCream = (Brush)SafeNativeMethods.Gdip.ThreadData[MintCreamKey]; 1742SafeNativeMethods.Gdip.ThreadData[MintCreamKey] = mintCream; 1756Brush mistyRose = (Brush)SafeNativeMethods.Gdip.ThreadData[MistyRoseKey]; 1759SafeNativeMethods.Gdip.ThreadData[MistyRoseKey] = mistyRose; 1773Brush moccasin = (Brush)SafeNativeMethods.Gdip.ThreadData[MoccasinKey]; 1776SafeNativeMethods.Gdip.ThreadData[MoccasinKey] = moccasin; 1790Brush navajoWhite = (Brush)SafeNativeMethods.Gdip.ThreadData[NavajoWhiteKey]; 1793SafeNativeMethods.Gdip.ThreadData[NavajoWhiteKey] = navajoWhite; 1807Brush navy = (Brush)SafeNativeMethods.Gdip.ThreadData[NavyKey]; 1810SafeNativeMethods.Gdip.ThreadData[NavyKey] = navy; 1824Brush oldLace = (Brush)SafeNativeMethods.Gdip.ThreadData[OldLaceKey]; 1827SafeNativeMethods.Gdip.ThreadData[OldLaceKey] = oldLace; 1841Brush olive = (Brush)SafeNativeMethods.Gdip.ThreadData[OliveKey]; 1844SafeNativeMethods.Gdip.ThreadData[OliveKey] = olive; 1858Brush oliveDrab = (Brush)SafeNativeMethods.Gdip.ThreadData[OliveDrabKey]; 1861SafeNativeMethods.Gdip.ThreadData[OliveDrabKey] = oliveDrab; 1875Brush orange = (Brush)SafeNativeMethods.Gdip.ThreadData[OrangeKey]; 1878SafeNativeMethods.Gdip.ThreadData[OrangeKey] = orange; 1892Brush orangeRed = (Brush)SafeNativeMethods.Gdip.ThreadData[OrangeRedKey]; 1895SafeNativeMethods.Gdip.ThreadData[OrangeRedKey] = orangeRed; 1909Brush orchid = (Brush)SafeNativeMethods.Gdip.ThreadData[OrchidKey]; 1912SafeNativeMethods.Gdip.ThreadData[OrchidKey] = orchid; 1926Brush paleGoldenrod = (Brush)SafeNativeMethods.Gdip.ThreadData[PaleGoldenrodKey]; 1929SafeNativeMethods.Gdip.ThreadData[PaleGoldenrodKey] = paleGoldenrod; 1943Brush paleGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[PaleGreenKey]; 1946SafeNativeMethods.Gdip.ThreadData[PaleGreenKey] = paleGreen; 1960Brush paleTurquoise = (Brush)SafeNativeMethods.Gdip.ThreadData[PaleTurquoiseKey]; 1963SafeNativeMethods.Gdip.ThreadData[PaleTurquoiseKey] = paleTurquoise; 1977Brush paleVioletRed = (Brush)SafeNativeMethods.Gdip.ThreadData[PaleVioletRedKey]; 1980SafeNativeMethods.Gdip.ThreadData[PaleVioletRedKey] = paleVioletRed; 1994Brush papayaWhip = (Brush)SafeNativeMethods.Gdip.ThreadData[PapayaWhipKey]; 1997SafeNativeMethods.Gdip.ThreadData[PapayaWhipKey] = papayaWhip; 2011Brush peachPuff = (Brush)SafeNativeMethods.Gdip.ThreadData[PeachPuffKey]; 2014SafeNativeMethods.Gdip.ThreadData[PeachPuffKey] = peachPuff; 2028Brush peru = (Brush)SafeNativeMethods.Gdip.ThreadData[PeruKey]; 2031SafeNativeMethods.Gdip.ThreadData[PeruKey] = peru; 2045Brush pink = (Brush)SafeNativeMethods.Gdip.ThreadData[PinkKey]; 2048SafeNativeMethods.Gdip.ThreadData[PinkKey] = pink; 2062Brush plum = (Brush)SafeNativeMethods.Gdip.ThreadData[PlumKey]; 2065SafeNativeMethods.Gdip.ThreadData[PlumKey] = plum; 2079Brush powderBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[PowderBlueKey]; 2082SafeNativeMethods.Gdip.ThreadData[PowderBlueKey] = powderBlue; 2096Brush purple = (Brush)SafeNativeMethods.Gdip.ThreadData[PurpleKey]; 2099SafeNativeMethods.Gdip.ThreadData[PurpleKey] = purple; 2113Brush red = (Brush)SafeNativeMethods.Gdip.ThreadData[RedKey]; 2116SafeNativeMethods.Gdip.ThreadData[RedKey] = red; 2130Brush rosyBrown = (Brush)SafeNativeMethods.Gdip.ThreadData[RosyBrownKey]; 2133SafeNativeMethods.Gdip.ThreadData[RosyBrownKey] = rosyBrown; 2147Brush royalBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[RoyalBlueKey]; 2150SafeNativeMethods.Gdip.ThreadData[RoyalBlueKey] = royalBlue; 2164Brush saddleBrown = (Brush)SafeNativeMethods.Gdip.ThreadData[SaddleBrownKey]; 2167SafeNativeMethods.Gdip.ThreadData[SaddleBrownKey] = saddleBrown; 2181Brush salmon = (Brush)SafeNativeMethods.Gdip.ThreadData[SalmonKey]; 2184SafeNativeMethods.Gdip.ThreadData[SalmonKey] = salmon; 2198Brush sandyBrown = (Brush)SafeNativeMethods.Gdip.ThreadData[SandyBrownKey]; 2201SafeNativeMethods.Gdip.ThreadData[SandyBrownKey] = sandyBrown; 2215Brush seaGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[SeaGreenKey]; 2218SafeNativeMethods.Gdip.ThreadData[SeaGreenKey] = seaGreen; 2232Brush seaShell = (Brush)SafeNativeMethods.Gdip.ThreadData[SeaShellKey]; 2235SafeNativeMethods.Gdip.ThreadData[SeaShellKey] = seaShell; 2249Brush sienna = (Brush)SafeNativeMethods.Gdip.ThreadData[SiennaKey]; 2252SafeNativeMethods.Gdip.ThreadData[SiennaKey] = sienna; 2266Brush silver = (Brush)SafeNativeMethods.Gdip.ThreadData[SilverKey]; 2269SafeNativeMethods.Gdip.ThreadData[SilverKey] = silver; 2283Brush skyBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[SkyBlueKey]; 2286SafeNativeMethods.Gdip.ThreadData[SkyBlueKey] = skyBlue; 2300Brush slateBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[SlateBlueKey]; 2303SafeNativeMethods.Gdip.ThreadData[SlateBlueKey] = slateBlue; 2317Brush slateGray = (Brush)SafeNativeMethods.Gdip.ThreadData[SlateGrayKey]; 2320SafeNativeMethods.Gdip.ThreadData[SlateGrayKey] = slateGray; 2334Brush snow = (Brush)SafeNativeMethods.Gdip.ThreadData[SnowKey]; 2337SafeNativeMethods.Gdip.ThreadData[SnowKey] = snow; 2351Brush springGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[SpringGreenKey]; 2354SafeNativeMethods.Gdip.ThreadData[SpringGreenKey] = springGreen; 2368Brush steelBlue = (Brush)SafeNativeMethods.Gdip.ThreadData[SteelBlueKey]; 2371SafeNativeMethods.Gdip.ThreadData[SteelBlueKey] = steelBlue; 2385Brush tan = (Brush)SafeNativeMethods.Gdip.ThreadData[TanKey]; 2388SafeNativeMethods.Gdip.ThreadData[TanKey] = tan; 2402Brush teal = (Brush)SafeNativeMethods.Gdip.ThreadData[TealKey]; 2405SafeNativeMethods.Gdip.ThreadData[TealKey] = teal; 2419Brush thistle = (Brush)SafeNativeMethods.Gdip.ThreadData[ThistleKey]; 2422SafeNativeMethods.Gdip.ThreadData[ThistleKey] = thistle; 2436Brush tomato = (Brush)SafeNativeMethods.Gdip.ThreadData[TomatoKey]; 2439SafeNativeMethods.Gdip.ThreadData[TomatoKey] = tomato; 2453Brush turquoise = (Brush)SafeNativeMethods.Gdip.ThreadData[TurquoiseKey]; 2456SafeNativeMethods.Gdip.ThreadData[TurquoiseKey] = turquoise; 2470Brush violet = (Brush)SafeNativeMethods.Gdip.ThreadData[VioletKey]; 2473SafeNativeMethods.Gdip.ThreadData[VioletKey] = violet; 2487Brush wheat = (Brush)SafeNativeMethods.Gdip.ThreadData[WheatKey]; 2490SafeNativeMethods.Gdip.ThreadData[WheatKey] = wheat; 2504Brush white = (Brush)SafeNativeMethods.Gdip.ThreadData[WhiteKey]; 2507SafeNativeMethods.Gdip.ThreadData[WhiteKey] = white; 2521Brush whiteSmoke = (Brush)SafeNativeMethods.Gdip.ThreadData[WhiteSmokeKey]; 2524SafeNativeMethods.Gdip.ThreadData[WhiteSmokeKey] = whiteSmoke; 2538Brush yellow = (Brush)SafeNativeMethods.Gdip.ThreadData[YellowKey]; 2541SafeNativeMethods.Gdip.ThreadData[YellowKey] = yellow; 2555Brush yellowGreen = (Brush)SafeNativeMethods.Gdip.ThreadData[YellowGreenKey]; 2558SafeNativeMethods.Gdip.ThreadData[YellowGreenKey] = yellowGreen;
commonui\System\Drawing\BufferedGraphics.cs (1)
161SafeNativeMethods.BitBlt(refTargetDC, targetLoc.X, targetLoc.Y, virtualSize.Width, virtualSize.Height,
commonui\System\Drawing\BufferedGraphicsContext.cs (10)
253hbm = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hdc), 1, 1); 265SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 283SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 296SafeNativeMethods.DeleteObject(new HandleRef(null, hbm)); 344palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, palHalftone), 0, cColors, aj); 348palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, hpal), 0, cColors, aj); 400oldBitmap = SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, dib)); 489hbmRet = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0); 530SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, oldBitmap)); 552SafeNativeMethods.DeleteObject(new HandleRef(this, dib));
commonui\System\Drawing\CopyPixelOperation.cs (17)
32Blackness = SafeNativeMethods.BLACKNESS, 40CaptureBlt = SafeNativeMethods.CAPTUREBLT, 48DestinationInvert = SafeNativeMethods.DSTINVERT, 56MergeCopy = SafeNativeMethods.MERGECOPY, 64MergePaint = SafeNativeMethods.MERGEPAINT, 73NoMirrorBitmap = SafeNativeMethods.NOMIRRORBITMAP, 82NotSourceCopy = SafeNativeMethods.NOTSRCCOPY, 91NotSourceErase = SafeNativeMethods.NOTSRCERASE, 101PatCopy = SafeNativeMethods.PATCOPY, 111PatInvert = SafeNativeMethods.PATINVERT, 120PatPaint = SafeNativeMethods.PATPAINT, 128SourceAnd = SafeNativeMethods.SRCAND, 136SourceCopy = SafeNativeMethods.SRCCOPY, 144SourceErase = SafeNativeMethods.SRCERASE, 152SourceInvert = SafeNativeMethods.SRCINVERT, 160SourcePaint = SafeNativeMethods.SRCPAINT, 168Whiteness = SafeNativeMethods.WHITENESS,
commonui\System\Drawing\FontConverter.cs (1)
259else if (font.GdiCharSet != SafeNativeMethods.DEFAULT_CHARSET) {
commonui\System\Drawing\Graphics.cs (371)
152int status = SafeNativeMethods.Gdip.GdipCreateFromHDC(new HandleRef(null, hdc), out nativeGraphics); 154if (status != SafeNativeMethods.Gdip.Ok) { 155throw SafeNativeMethods.Gdip.StatusException(status); 178int status = SafeNativeMethods.Gdip.GdipCreateFromHDC2(new HandleRef(null, hdc), new HandleRef(null, hdevice), out gdipNativeGraphics); 180if (status != SafeNativeMethods.Gdip.Ok) { 181throw SafeNativeMethods.Gdip.StatusException(status); 212int status = SafeNativeMethods.Gdip.GdipCreateFromHWND(new HandleRef(null, hwnd), out nativeGraphics); 214if (status != SafeNativeMethods.Gdip.Ok) { 215throw SafeNativeMethods.Gdip.StatusException(status); 239int status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(new HandleRef(image, image.nativeImage), 242if (status != SafeNativeMethods.Gdip.Ok) { 243throw SafeNativeMethods.Gdip.StatusException(status); 286int status = SafeNativeMethods.Gdip.GdipGetDC(new HandleRef(this, this.NativeGraphics), out hdc); 288if (status != SafeNativeMethods.Gdip.Ok) { 289throw SafeNativeMethods.Gdip.StatusException(status); 333int status = SafeNativeMethods.Gdip.GdipReleaseDC(new HandleRef(this, this.NativeGraphics), new HandleRef(null, hdc)); 335if (status != SafeNativeMethods.Gdip.Ok) { 336throw SafeNativeMethods.Gdip.StatusException(status); 405SafeNativeMethods.Gdip.GdipDeleteGraphics(new HandleRef(this, this.nativeGraphics)); 454int status = SafeNativeMethods.Gdip.GdipFlush(new HandleRef(this, this.NativeGraphics), intention); 456if (status != SafeNativeMethods.Gdip.Ok) { 457throw SafeNativeMethods.Gdip.StatusException(status); 480int status = SafeNativeMethods.Gdip.GdipGetCompositingMode(new HandleRef(this, this.NativeGraphics), out mode); 482if (status != SafeNativeMethods.Gdip.Ok) { 483throw SafeNativeMethods.Gdip.StatusException(status); 495int status = SafeNativeMethods.Gdip.GdipSetCompositingMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 497if (status != SafeNativeMethods.Gdip.Ok) { 498throw SafeNativeMethods.Gdip.StatusException(status); 511int status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(new HandleRef(this, this.NativeGraphics), out x, out y); 513if (status != SafeNativeMethods.Gdip.Ok) { 514throw SafeNativeMethods.Gdip.StatusException(status); 520int status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(new HandleRef(this, this.NativeGraphics), value.X, value.Y); 522if (status != SafeNativeMethods.Gdip.Ok) { 523throw SafeNativeMethods.Gdip.StatusException(status); 536int status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(new HandleRef(this, this.NativeGraphics), out cq); 538if (status != SafeNativeMethods.Gdip.Ok) { 539throw SafeNativeMethods.Gdip.StatusException(status); 551int status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(new HandleRef(this, this.NativeGraphics), 554if (status != SafeNativeMethods.Gdip.Ok) { 555throw SafeNativeMethods.Gdip.StatusException(status); 572int status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(new HandleRef(this, this.NativeGraphics), out hint); 574if (status != SafeNativeMethods.Gdip.Ok) { 575throw SafeNativeMethods.Gdip.StatusException(status); 587int status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(new HandleRef(this, this.NativeGraphics), value); 589if (status != SafeNativeMethods.Gdip.Ok) { 590throw SafeNativeMethods.Gdip.StatusException(status); 603int status = SafeNativeMethods.Gdip.GdipGetTextContrast(new HandleRef(this, this.NativeGraphics), out tgv); 605if (status != SafeNativeMethods.Gdip.Ok) { 606throw SafeNativeMethods.Gdip.StatusException(status); 612int status = SafeNativeMethods.Gdip.GdipSetTextContrast(new HandleRef(this, this.NativeGraphics), value); 614if (status != SafeNativeMethods.Gdip.Ok) { 615throw SafeNativeMethods.Gdip.StatusException(status); 628int status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(new HandleRef(this, this.NativeGraphics), out mode); 630if (status != SafeNativeMethods.Gdip.Ok) { 631throw SafeNativeMethods.Gdip.StatusException(status); 643int status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(new HandleRef(this, this.NativeGraphics), value); 645if (status != SafeNativeMethods.Gdip.Ok) { 646throw SafeNativeMethods.Gdip.StatusException(status); 659int status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), out mode); 661if (status != SafeNativeMethods.Gdip.Ok) { 662throw SafeNativeMethods.Gdip.StatusException(status); 674int status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), value); 676if (status != SafeNativeMethods.Gdip.Ok) { 677throw SafeNativeMethods.Gdip.StatusException(status); 705int status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(new HandleRef(this, this.NativeGraphics), out mode); 707if (status != SafeNativeMethods.Gdip.Ok) { 708throw SafeNativeMethods.Gdip.StatusException(status); 721int status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 723if (status != SafeNativeMethods.Gdip.Ok) { 724throw SafeNativeMethods.Gdip.StatusException(status); 741int status = SafeNativeMethods.Gdip.GdipGetWorldTransform(new HandleRef(this, this.NativeGraphics), 744if (status != SafeNativeMethods.Gdip.Ok) { 745throw SafeNativeMethods.Gdip.StatusException(status); 751int status = SafeNativeMethods.Gdip.GdipSetWorldTransform(new HandleRef(this, this.NativeGraphics), 754if (status != SafeNativeMethods.Gdip.Ok) { 755throw SafeNativeMethods.Gdip.StatusException(status); 772int status = SafeNativeMethods.Gdip.GdipGetPageUnit(new HandleRef(this, this.NativeGraphics), out unit); 774if (status != SafeNativeMethods.Gdip.Ok) { 775throw SafeNativeMethods.Gdip.StatusException(status); 787int status = SafeNativeMethods.Gdip.GdipSetPageUnit(new HandleRef(this, this.NativeGraphics), unchecked((int) value)); 789if (status != SafeNativeMethods.Gdip.Ok) { 790throw SafeNativeMethods.Gdip.StatusException(status); 802int status = SafeNativeMethods.Gdip.GdipGetPageScale(new HandleRef(this, this.NativeGraphics), scale); 804if (status != SafeNativeMethods.Gdip.Ok) { 805throw SafeNativeMethods.Gdip.StatusException(status); 813int status = SafeNativeMethods.Gdip.GdipSetPageScale(new HandleRef(this, this.NativeGraphics), value); 815if (status != SafeNativeMethods.Gdip.Ok) { 816throw SafeNativeMethods.Gdip.StatusException(status); 828int status = SafeNativeMethods.Gdip.GdipGetDpiX(new HandleRef(this, this.NativeGraphics), dpi); 830if (status != SafeNativeMethods.Gdip.Ok) { 831throw SafeNativeMethods.Gdip.StatusException(status); 845int status = SafeNativeMethods.Gdip.GdipGetDpiY(new HandleRef(this, this.NativeGraphics), dpi); 847if (status != SafeNativeMethods.Gdip.Ok) { 848throw SafeNativeMethods.Gdip.StatusException(status); 925int result = SafeNativeMethods.BitBlt(targetDC, destinationX, destinationY, destWidth, destHeight, 951int status = SafeNativeMethods.Gdip.GdipResetWorldTransform(new HandleRef(this, this.NativeGraphics)); 953if (status != SafeNativeMethods.Gdip.Ok) { 954throw SafeNativeMethods.Gdip.StatusException(status); 979int status = SafeNativeMethods.Gdip.GdipMultiplyWorldTransform(new HandleRef(this, this.NativeGraphics), 982if (status != SafeNativeMethods.Gdip.Ok) { 983throw SafeNativeMethods.Gdip.StatusException(status); 998int status = SafeNativeMethods.Gdip.GdipTranslateWorldTransform(new HandleRef(this, this.NativeGraphics), dx, dy, order); 1000if (status != SafeNativeMethods.Gdip.Ok) { 1001throw SafeNativeMethods.Gdip.StatusException(status); 1025int status = SafeNativeMethods.Gdip.GdipScaleWorldTransform(new HandleRef(this, this.NativeGraphics), sx, sy, order); 1027if (status != SafeNativeMethods.Gdip.Ok) { 1028throw SafeNativeMethods.Gdip.StatusException(status); 1043int status = SafeNativeMethods.Gdip.GdipRotateWorldTransform(new HandleRef(this, this.NativeGraphics), angle, order); 1045if (status != SafeNativeMethods.Gdip.Ok) { 1046throw SafeNativeMethods.Gdip.StatusException(status); 1065IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 1066int status = SafeNativeMethods.Gdip.GdipTransformPoints(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1070if (status != SafeNativeMethods.Gdip.Ok) { 1071throw SafeNativeMethods.Gdip.StatusException(status); 1075PointF[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTFArrayF(buf, pts.Length); 1098IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 1099int status = SafeNativeMethods.Gdip.GdipTransformPointsI(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1103if (status != SafeNativeMethods.Gdip.Ok) { 1104throw SafeNativeMethods.Gdip.StatusException(status); 1107Point[] newPts = SafeNativeMethods.Gdip.ConvertGPPOINTArray(buf, pts.Length); 1124int status = SafeNativeMethods.Gdip.GdipGetNearestColor(new HandleRef(this, this.NativeGraphics), ref nearest); 1126if (status != SafeNativeMethods.Gdip.Ok) { 1127throw SafeNativeMethods.Gdip.StatusException(status); 1152int status = SafeNativeMethods.Gdip.GdipDrawLine(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1182IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1184int status = SafeNativeMethods.Gdip.GdipDrawLines(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1208int status = SafeNativeMethods.Gdip.GdipDrawLineI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1238IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1240int status = SafeNativeMethods.Gdip.GdipDrawLinesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1263int status = SafeNativeMethods.Gdip.GdipDrawArc(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1293int status = SafeNativeMethods.Gdip.GdipDrawArcI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1322int status = SafeNativeMethods.Gdip.GdipDrawBezier(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, 1354IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1356int status = SafeNativeMethods.Gdip.GdipDrawBeziers(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1391IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1393int status = SafeNativeMethods.Gdip.GdipDrawBeziersI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1427int status = SafeNativeMethods.Gdip.GdipDrawRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1446int status = SafeNativeMethods.Gdip.GdipDrawRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, height); 1467IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1469int status = SafeNativeMethods.Gdip.GdipDrawRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1494IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1496int status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1530int status = SafeNativeMethods.Gdip.GdipDrawEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1559int status = SafeNativeMethods.Gdip.GdipDrawEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1591int status = SafeNativeMethods.Gdip.GdipDrawPie(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1623int status = SafeNativeMethods.Gdip.GdipDrawPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1642IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1644int status = SafeNativeMethods.Gdip.GdipDrawPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1667IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1669int status = SafeNativeMethods.Gdip.GdipDrawPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1693int status = SafeNativeMethods.Gdip.GdipDrawPath(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1714IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1716int status = SafeNativeMethods.Gdip.GdipDrawCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1740IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1742int status = SafeNativeMethods.Gdip.GdipDrawCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1775IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1777int status = SafeNativeMethods.Gdip.GdipDrawCurve3(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1802IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1804int status = SafeNativeMethods.Gdip.GdipDrawCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1827IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1829int status = SafeNativeMethods.Gdip.GdipDrawCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1853IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1855int status = SafeNativeMethods.Gdip.GdipDrawCurve3I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1881IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1883int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1907IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1909int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1933IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1935int status = SafeNativeMethods.Gdip.GdipDrawClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1958IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1960int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1977int status = SafeNativeMethods.Gdip.GdipGraphicsClear(new HandleRef(this, this.NativeGraphics), color.ToArgb()); 1979if (status != SafeNativeMethods.Gdip.Ok) { 1980throw SafeNativeMethods.Gdip.StatusException(status); 2007int status = SafeNativeMethods.Gdip.GdipFillRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2036int status = SafeNativeMethods.Gdip.GdipFillRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, width, height); 2057IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 2059int status = SafeNativeMethods.Gdip.GdipFillRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2084IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 2086int status = SafeNativeMethods.Gdip.GdipFillRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2121IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2123int status = SafeNativeMethods.Gdip.GdipFillPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2157IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2159int status = SafeNativeMethods.Gdip.GdipFillPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2193int status = SafeNativeMethods.Gdip.GdipFillEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2222int status = SafeNativeMethods.Gdip.GdipFillEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2255int status = SafeNativeMethods.Gdip.GdipFillPie(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2275int status = SafeNativeMethods.Gdip.GdipFillPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2294int status = SafeNativeMethods.Gdip.GdipFillPath(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2316IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2318int status = SafeNativeMethods.Gdip.GdipFillClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2350IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2352int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2377IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2379int status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2408IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2410int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2435int status = SafeNativeMethods.Gdip.GdipFillRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2502int status = SafeNativeMethods.Gdip.GdipDrawString(new HandleRef(this, this.NativeGraphics), s, s.Length, new HandleRef(font, font.NativeFont), ref grf, new HandleRef(format, nativeStringFormat), new HandleRef(brush, brush.NativeBrush)); 2526int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grfLayout, 2531if (status != SafeNativeMethods.Gdip.Ok) { 2532throw SafeNativeMethods.Gdip.StatusException(status); 2556int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2561if (status != SafeNativeMethods.Gdip.Ok) { 2562throw SafeNativeMethods.Gdip.StatusException(status); 2592int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2597if (status != SafeNativeMethods.Gdip.Ok) { 2598throw SafeNativeMethods.Gdip.StatusException(status); 2641int status = SafeNativeMethods.Gdip.GdipGetStringFormatMeasurableCharacterRangeCount(new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat) 2644if (status != SafeNativeMethods.Gdip.Ok) { 2645throw SafeNativeMethods.Gdip.StatusException(status); 2659status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grf, 2664if (status != SafeNativeMethods.Gdip.Ok) { 2665throw SafeNativeMethods.Gdip.StatusException(status); 2763int status = SafeNativeMethods.Gdip.GdipDrawImage(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2790int status = SafeNativeMethods.Gdip.GdipDrawImageRect(new HandleRef(this, this.NativeGraphics), 2819int status = SafeNativeMethods.Gdip.GdipDrawImageI(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2846int status = SafeNativeMethods.Gdip.GdipDrawImageRectI(new HandleRef(this, this.NativeGraphics), 2930IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 2932int status = SafeNativeMethods.Gdip.GdipDrawImagePoints(new HandleRef(this, this.NativeGraphics), 2963IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 2965int status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(new HandleRef(this, this.NativeGraphics), 2995int status = SafeNativeMethods.Gdip.GdipDrawImagePointRect( 3023int status = SafeNativeMethods.Gdip.GdipDrawImagePointRectI( 3051int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect( 3085int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI( 3123IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3125int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect( 3181IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3183int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRect( 3247IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3249int status = SafeNativeMethods.Gdip.GdipDrawImagePointsRectI( 3307int status = SafeNativeMethods.Gdip.GdipDrawImageRectRect( 3362int status = SafeNativeMethods.Gdip.GdipDrawImageRectRectI( 3408int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoint(new HandleRef(this, this.NativeGraphics), 3415if (status != SafeNativeMethods.Gdip.Ok) { 3416throw SafeNativeMethods.Gdip.StatusException(status); 3443int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointI(new HandleRef(this, this.NativeGraphics), 3450if (status != SafeNativeMethods.Gdip.Ok) { 3451throw SafeNativeMethods.Gdip.StatusException(status); 3480int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestRect( 3488if (status != SafeNativeMethods.Gdip.Ok) { 3489throw SafeNativeMethods.Gdip.StatusException(status); 3517int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestRectI(new HandleRef(this, this.NativeGraphics), 3524if (status != SafeNativeMethods.Gdip.Ok) { 3525throw SafeNativeMethods.Gdip.StatusException(status); 3558IntPtr points = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3560int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoints(new HandleRef(this, this.NativeGraphics), 3569if (status != SafeNativeMethods.Gdip.Ok) { 3570throw SafeNativeMethods.Gdip.StatusException(status); 3604IntPtr points = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3606int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointsI(new HandleRef(this, this.NativeGraphics), 3615if (status != SafeNativeMethods.Gdip.Ok) { 3616throw SafeNativeMethods.Gdip.StatusException(status); 3648int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoint(new HandleRef(this, this.NativeGraphics), 3657if (status != SafeNativeMethods.Gdip.Ok) { 3658throw SafeNativeMethods.Gdip.StatusException(status); 3691int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointI(new HandleRef(this, this.NativeGraphics), 3700if (status != SafeNativeMethods.Gdip.Ok) { 3701throw SafeNativeMethods.Gdip.StatusException(status); 3734int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestRect( 3744if (status != SafeNativeMethods.Gdip.Ok) { 3745throw SafeNativeMethods.Gdip.StatusException(status); 3781int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestRectI(new HandleRef(this, this.NativeGraphics), 3790if (status != SafeNativeMethods.Gdip.Ok) { 3791throw SafeNativeMethods.Gdip.StatusException(status); 3836IntPtr buffer = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3840int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoints(new HandleRef(this, this.NativeGraphics), 3851if (status != SafeNativeMethods.Gdip.Ok) { 3852throw SafeNativeMethods.Gdip.StatusException(status); 3898IntPtr buffer = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3902int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointsI(new HandleRef(this, this.NativeGraphics), 3913if (status != SafeNativeMethods.Gdip.Ok) { 3914throw SafeNativeMethods.Gdip.StatusException(status); 3940int status = SafeNativeMethods.Gdip.GdipSetClipGraphics(new HandleRef(this, this.NativeGraphics), new HandleRef(g, g.NativeGraphics), combineMode); 3942if (status != SafeNativeMethods.Gdip.Ok) { 3943throw SafeNativeMethods.Gdip.StatusException(status); 3958int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3961if (status != SafeNativeMethods.Gdip.Ok) { 3962throw SafeNativeMethods.Gdip.StatusException(status); 3977int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3980if (status != SafeNativeMethods.Gdip.Ok) { 3981throw SafeNativeMethods.Gdip.StatusException(status); 3999int status = SafeNativeMethods.Gdip.GdipSetClipPath(new HandleRef(this, this.NativeGraphics), new HandleRef(path, path.nativePath), combineMode); 4001if (status != SafeNativeMethods.Gdip.Ok) { 4002throw SafeNativeMethods.Gdip.StatusException(status); 4014int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), combineMode); 4016if (status != SafeNativeMethods.Gdip.Ok) { 4017throw SafeNativeMethods.Gdip.StatusException(status); 4025int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4028if (status != SafeNativeMethods.Gdip.Ok) { 4029throw SafeNativeMethods.Gdip.StatusException(status); 4037int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4040if (status != SafeNativeMethods.Gdip.Ok) { 4041throw SafeNativeMethods.Gdip.StatusException(status); 4052int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), 4055if (status != SafeNativeMethods.Gdip.Ok) { 4056throw SafeNativeMethods.Gdip.StatusException(status); 4064int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4067if (status != SafeNativeMethods.Gdip.Ok) { 4068throw SafeNativeMethods.Gdip.StatusException(status); 4079int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), 4083if (status != SafeNativeMethods.Gdip.Ok) { 4084throw SafeNativeMethods.Gdip.StatusException(status); 4092int status = SafeNativeMethods.Gdip.GdipResetClip(new HandleRef(this, this.NativeGraphics)); 4094if (status != SafeNativeMethods.Gdip.Ok) { 4095throw SafeNativeMethods.Gdip.StatusException(status); 4103int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4105if (status != SafeNativeMethods.Gdip.Ok) { 4106throw SafeNativeMethods.Gdip.StatusException(status); 4114int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4116if (status != SafeNativeMethods.Gdip.Ok) { 4117throw SafeNativeMethods.Gdip.StatusException(status); 4203int status = SafeNativeMethods.Gdip.GdipGetClip(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion)); 4205if (status != SafeNativeMethods.Gdip.Ok) { 4206throw SafeNativeMethods.Gdip.StatusException(status); 4223int status = SafeNativeMethods.Gdip.GdipGetClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4225if (status != SafeNativeMethods.Gdip.Ok) { 4226throw SafeNativeMethods.Gdip.StatusException(status); 4240int status = SafeNativeMethods.Gdip.GdipIsClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4242if (status != SafeNativeMethods.Gdip.Ok) { 4243throw SafeNativeMethods.Gdip.StatusException(status); 4267int status = SafeNativeMethods.Gdip.GdipGetVisibleClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4269if (status != SafeNativeMethods.Gdip.Ok) { 4270throw SafeNativeMethods.Gdip.StatusException(status); 4287int status = SafeNativeMethods.Gdip.GdipIsVisibleClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4289if (status != SafeNativeMethods.Gdip.Ok) { 4290throw SafeNativeMethods.Gdip.StatusException(status); 4311int status = SafeNativeMethods.Gdip.GdipIsVisiblePointI(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4313if (status != SafeNativeMethods.Gdip.Ok) { 4314throw SafeNativeMethods.Gdip.StatusException(status); 4333int status = SafeNativeMethods.Gdip.GdipIsVisiblePoint(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4335if (status != SafeNativeMethods.Gdip.Ok) { 4336throw SafeNativeMethods.Gdip.StatusException(status); 4355int status = SafeNativeMethods.Gdip.GdipIsVisibleRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4358if (status != SafeNativeMethods.Gdip.Ok) { 4359throw SafeNativeMethods.Gdip.StatusException(status); 4378int status = SafeNativeMethods.Gdip.GdipIsVisibleRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4381if (status != SafeNativeMethods.Gdip.Ok) { 4382throw SafeNativeMethods.Gdip.StatusException(status); 4433int status = SafeNativeMethods.Gdip.GdipSaveGraphics(new HandleRef(this, this.NativeGraphics), out state); 4435if (status != SafeNativeMethods.Gdip.Ok) { 4437throw SafeNativeMethods.Gdip.StatusException(status); 4451int status = SafeNativeMethods.Gdip.GdipRestoreGraphics(new HandleRef(this, this.NativeGraphics), gstate.nativeState); 4453if (status != SafeNativeMethods.Gdip.Ok) { 4454throw SafeNativeMethods.Gdip.StatusException(status); 4477int status = SafeNativeMethods.Gdip.GdipBeginContainer(new HandleRef(this, this.NativeGraphics), ref dstf, 4480if (status != SafeNativeMethods.Gdip.Ok) { 4482throw SafeNativeMethods.Gdip.StatusException(status); 4500int status = SafeNativeMethods.Gdip.GdipBeginContainer2(new HandleRef(this, this.NativeGraphics), out state); 4502if (status != SafeNativeMethods.Gdip.Ok) { 4504throw SafeNativeMethods.Gdip.StatusException(status); 4521int status = SafeNativeMethods.Gdip.GdipEndContainer(new HandleRef(this, this.NativeGraphics), container.nativeGraphicsContainer); 4523if (status != SafeNativeMethods.Gdip.Ok) { 4524throw SafeNativeMethods.Gdip.StatusException(status); 4543int status = SafeNativeMethods.Gdip.GdipBeginContainerI(new HandleRef(this, this.NativeGraphics), ref gpDest, 4546if (status != SafeNativeMethods.Gdip.Ok) { 4548throw SafeNativeMethods.Gdip.StatusException(status); 4565int status = SafeNativeMethods.Gdip.GdipComment(new HandleRef(this, this.NativeGraphics), data.Length, data); 4567if (status != SafeNativeMethods.Gdip.Ok) { 4568throw SafeNativeMethods.Gdip.StatusException(status); 4584halftonePalette = SafeNativeMethods.Gdip.GdipCreateHalftonePalette(); 4597SafeNativeMethods.IntDeleteObject(new HandleRef(null, halftonePalette)); 4617if (status != SafeNativeMethods.Gdip.Ok) { 4619if (status == SafeNativeMethods.Gdip.GenericError || status == SafeNativeMethods.Gdip.Win32Error) { 4621if (error == SafeNativeMethods.ERROR_ACCESS_DENIED || error == SafeNativeMethods.ERROR_PROC_NOT_FOUND || 4629throw SafeNativeMethods.Gdip.StatusException(status); 4641if (errorStatus != SafeNativeMethods.Gdip.Ok) { 4643errorStatus = SafeNativeMethods.Gdip.Ok;
commonui\System\Drawing\Icon.cs (47)
144handle = SafeNativeMethods.CopyImage(new HandleRef(original, original.Handle), SafeNativeMethods.IMAGE_ICON, iconSize.Width, iconSize.Height, 0); 281IntPtr hIcon = SafeNativeMethods.ExtractAssociatedIcon(NativeMethods.NullHandleRef, sb, ref index); 326SafeNativeMethods.ICONINFO info = new SafeNativeMethods.ICONINFO(); 327SafeNativeMethods.GetIconInfo(new HandleRef(this, Handle), info); 328SafeNativeMethods.BITMAP bmp = new SafeNativeMethods.BITMAP(); 331SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 332SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 336SafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 341SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask)); 383SafeNativeMethods.DestroyIcon(new HandleRef(this, handle)); 473IntPtr hSaveRgn = SafeNativeMethods.SaveClipRgn(dc); 475SafeNativeMethods.IntersectClipRect(new HandleRef(this, dc), targetX, targetY, targetX+clipWidth, targetY+clipHeight); 476SafeNativeMethods.DrawIconEx(new HandleRef(null, dc), 484SafeNativeMethods.DI_NORMAL); 487SafeNativeMethods.RestoreClipRgn(dc, hSaveRgn); 611int icondirSize = Marshal.SizeOf(typeof(SafeNativeMethods.ICONDIR)); 619width = UnsafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CXICON); 623height = UnsafeNativeMethods.GetSystemMetrics(SafeNativeMethods.SM_CYICON); 629bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.BITSPIXEL); 630bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.PLANES); 651SafeNativeMethods.ICONDIRENTRY EntryTemp; 658int icondirEntrySize = Marshal.SizeOf(typeof(SafeNativeMethods.ICONDIRENTRY)); 743throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 751throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 765handle = SafeNativeMethods.CreateIconFromResourceEx(pbAlignedBuffer, bestBytesInRes, true, 0x00030000, 0, 0, 0); 770handle = SafeNativeMethods.CreateIconFromResourceEx(checked(pbIconData + bestImageOffset), bestBytesInRes, true, 0x00030000, 0, 0, 0); 773throw new Win32Exception(SafeNativeMethods.ERROR_INVALID_PARAMETER); 876SafeNativeMethods.IPicture picture; 877SafeNativeMethods.PICTDESC pictdesc = SafeNativeMethods.PICTDESC.CreateIconPICTDESC(Handle); 878Guid g = typeof(SafeNativeMethods.IPicture).GUID; 879picture = SafeNativeMethods.OleCreatePictureIndirect(pictdesc, ref g, false); 979int newOffset = bestImageOffset + Marshal.SizeOf(typeof(SafeNativeMethods.BITMAPINFOHEADER)); 1000SafeNativeMethods.ICONINFO info = new SafeNativeMethods.ICONINFO(); 1001SafeNativeMethods.GetIconInfo(new HandleRef(this, handle), info); 1002SafeNativeMethods.BITMAP bmp = new SafeNativeMethods.BITMAP(); 1005SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 1049SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 1051SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask));
commonui\System\Drawing\Image.cs (144)
192status = SafeNativeMethods.Gdip.GdipLoadImageFromFileICM(filename, out image); 195status = SafeNativeMethods.Gdip.GdipLoadImageFromFile(filename, out image); 198if (status != SafeNativeMethods.Gdip.Ok) 199throw SafeNativeMethods.Gdip.StatusException(status); 201status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 203if (status != SafeNativeMethods.Gdip.Ok) { 204SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 205throw SafeNativeMethods.Gdip.StatusException(status); 262status = SafeNativeMethods.Gdip.GdipLoadImageFromStreamICM(new GPStream(stream), out image); 265status = SafeNativeMethods.Gdip.GdipLoadImageFromStream(new GPStream(stream), out image); 268if (status != SafeNativeMethods.Gdip.Ok){ 269throw SafeNativeMethods.Gdip.StatusException(status); 273status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 275if (status != SafeNativeMethods.Gdip.Ok) { 276SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 277throw SafeNativeMethods.Gdip.StatusException(status); 294int status = SafeNativeMethods.Gdip.GdipLoadImageFromStream(new GPStream(stream), out image); 296if (status != SafeNativeMethods.Gdip.Ok) 297throw SafeNativeMethods.Gdip.StatusException(status); 299status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 301if (status != SafeNativeMethods.Gdip.Ok) { 302SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 303throw SafeNativeMethods.Gdip.StatusException(status); 310status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(this, nativeImage), out type); 314if (status != SafeNativeMethods.Gdip.Ok) 315throw SafeNativeMethods.Gdip.StatusException(status); 334int status = SafeNativeMethods.Gdip.GdipCloneImage(new HandleRef(this, nativeImage), out cloneImage); 336if (status != SafeNativeMethods.Gdip.Ok) 337throw SafeNativeMethods.Gdip.StatusException(status); 339status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, cloneImage)); 341if (status != SafeNativeMethods.Gdip.Ok) { 342SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, cloneImage)); 343throw SafeNativeMethods.Gdip.StatusException(status); 373SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(this, nativeImage)); 488int status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(null, nativeImage), out type); 490if (status != SafeNativeMethods.Gdip.Ok) 491throw SafeNativeMethods.Gdip.StatusException(status); 532int status = SafeNativeMethods.Gdip.GdipGetEncoderParameterListSize(new HandleRef(this, nativeImage), 535if (status != SafeNativeMethods.Gdip.Ok) 536throw SafeNativeMethods.Gdip.StatusException(status); 543status = SafeNativeMethods.Gdip.GdipGetEncoderParameterList(new HandleRef(this, nativeImage), 549if (status != SafeNativeMethods.Gdip.Ok) { 550throw SafeNativeMethods.Gdip.StatusException(status); 611int status = SafeNativeMethods.Gdip.Ok; 628status = SafeNativeMethods.Gdip.GdipSaveImageToFile(new HandleRef(this, nativeImage), 640if (status != SafeNativeMethods.Gdip.Ok) { 641throw SafeNativeMethods.Gdip.StatusException(status); 701int status = SafeNativeMethods.Gdip.Ok; 716status = SafeNativeMethods.Gdip.GdipSaveImageToStream(new HandleRef(this, nativeImage), 728if (status != SafeNativeMethods.Gdip.Ok) { 729throw SafeNativeMethods.Gdip.StatusException(status); 748int status = SafeNativeMethods.Gdip.GdipSaveAdd(new HandleRef(this, nativeImage), new HandleRef(encoderParams, encoder)); 753if (status != SafeNativeMethods.Gdip.Ok) { 754throw SafeNativeMethods.Gdip.StatusException(status); 777int status = SafeNativeMethods.Gdip.GdipSaveAddImage(new HandleRef(this, nativeImage), new HandleRef(image, image.nativeImage), new HandleRef(encoderParams, encoder)); 782if (status != SafeNativeMethods.Gdip.Ok) { 783throw SafeNativeMethods.Gdip.StatusException(status); 794int status = SafeNativeMethods.Gdip.GdipGetImageDimension(new HandleRef(this, nativeImage), out width, out height); 796if (status != SafeNativeMethods.Gdip.Ok) 797throw SafeNativeMethods.Gdip.StatusException(status); 838int status = SafeNativeMethods.Gdip.GdipGetImageWidth(new HandleRef(this, nativeImage), out width); 840if (status != SafeNativeMethods.Gdip.Ok) 841throw SafeNativeMethods.Gdip.StatusException(status); 860int status = SafeNativeMethods.Gdip.GdipGetImageHeight(new HandleRef(this, nativeImage), out height); 862if (status != SafeNativeMethods.Gdip.Ok) 863throw SafeNativeMethods.Gdip.StatusException(status); 878int status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(new HandleRef(this, nativeImage), out horzRes); 880if (status != SafeNativeMethods.Gdip.Ok) 881throw SafeNativeMethods.Gdip.StatusException(status); 896int status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(new HandleRef(this, nativeImage), out vertRes); 898if (status != SafeNativeMethods.Gdip.Ok) 899throw SafeNativeMethods.Gdip.StatusException(status); 914int status = SafeNativeMethods.Gdip.GdipGetImageFlags(new HandleRef(this, nativeImage), out flags); 916if (status != SafeNativeMethods.Gdip.Ok) 917throw SafeNativeMethods.Gdip.StatusException(status); 931int status = SafeNativeMethods.Gdip.GdipGetImageRawFormat(new HandleRef(this, nativeImage), ref guid); 933if (status != SafeNativeMethods.Gdip.Ok) 934throw SafeNativeMethods.Gdip.StatusException(status); 949int status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(new HandleRef(this, nativeImage), out format); 951if (status != SafeNativeMethods.Gdip.Ok) 967int status = SafeNativeMethods.Gdip.GdipGetImageBounds(new HandleRef(this, nativeImage), ref gprectf, out pageUnit); 969if (status != SafeNativeMethods.Gdip.Ok) 970throw SafeNativeMethods.Gdip.StatusException(status); 978int status = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(new HandleRef(this, nativeImage), out size); 982if (status != SafeNativeMethods.Gdip.Ok) { 983throw SafeNativeMethods.Gdip.StatusException(status); 995status = SafeNativeMethods.Gdip.GdipGetImagePalette(new HandleRef(this, nativeImage), memory, size); 998if (status != SafeNativeMethods.Gdip.Ok) { 999throw SafeNativeMethods.Gdip.StatusException(status); 1014int status = SafeNativeMethods.Gdip.GdipSetImagePalette(new HandleRef(this, nativeImage), memory); 1019if (status != SafeNativeMethods.Gdip.Ok) { 1020throw SafeNativeMethods.Gdip.StatusException(status); 1050int status = SafeNativeMethods.Gdip.GdipGetImageThumbnail(new HandleRef(this, nativeImage), thumbWidth, thumbHeight, out thumbImage, 1052if (status != SafeNativeMethods.Gdip.Ok) 1053throw SafeNativeMethods.Gdip.StatusException(status); 1073int status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(new HandleRef(this, nativeImage), out count); 1075if (status != SafeNativeMethods.Gdip.Ok) { 1076throw SafeNativeMethods.Gdip.StatusException(status); 1088throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 1091status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsList(new HandleRef(this, nativeImage), buffer, count); 1093if (status != SafeNativeMethods.Gdip.Ok) { 1095throw SafeNativeMethods.Gdip.StatusException(status); 1124int status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(new HandleRef(this, nativeImage), ref dimensionID, count); 1126if (status != SafeNativeMethods.Gdip.Ok) 1127throw SafeNativeMethods.Gdip.StatusException(status); 1143int status = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(new HandleRef(this, nativeImage), ref dimensionID, frameIndex); 1145if (status != SafeNativeMethods.Gdip.Ok) 1146throw SafeNativeMethods.Gdip.StatusException(status); 1158int status = SafeNativeMethods.Gdip.GdipImageRotateFlip(new HandleRef(this, nativeImage), unchecked((int) rotateFlipType)); 1160if (status != SafeNativeMethods.Gdip.Ok) 1161throw SafeNativeMethods.Gdip.StatusException(status); 1176int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1178if (status != SafeNativeMethods.Gdip.Ok) 1179throw SafeNativeMethods.Gdip.StatusException(status); 1187status = SafeNativeMethods.Gdip.GdipGetPropertyIdList(new HandleRef(this, nativeImage), count, propid); 1189if (status != SafeNativeMethods.Gdip.Ok) 1190throw SafeNativeMethods.Gdip.StatusException(status); 1205int status = SafeNativeMethods.Gdip.GdipGetPropertyItemSize(new HandleRef(this, nativeImage), propid, out size); 1207if (status != SafeNativeMethods.Gdip.Ok) 1208throw SafeNativeMethods.Gdip.StatusException(status); 1216throw SafeNativeMethods.Gdip.StatusException(SafeNativeMethods.Gdip.OutOfMemory); 1218status = SafeNativeMethods.Gdip.GdipGetPropertyItem(new HandleRef(this, nativeImage), propid, size, propdata); 1221if (status != SafeNativeMethods.Gdip.Ok) { 1222throw SafeNativeMethods.Gdip.StatusException(status); 1240int status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(new HandleRef(this, nativeImage), propid); 1241if (status != SafeNativeMethods.Gdip.Ok) 1242throw SafeNativeMethods.Gdip.StatusException(status); 1256int status = SafeNativeMethods.Gdip.GdipSetPropertyItem(new HandleRef(this, nativeImage), propItemInternal); 1257if (status != SafeNativeMethods.Gdip.Ok) 1258throw SafeNativeMethods.Gdip.StatusException(status); 1273int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1275if (status != SafeNativeMethods.Gdip.Ok) 1276throw SafeNativeMethods.Gdip.StatusException(status); 1278status = SafeNativeMethods.Gdip.GdipGetPropertySize(new HandleRef(this, nativeImage), out size, ref count); 1280if (status != SafeNativeMethods.Gdip.Ok) 1281throw SafeNativeMethods.Gdip.StatusException(status); 1288status = SafeNativeMethods.Gdip.GdipGetAllPropertyItems(new HandleRef(this, nativeImage), size, count, propdata); 1293if (status != SafeNativeMethods.Gdip.Ok) { 1294throw SafeNativeMethods.Gdip.StatusException(status); 1340int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHBITMAP(new HandleRef(null, hbitmap), new HandleRef(null, hpalette), out bitmap); 1342if (status != SafeNativeMethods.Gdip.Ok) 1343throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\ImageConverter.cs (4)
198if (rawData.Length <= sizeof(SafeNativeMethods.OBJECTHEADER) || Marshal.ReadInt16(addr) != 0x1c15) 208SafeNativeMethods.OBJECTHEADER pHeader = (SafeNativeMethods.OBJECTHEADER)Marshal.PtrToStructure(addr, typeof(SafeNativeMethods.OBJECTHEADER));
commonui\System\Drawing\KnownColorTable.cs (34)
423return FromWin32Value(SafeNativeMethods.GetSysColor(index)); 446colorTable[(int)KnownColor.ActiveBorder] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ActiveBorder); 447colorTable[(int)KnownColor.ActiveCaption] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ActiveCaption); 448colorTable[(int)KnownColor.ActiveCaptionText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ActiveCaptionText); 449colorTable[(int)KnownColor.AppWorkspace] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.AppWorkspace); 450colorTable[(int)KnownColor.ButtonFace] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ButtonFace); 451colorTable[(int)KnownColor.ButtonHighlight] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ButtonHighlight); 452colorTable[(int)KnownColor.ButtonShadow] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ButtonShadow); 453colorTable[(int)KnownColor.Control] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Control); 454colorTable[(int)KnownColor.ControlDark] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ControlDark); 455colorTable[(int)KnownColor.ControlDarkDark] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ControlDarkDark); 456colorTable[(int)KnownColor.ControlLight] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ControlLight); 457colorTable[(int)KnownColor.ControlLightLight] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ControlLightLight); 458colorTable[(int)KnownColor.ControlText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ControlText); 459colorTable[(int)KnownColor.Desktop] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Desktop); 460colorTable[(int)KnownColor.GradientActiveCaption] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.GradientActiveCaption); 461colorTable[(int)KnownColor.GradientInactiveCaption] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.GradientInactiveCaption); 462colorTable[(int)KnownColor.GrayText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.GrayText); 463colorTable[(int)KnownColor.Highlight] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Highlight); 464colorTable[(int)KnownColor.HighlightText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.HighlightText); 465colorTable[(int)KnownColor.HotTrack] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.HotTrack); 466colorTable[(int)KnownColor.InactiveBorder] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.InactiveBorder); 467colorTable[(int)KnownColor.InactiveCaption] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.InactiveCaption); 468colorTable[(int)KnownColor.InactiveCaptionText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.InactiveCaptionText); 469colorTable[(int)KnownColor.Info] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Info); 470colorTable[(int)KnownColor.InfoText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.InfoText); 471colorTable[(int)KnownColor.Menu] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Menu); 472colorTable[(int)KnownColor.MenuBar] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.MenuBar); 473colorTable[(int)KnownColor.MenuHighlight] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.MenuHighlight); 474colorTable[(int)KnownColor.MenuText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.MenuText); 475colorTable[(int)KnownColor.ScrollBar] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.ScrollBar); 476colorTable[(int)KnownColor.Window] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.Window); 477colorTable[(int)KnownColor.WindowFrame] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.WindowFrame); 478colorTable[(int)KnownColor.WindowText] = SystemColorToArgb((int)SafeNativeMethods.Win32SystemColors.WindowText);
commonui\System\Drawing\NativeMethods.cs (5)
109public SafeNativeMethods.LOGFONT lfCaptionFont; 113public SafeNativeMethods.LOGFONT lfSmCaptionFont; 117public SafeNativeMethods.LOGFONT lfMenuFont; 119public SafeNativeMethods.LOGFONT lfStatusFont; 121public SafeNativeMethods.LOGFONT lfMessageFont;
commonui\System\Drawing\Pen.cs (136)
78int status = SafeNativeMethods.Gdip.GdipCreatePen1(color.ToArgb(), 83if (status != SafeNativeMethods.Gdip.Ok) 84throw SafeNativeMethods.Gdip.StatusException(status); 120int status = SafeNativeMethods.Gdip.GdipCreatePen2(new HandleRef(brush, brush.NativeBrush), 125if (status != SafeNativeMethods.Gdip.Ok) 126throw SafeNativeMethods.Gdip.StatusException(status); 166int status = SafeNativeMethods.Gdip.GdipClonePen(new HandleRef(this, this.NativePen), out clonePen); 168if (status != SafeNativeMethods.Gdip.Ok) { 169throw SafeNativeMethods.Gdip.StatusException(status); 213SafeNativeMethods.Gdip.GdipDeletePen(new HandleRef(this, this.NativePen)); 252int status = SafeNativeMethods.Gdip.GdipGetPenWidth(new HandleRef(this, this.NativePen), width); 254if (status != SafeNativeMethods.Gdip.Ok) 255throw SafeNativeMethods.Gdip.StatusException(status); 265int status = SafeNativeMethods.Gdip.GdipSetPenWidth(new HandleRef(this, this.NativePen), value); 267if (status != SafeNativeMethods.Gdip.Ok) 268throw SafeNativeMethods.Gdip.StatusException(status); 285int status = SafeNativeMethods.Gdip.GdipSetPenLineCap197819(new HandleRef(this, this.NativePen), 288if (status != SafeNativeMethods.Gdip.Ok) 289throw SafeNativeMethods.Gdip.StatusException(status); 303int status = SafeNativeMethods.Gdip.GdipGetPenStartCap(new HandleRef(this, this.NativePen), out startCap); 305if (status != SafeNativeMethods.Gdip.Ok) 306throw SafeNativeMethods.Gdip.StatusException(status); 331int status = SafeNativeMethods.Gdip.GdipSetPenStartCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 333if (status != SafeNativeMethods.Gdip.Ok) 334throw SafeNativeMethods.Gdip.StatusException(status); 349int status = SafeNativeMethods.Gdip.GdipGetPenEndCap(new HandleRef(this, this.NativePen), out endCap); 351if (status != SafeNativeMethods.Gdip.Ok) 352throw SafeNativeMethods.Gdip.StatusException(status); 378int status = SafeNativeMethods.Gdip.GdipSetPenEndCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 380if (status != SafeNativeMethods.Gdip.Ok) 381throw SafeNativeMethods.Gdip.StatusException(status); 394int status = SafeNativeMethods.Gdip.GdipGetPenDashCap197819(new HandleRef(this, this.NativePen), out dashCap); 396if (status != SafeNativeMethods.Gdip.Ok) 397throw SafeNativeMethods.Gdip.StatusException(status); 415int status = SafeNativeMethods.Gdip.GdipSetPenDashCap197819(new HandleRef(this, this.NativePen), unchecked((int)value)); 417if (status != SafeNativeMethods.Gdip.Ok) 418throw SafeNativeMethods.Gdip.StatusException(status); 434int status = SafeNativeMethods.Gdip.GdipGetPenLineJoin(new HandleRef(this, this.NativePen), out lineJoin); 436if (status != SafeNativeMethods.Gdip.Ok) 437throw SafeNativeMethods.Gdip.StatusException(status); 452int status = SafeNativeMethods.Gdip.GdipSetPenLineJoin(new HandleRef(this, this.NativePen), unchecked((int)value)); 454if (status != SafeNativeMethods.Gdip.Ok) 455throw SafeNativeMethods.Gdip.StatusException(status); 473int status = SafeNativeMethods.Gdip.GdipGetPenCustomStartCap(new HandleRef(this, this.NativePen), out lineCap); 475if (status != SafeNativeMethods.Gdip.Ok) 476throw SafeNativeMethods.Gdip.StatusException(status); 485int status = SafeNativeMethods.Gdip.GdipSetPenCustomStartCap(new HandleRef(this, this.NativePen), 488if (status != SafeNativeMethods.Gdip.Ok) 489throw SafeNativeMethods.Gdip.StatusException(status); 507int status = SafeNativeMethods.Gdip.GdipGetPenCustomEndCap(new HandleRef(this, this.NativePen), out lineCap); 509if (status != SafeNativeMethods.Gdip.Ok) 510throw SafeNativeMethods.Gdip.StatusException(status); 519int status = SafeNativeMethods.Gdip.GdipSetPenCustomEndCap(new HandleRef(this, this.NativePen), 522if (status != SafeNativeMethods.Gdip.Ok) 523throw SafeNativeMethods.Gdip.StatusException(status); 536int status = SafeNativeMethods.Gdip.GdipGetPenMiterLimit(new HandleRef(this, this.NativePen), miterLimit); 538if (status != SafeNativeMethods.Gdip.Ok) 539throw SafeNativeMethods.Gdip.StatusException(status); 548int status = SafeNativeMethods.Gdip.GdipSetPenMiterLimit(new HandleRef(this, this.NativePen), value); 550if (status != SafeNativeMethods.Gdip.Ok) 551throw SafeNativeMethods.Gdip.StatusException(status); 570int status = SafeNativeMethods.Gdip.GdipGetPenMode(new HandleRef(this, this.NativePen), out penMode); 572if (status != SafeNativeMethods.Gdip.Ok) 573throw SafeNativeMethods.Gdip.StatusException(status); 588int status = SafeNativeMethods.Gdip.GdipSetPenMode(new HandleRef(this, this.NativePen), value); 590if (status != SafeNativeMethods.Gdip.Ok) 591throw SafeNativeMethods.Gdip.StatusException(status); 610int status = SafeNativeMethods.Gdip.GdipGetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(matrix, matrix.nativeMatrix)); 612if (status != SafeNativeMethods.Gdip.Ok) 613throw SafeNativeMethods.Gdip.StatusException(status); 626int status = SafeNativeMethods.Gdip.GdipSetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(value, value.nativeMatrix)); 628if (status != SafeNativeMethods.Gdip.Ok) 629throw SafeNativeMethods.Gdip.StatusException(status); 640int status = SafeNativeMethods.Gdip.GdipResetPenTransform(new HandleRef(this, this.NativePen)); 642if (status != SafeNativeMethods.Gdip.Ok) 643throw SafeNativeMethods.Gdip.StatusException(status); 667int status = SafeNativeMethods.Gdip.GdipMultiplyPenTransform(new HandleRef(this, this.NativePen), 671if (status != SafeNativeMethods.Gdip.Ok) 672throw SafeNativeMethods.Gdip.StatusException(status); 693int status = SafeNativeMethods.Gdip.GdipTranslatePenTransform(new HandleRef(this, this.NativePen), 696if (status != SafeNativeMethods.Gdip.Ok) 697throw SafeNativeMethods.Gdip.StatusException(status); 717int status = SafeNativeMethods.Gdip.GdipScalePenTransform(new HandleRef(this, this.NativePen), 720if (status != SafeNativeMethods.Gdip.Ok) 721throw SafeNativeMethods.Gdip.StatusException(status); 741int status = SafeNativeMethods.Gdip.GdipRotatePenTransform(new HandleRef(this, this.NativePen), 744if (status != SafeNativeMethods.Gdip.Ok) 745throw SafeNativeMethods.Gdip.StatusException(status); 756int status = SafeNativeMethods.Gdip.GdipSetPenColor(new HandleRef(this, this.NativePen), 758if (status != SafeNativeMethods.Gdip.Ok) 759throw SafeNativeMethods.Gdip.StatusException(status); 774int status = SafeNativeMethods.Gdip.GdipGetPenFillType(new HandleRef(this, this.NativePen), out type); 776if (status != SafeNativeMethods.Gdip.Ok) 777throw SafeNativeMethods.Gdip.StatusException(status); 793int status = SafeNativeMethods.Gdip.GdipGetPenColor(new HandleRef(this, this.NativePen), out colorARGB); 795if (status != SafeNativeMethods.Gdip.Ok) 796throw SafeNativeMethods.Gdip.StatusException(status); 867int status = SafeNativeMethods.Gdip.GdipSetPenBrushFill(new HandleRef(this, this.NativePen), 870if (status != SafeNativeMethods.Gdip.Ok) 871throw SafeNativeMethods.Gdip.StatusException(status); 879int status = SafeNativeMethods.Gdip.GdipGetPenBrushFill(new HandleRef(this, this.NativePen), out nativeBrush); 881if (status != SafeNativeMethods.Gdip.Ok) 882throw SafeNativeMethods.Gdip.StatusException(status); 900int status = SafeNativeMethods.Gdip.GdipGetPenDashStyle(new HandleRef(this, this.NativePen), out dashstyle); 902if (status != SafeNativeMethods.Gdip.Ok) 903throw SafeNativeMethods.Gdip.StatusException(status); 919int status = SafeNativeMethods.Gdip.GdipSetPenDashStyle(new HandleRef(this, this.NativePen), unchecked((int)value)); 921if (status != SafeNativeMethods.Gdip.Ok) { 922throw SafeNativeMethods.Gdip.StatusException(status); 941int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 943if (status != SafeNativeMethods.Gdip.Ok) 944throw SafeNativeMethods.Gdip.StatusException(status); 962int status = SafeNativeMethods.Gdip.GdipGetPenDashOffset(new HandleRef(this, this.NativePen), dashoffset); 964if (status != SafeNativeMethods.Gdip.Ok) 965throw SafeNativeMethods.Gdip.StatusException(status); 973int status = SafeNativeMethods.Gdip.GdipSetPenDashOffset(new HandleRef(this, this.NativePen), value); 975if (status != SafeNativeMethods.Gdip.Ok) 976throw SafeNativeMethods.Gdip.StatusException(status); 995int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 997if (status != SafeNativeMethods.Gdip.Ok) 998throw SafeNativeMethods.Gdip.StatusException(status); 1006status = SafeNativeMethods.Gdip.GdipGetPenDashArray(new HandleRef(this, this.NativePen), buf, count); 1009if (status != SafeNativeMethods.Gdip.Ok) { 1010throw SafeNativeMethods.Gdip.StatusException(status); 1041int status = SafeNativeMethods.Gdip.GdipSetPenDashArray(new HandleRef(this, this.NativePen), new HandleRef(buf, buf), count); 1043if (status != SafeNativeMethods.Gdip.Ok){ 1044throw SafeNativeMethods.Gdip.StatusException(status); 1063int status = SafeNativeMethods.Gdip.GdipGetPenCompoundCount(new HandleRef(this, this.NativePen), out count); 1065if (status != SafeNativeMethods.Gdip.Ok) 1066throw SafeNativeMethods.Gdip.StatusException(status); 1070status = SafeNativeMethods.Gdip.GdipGetPenCompoundArray(new HandleRef(this, this.NativePen), array, count); 1071if (status != SafeNativeMethods.Gdip.Ok) 1072throw SafeNativeMethods.Gdip.StatusException(status); 1080int status = SafeNativeMethods.Gdip.GdipSetPenCompoundArray(new HandleRef(this, this.NativePen), value, value.Length); 1082if (status != SafeNativeMethods.Gdip.Ok) 1083throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\Pens.cs (282)
176Pen transparent = (Pen)SafeNativeMethods.Gdip.ThreadData[TransparentKey]; 179SafeNativeMethods.Gdip.ThreadData[TransparentKey] = transparent; 193Pen aliceBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[AliceBlueKey]; 196SafeNativeMethods.Gdip.ThreadData[AliceBlueKey] = aliceBlue; 210Pen antiqueWhite = (Pen)SafeNativeMethods.Gdip.ThreadData[AntiqueWhiteKey]; 213SafeNativeMethods.Gdip.ThreadData[AntiqueWhiteKey] = antiqueWhite; 227Pen aqua = (Pen)SafeNativeMethods.Gdip.ThreadData[AquaKey]; 230SafeNativeMethods.Gdip.ThreadData[AquaKey] = aqua; 244Pen aquamarine = (Pen)SafeNativeMethods.Gdip.ThreadData[AquamarineKey]; 247SafeNativeMethods.Gdip.ThreadData[AquamarineKey] = aquamarine; 261Pen azure = (Pen)SafeNativeMethods.Gdip.ThreadData[AzureKey]; 264SafeNativeMethods.Gdip.ThreadData[AzureKey] = azure; 278Pen beige = (Pen)SafeNativeMethods.Gdip.ThreadData[BeigeKey]; 281SafeNativeMethods.Gdip.ThreadData[BeigeKey] = beige; 295Pen bisque = (Pen)SafeNativeMethods.Gdip.ThreadData[BisqueKey]; 298SafeNativeMethods.Gdip.ThreadData[BisqueKey] = bisque; 312Pen black = (Pen)SafeNativeMethods.Gdip.ThreadData[BlackKey]; 315SafeNativeMethods.Gdip.ThreadData[BlackKey] = black; 329Pen blanchedAlmond = (Pen)SafeNativeMethods.Gdip.ThreadData[BlanchedAlmondKey]; 332SafeNativeMethods.Gdip.ThreadData[BlanchedAlmondKey] = blanchedAlmond; 346Pen blue = (Pen)SafeNativeMethods.Gdip.ThreadData[BlueKey]; 349SafeNativeMethods.Gdip.ThreadData[BlueKey] = blue; 363Pen blueViolet = (Pen)SafeNativeMethods.Gdip.ThreadData[BlueVioletKey]; 366SafeNativeMethods.Gdip.ThreadData[BlueVioletKey] = blueViolet; 380Pen brown = (Pen)SafeNativeMethods.Gdip.ThreadData[BrownKey]; 383SafeNativeMethods.Gdip.ThreadData[BrownKey] = brown; 397Pen burlyWood = (Pen)SafeNativeMethods.Gdip.ThreadData[BurlyWoodKey]; 400SafeNativeMethods.Gdip.ThreadData[BurlyWoodKey] = burlyWood; 414Pen cadetBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[CadetBlueKey]; 417SafeNativeMethods.Gdip.ThreadData[CadetBlueKey] = cadetBlue; 431Pen chartreuse = (Pen)SafeNativeMethods.Gdip.ThreadData[ChartreuseKey]; 434SafeNativeMethods.Gdip.ThreadData[ChartreuseKey] = chartreuse; 448Pen chocolate = (Pen)SafeNativeMethods.Gdip.ThreadData[ChocolateKey]; 451SafeNativeMethods.Gdip.ThreadData[ChocolateKey] = chocolate; 465Pen choral = (Pen)SafeNativeMethods.Gdip.ThreadData[ChoralKey]; 468SafeNativeMethods.Gdip.ThreadData[ChoralKey] = choral; 482Pen cornflowerBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[CornflowerBlueKey]; 485SafeNativeMethods.Gdip.ThreadData[CornflowerBlueKey] = cornflowerBlue; 499Pen cornsilk = (Pen)SafeNativeMethods.Gdip.ThreadData[CornsilkKey]; 502SafeNativeMethods.Gdip.ThreadData[CornsilkKey] = cornsilk; 516Pen crimson = (Pen)SafeNativeMethods.Gdip.ThreadData[CrimsonKey]; 519SafeNativeMethods.Gdip.ThreadData[CrimsonKey] = crimson; 533Pen cyan = (Pen)SafeNativeMethods.Gdip.ThreadData[CyanKey]; 536SafeNativeMethods.Gdip.ThreadData[CyanKey] = cyan; 550Pen darkBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkBlueKey]; 553SafeNativeMethods.Gdip.ThreadData[DarkBlueKey] = darkBlue; 567Pen darkCyan = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkCyanKey]; 570SafeNativeMethods.Gdip.ThreadData[DarkCyanKey] = darkCyan; 584Pen darkGoldenrod = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkGoldenrodKey]; 587SafeNativeMethods.Gdip.ThreadData[DarkGoldenrodKey] = darkGoldenrod; 601Pen darkGray = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkGrayKey]; 604SafeNativeMethods.Gdip.ThreadData[DarkGrayKey] = darkGray; 618Pen darkGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkGreenKey]; 621SafeNativeMethods.Gdip.ThreadData[DarkGreenKey] = darkGreen; 635Pen darkKhaki = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkKhakiKey]; 638SafeNativeMethods.Gdip.ThreadData[DarkKhakiKey] = darkKhaki; 652Pen darkMagenta = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkMagentaKey]; 655SafeNativeMethods.Gdip.ThreadData[DarkMagentaKey] = darkMagenta; 669Pen darkOliveGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkOliveGreenKey]; 672SafeNativeMethods.Gdip.ThreadData[DarkOliveGreenKey] = darkOliveGreen; 686Pen darkOrange = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkOrangeKey]; 689SafeNativeMethods.Gdip.ThreadData[DarkOrangeKey] = darkOrange; 703Pen darkOrchid = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkOrchidKey]; 706SafeNativeMethods.Gdip.ThreadData[DarkOrchidKey] = darkOrchid; 720Pen darkRed = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkRedKey]; 723SafeNativeMethods.Gdip.ThreadData[DarkRedKey] = darkRed; 737Pen darkSalmon = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkSalmonKey]; 740SafeNativeMethods.Gdip.ThreadData[DarkSalmonKey] = darkSalmon; 754Pen darkSeaGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkSeaGreenKey]; 757SafeNativeMethods.Gdip.ThreadData[DarkSeaGreenKey] = darkSeaGreen; 771Pen darkSlateBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkSlateBlueKey]; 774SafeNativeMethods.Gdip.ThreadData[DarkSlateBlueKey] = darkSlateBlue; 788Pen darkSlateGray = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkSlateGrayKey]; 791SafeNativeMethods.Gdip.ThreadData[DarkSlateGrayKey] = darkSlateGray; 805Pen darkTurquoise = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkTurquoiseKey]; 808SafeNativeMethods.Gdip.ThreadData[DarkTurquoiseKey] = darkTurquoise; 822Pen darkViolet = (Pen)SafeNativeMethods.Gdip.ThreadData[DarkVioletKey]; 825SafeNativeMethods.Gdip.ThreadData[DarkVioletKey] = darkViolet; 839Pen deepPink = (Pen)SafeNativeMethods.Gdip.ThreadData[DeepPinkKey]; 842SafeNativeMethods.Gdip.ThreadData[DeepPinkKey] = deepPink; 856Pen deepSkyBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[DeepSkyBlueKey]; 859SafeNativeMethods.Gdip.ThreadData[DeepSkyBlueKey] = deepSkyBlue; 873Pen dimGray = (Pen)SafeNativeMethods.Gdip.ThreadData[DimGrayKey]; 876SafeNativeMethods.Gdip.ThreadData[DimGrayKey] = dimGray; 890Pen dodgerBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[DodgerBlueKey]; 893SafeNativeMethods.Gdip.ThreadData[DodgerBlueKey] = dodgerBlue; 907Pen firebrick = (Pen)SafeNativeMethods.Gdip.ThreadData[FirebrickKey]; 910SafeNativeMethods.Gdip.ThreadData[FirebrickKey] = firebrick; 924Pen floralWhite = (Pen)SafeNativeMethods.Gdip.ThreadData[FloralWhiteKey]; 927SafeNativeMethods.Gdip.ThreadData[FloralWhiteKey] = floralWhite; 941Pen forestGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[ForestGreenKey]; 944SafeNativeMethods.Gdip.ThreadData[ForestGreenKey] = forestGreen; 958Pen fuchia = (Pen)SafeNativeMethods.Gdip.ThreadData[FuchiaKey]; 961SafeNativeMethods.Gdip.ThreadData[FuchiaKey] = fuchia; 975Pen gainsboro = (Pen)SafeNativeMethods.Gdip.ThreadData[GainsboroKey]; 978SafeNativeMethods.Gdip.ThreadData[GainsboroKey] = gainsboro; 992Pen ghostWhite = (Pen)SafeNativeMethods.Gdip.ThreadData[GhostWhiteKey]; 995SafeNativeMethods.Gdip.ThreadData[GhostWhiteKey] = ghostWhite; 1009Pen gold = (Pen)SafeNativeMethods.Gdip.ThreadData[GoldKey]; 1012SafeNativeMethods.Gdip.ThreadData[GoldKey] = gold; 1026Pen goldenrod = (Pen)SafeNativeMethods.Gdip.ThreadData[GoldenrodKey]; 1029SafeNativeMethods.Gdip.ThreadData[GoldenrodKey] = goldenrod; 1043Pen gray = (Pen)SafeNativeMethods.Gdip.ThreadData[GrayKey]; 1046SafeNativeMethods.Gdip.ThreadData[GrayKey] = gray; 1060Pen green = (Pen)SafeNativeMethods.Gdip.ThreadData[GreenKey]; 1063SafeNativeMethods.Gdip.ThreadData[GreenKey] = green; 1077Pen greenYellow = (Pen)SafeNativeMethods.Gdip.ThreadData[GreenYellowKey]; 1080SafeNativeMethods.Gdip.ThreadData[GreenYellowKey] = greenYellow; 1094Pen honeydew = (Pen)SafeNativeMethods.Gdip.ThreadData[HoneydewKey]; 1097SafeNativeMethods.Gdip.ThreadData[HoneydewKey] = honeydew; 1111Pen hotPink = (Pen)SafeNativeMethods.Gdip.ThreadData[HotPinkKey]; 1114SafeNativeMethods.Gdip.ThreadData[HotPinkKey] = hotPink; 1128Pen indianRed = (Pen)SafeNativeMethods.Gdip.ThreadData[IndianRedKey]; 1131SafeNativeMethods.Gdip.ThreadData[IndianRedKey] = indianRed; 1145Pen indigo = (Pen)SafeNativeMethods.Gdip.ThreadData[IndigoKey]; 1148SafeNativeMethods.Gdip.ThreadData[IndigoKey] = indigo; 1162Pen ivory = (Pen)SafeNativeMethods.Gdip.ThreadData[IvoryKey]; 1165SafeNativeMethods.Gdip.ThreadData[IvoryKey] = ivory; 1179Pen khaki = (Pen)SafeNativeMethods.Gdip.ThreadData[KhakiKey]; 1182SafeNativeMethods.Gdip.ThreadData[KhakiKey] = khaki; 1196Pen lavender = (Pen)SafeNativeMethods.Gdip.ThreadData[LavenderKey]; 1199SafeNativeMethods.Gdip.ThreadData[LavenderKey] = lavender; 1213Pen lavenderBlush = (Pen)SafeNativeMethods.Gdip.ThreadData[LavenderBlushKey]; 1216SafeNativeMethods.Gdip.ThreadData[LavenderBlushKey] = lavenderBlush; 1230Pen lawnGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[LawnGreenKey]; 1233SafeNativeMethods.Gdip.ThreadData[LawnGreenKey] = lawnGreen; 1247Pen lemonChiffon = (Pen)SafeNativeMethods.Gdip.ThreadData[LemonChiffonKey]; 1250SafeNativeMethods.Gdip.ThreadData[LemonChiffonKey] = lemonChiffon; 1264Pen lightBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[LightBlueKey]; 1267SafeNativeMethods.Gdip.ThreadData[LightBlueKey] = lightBlue; 1281Pen lightCoral = (Pen)SafeNativeMethods.Gdip.ThreadData[LightCoralKey]; 1284SafeNativeMethods.Gdip.ThreadData[LightCoralKey] = lightCoral; 1298Pen lightCyan = (Pen)SafeNativeMethods.Gdip.ThreadData[LightCyanKey]; 1301SafeNativeMethods.Gdip.ThreadData[LightCyanKey] = lightCyan; 1315Pen lightGoldenrodYellow = (Pen)SafeNativeMethods.Gdip.ThreadData[LightGoldenrodYellowKey]; 1318SafeNativeMethods.Gdip.ThreadData[LightGoldenrodYellowKey] = lightGoldenrodYellow; 1332Pen lightGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[LightGreenKey]; 1335SafeNativeMethods.Gdip.ThreadData[LightGreenKey] = lightGreen; 1349Pen lightGray = (Pen)SafeNativeMethods.Gdip.ThreadData[LightGrayKey]; 1352SafeNativeMethods.Gdip.ThreadData[LightGrayKey] = lightGray; 1366Pen lightPink = (Pen)SafeNativeMethods.Gdip.ThreadData[LightPinkKey]; 1369SafeNativeMethods.Gdip.ThreadData[LightPinkKey] = lightPink; 1383Pen lightSalmon = (Pen)SafeNativeMethods.Gdip.ThreadData[LightSalmonKey]; 1386SafeNativeMethods.Gdip.ThreadData[LightSalmonKey] = lightSalmon; 1400Pen lightSeaGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[LightSeaGreenKey]; 1403SafeNativeMethods.Gdip.ThreadData[LightSeaGreenKey] = lightSeaGreen; 1417Pen lightSkyBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[LightSkyBlueKey]; 1420SafeNativeMethods.Gdip.ThreadData[LightSkyBlueKey] = lightSkyBlue; 1434Pen lightSlateGray = (Pen)SafeNativeMethods.Gdip.ThreadData[LightSlateGrayKey]; 1437SafeNativeMethods.Gdip.ThreadData[LightSlateGrayKey] = lightSlateGray; 1451Pen lightSteelBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[LightSteelBlueKey]; 1454SafeNativeMethods.Gdip.ThreadData[LightSteelBlueKey] = lightSteelBlue; 1468Pen lightYellow = (Pen)SafeNativeMethods.Gdip.ThreadData[LightYellowKey]; 1471SafeNativeMethods.Gdip.ThreadData[LightYellowKey] = lightYellow; 1485Pen lime = (Pen)SafeNativeMethods.Gdip.ThreadData[LimeKey]; 1488SafeNativeMethods.Gdip.ThreadData[LimeKey] = lime; 1502Pen limeGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[LimeGreenKey]; 1505SafeNativeMethods.Gdip.ThreadData[LimeGreenKey] = limeGreen; 1519Pen linen = (Pen)SafeNativeMethods.Gdip.ThreadData[LinenKey]; 1522SafeNativeMethods.Gdip.ThreadData[LinenKey] = linen; 1536Pen magenta = (Pen)SafeNativeMethods.Gdip.ThreadData[MagentaKey]; 1539SafeNativeMethods.Gdip.ThreadData[MagentaKey] = magenta; 1553Pen maroon = (Pen)SafeNativeMethods.Gdip.ThreadData[MaroonKey]; 1556SafeNativeMethods.Gdip.ThreadData[MaroonKey] = maroon; 1570Pen mediumAquamarine = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumAquamarineKey]; 1573SafeNativeMethods.Gdip.ThreadData[MediumAquamarineKey] = mediumAquamarine; 1587Pen mediumBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumBlueKey]; 1590SafeNativeMethods.Gdip.ThreadData[MediumBlueKey] = mediumBlue; 1604Pen mediumOrchid = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumOrchidKey]; 1607SafeNativeMethods.Gdip.ThreadData[MediumOrchidKey] = mediumOrchid; 1621Pen mediumPurple = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumPurpleKey]; 1624SafeNativeMethods.Gdip.ThreadData[MediumPurpleKey] = mediumPurple; 1638Pen mediumSeaGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumSeaGreenKey]; 1641SafeNativeMethods.Gdip.ThreadData[MediumSeaGreenKey] = mediumSeaGreen; 1655Pen mediumSlateBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumSlateBlueKey]; 1658SafeNativeMethods.Gdip.ThreadData[MediumSlateBlueKey] = mediumSlateBlue; 1672Pen mediumSpringGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumSpringGreenKey]; 1675SafeNativeMethods.Gdip.ThreadData[MediumSpringGreenKey] = mediumSpringGreen; 1689Pen mediumTurquoise = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumTurquoiseKey]; 1692SafeNativeMethods.Gdip.ThreadData[MediumTurquoiseKey] = mediumTurquoise; 1706Pen mediumVioletRed = (Pen)SafeNativeMethods.Gdip.ThreadData[MediumVioletRedKey]; 1709SafeNativeMethods.Gdip.ThreadData[MediumVioletRedKey] = mediumVioletRed; 1723Pen midnightBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[MidnightBlueKey]; 1726SafeNativeMethods.Gdip.ThreadData[MidnightBlueKey] = midnightBlue; 1740Pen mintCream = (Pen)SafeNativeMethods.Gdip.ThreadData[MintCreamKey]; 1743SafeNativeMethods.Gdip.ThreadData[MintCreamKey] = mintCream; 1757Pen mistyRose = (Pen)SafeNativeMethods.Gdip.ThreadData[MistyRoseKey]; 1760SafeNativeMethods.Gdip.ThreadData[MistyRoseKey] = mistyRose; 1774Pen moccasin = (Pen)SafeNativeMethods.Gdip.ThreadData[MoccasinKey]; 1777SafeNativeMethods.Gdip.ThreadData[MoccasinKey] = moccasin; 1791Pen navajoWhite = (Pen)SafeNativeMethods.Gdip.ThreadData[NavajoWhiteKey]; 1794SafeNativeMethods.Gdip.ThreadData[NavajoWhiteKey] = navajoWhite; 1808Pen navy = (Pen)SafeNativeMethods.Gdip.ThreadData[NavyKey]; 1811SafeNativeMethods.Gdip.ThreadData[NavyKey] = navy; 1825Pen oldLace = (Pen)SafeNativeMethods.Gdip.ThreadData[OldLaceKey]; 1828SafeNativeMethods.Gdip.ThreadData[OldLaceKey] = oldLace; 1842Pen olive = (Pen)SafeNativeMethods.Gdip.ThreadData[OliveKey]; 1845SafeNativeMethods.Gdip.ThreadData[OliveKey] = olive; 1859Pen oliveDrab = (Pen)SafeNativeMethods.Gdip.ThreadData[OliveDrabKey]; 1862SafeNativeMethods.Gdip.ThreadData[OliveDrabKey] = oliveDrab; 1876Pen orange = (Pen)SafeNativeMethods.Gdip.ThreadData[OrangeKey]; 1879SafeNativeMethods.Gdip.ThreadData[OrangeKey] = orange; 1893Pen orangeRed = (Pen)SafeNativeMethods.Gdip.ThreadData[OrangeRedKey]; 1896SafeNativeMethods.Gdip.ThreadData[OrangeRedKey] = orangeRed; 1910Pen orchid = (Pen)SafeNativeMethods.Gdip.ThreadData[OrchidKey]; 1913SafeNativeMethods.Gdip.ThreadData[OrchidKey] = orchid; 1927Pen paleGoldenrod = (Pen)SafeNativeMethods.Gdip.ThreadData[PaleGoldenrodKey]; 1930SafeNativeMethods.Gdip.ThreadData[PaleGoldenrodKey] = paleGoldenrod; 1944Pen paleGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[PaleGreenKey]; 1947SafeNativeMethods.Gdip.ThreadData[PaleGreenKey] = paleGreen; 1961Pen paleTurquoise = (Pen)SafeNativeMethods.Gdip.ThreadData[PaleTurquoiseKey]; 1964SafeNativeMethods.Gdip.ThreadData[PaleTurquoiseKey] = paleTurquoise; 1978Pen paleVioletRed = (Pen)SafeNativeMethods.Gdip.ThreadData[PaleVioletRedKey]; 1981SafeNativeMethods.Gdip.ThreadData[PaleVioletRedKey] = paleVioletRed; 1995Pen papayaWhip = (Pen)SafeNativeMethods.Gdip.ThreadData[PapayaWhipKey]; 1998SafeNativeMethods.Gdip.ThreadData[PapayaWhipKey] = papayaWhip; 2012Pen peachPuff = (Pen)SafeNativeMethods.Gdip.ThreadData[PeachPuffKey]; 2015SafeNativeMethods.Gdip.ThreadData[PeachPuffKey] = peachPuff; 2029Pen peru = (Pen)SafeNativeMethods.Gdip.ThreadData[PeruKey]; 2032SafeNativeMethods.Gdip.ThreadData[PeruKey] = peru; 2046Pen pink = (Pen)SafeNativeMethods.Gdip.ThreadData[PinkKey]; 2049SafeNativeMethods.Gdip.ThreadData[PinkKey] = pink; 2063Pen plum = (Pen)SafeNativeMethods.Gdip.ThreadData[PlumKey]; 2066SafeNativeMethods.Gdip.ThreadData[PlumKey] = plum; 2080Pen powderBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[PowderBlueKey]; 2083SafeNativeMethods.Gdip.ThreadData[PowderBlueKey] = powderBlue; 2097Pen purple = (Pen)SafeNativeMethods.Gdip.ThreadData[PurpleKey]; 2100SafeNativeMethods.Gdip.ThreadData[PurpleKey] = purple; 2114Pen red = (Pen)SafeNativeMethods.Gdip.ThreadData[RedKey]; 2117SafeNativeMethods.Gdip.ThreadData[RedKey] = red; 2131Pen rosyBrown = (Pen)SafeNativeMethods.Gdip.ThreadData[RosyBrownKey]; 2134SafeNativeMethods.Gdip.ThreadData[RosyBrownKey] = rosyBrown; 2148Pen royalBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[RoyalBlueKey]; 2151SafeNativeMethods.Gdip.ThreadData[RoyalBlueKey] = royalBlue; 2165Pen saddleBrown = (Pen)SafeNativeMethods.Gdip.ThreadData[SaddleBrownKey]; 2168SafeNativeMethods.Gdip.ThreadData[SaddleBrownKey] = saddleBrown; 2182Pen salmon = (Pen)SafeNativeMethods.Gdip.ThreadData[SalmonKey]; 2185SafeNativeMethods.Gdip.ThreadData[SalmonKey] = salmon; 2199Pen sandyBrown = (Pen)SafeNativeMethods.Gdip.ThreadData[SandyBrownKey]; 2202SafeNativeMethods.Gdip.ThreadData[SandyBrownKey] = sandyBrown; 2216Pen seaGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[SeaGreenKey]; 2219SafeNativeMethods.Gdip.ThreadData[SeaGreenKey] = seaGreen; 2233Pen seaShell = (Pen)SafeNativeMethods.Gdip.ThreadData[SeaShellKey]; 2236SafeNativeMethods.Gdip.ThreadData[SeaShellKey] = seaShell; 2250Pen sienna = (Pen)SafeNativeMethods.Gdip.ThreadData[SiennaKey]; 2253SafeNativeMethods.Gdip.ThreadData[SiennaKey] = sienna; 2267Pen silver = (Pen)SafeNativeMethods.Gdip.ThreadData[SilverKey]; 2270SafeNativeMethods.Gdip.ThreadData[SilverKey] = silver; 2284Pen skyBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[SkyBlueKey]; 2287SafeNativeMethods.Gdip.ThreadData[SkyBlueKey] = skyBlue; 2301Pen slateBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[SlateBlueKey]; 2304SafeNativeMethods.Gdip.ThreadData[SlateBlueKey] = slateBlue; 2318Pen slateGray = (Pen)SafeNativeMethods.Gdip.ThreadData[SlateGrayKey]; 2321SafeNativeMethods.Gdip.ThreadData[SlateGrayKey] = slateGray; 2335Pen snow = (Pen)SafeNativeMethods.Gdip.ThreadData[SnowKey]; 2338SafeNativeMethods.Gdip.ThreadData[SnowKey] = snow; 2352Pen springGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[SpringGreenKey]; 2355SafeNativeMethods.Gdip.ThreadData[SpringGreenKey] = springGreen; 2369Pen steelBlue = (Pen)SafeNativeMethods.Gdip.ThreadData[SteelBlueKey]; 2372SafeNativeMethods.Gdip.ThreadData[SteelBlueKey] = steelBlue; 2386Pen tan = (Pen)SafeNativeMethods.Gdip.ThreadData[TanKey]; 2389SafeNativeMethods.Gdip.ThreadData[TanKey] = tan; 2403Pen teal = (Pen)SafeNativeMethods.Gdip.ThreadData[TealKey]; 2406SafeNativeMethods.Gdip.ThreadData[TealKey] = teal; 2420Pen thistle = (Pen)SafeNativeMethods.Gdip.ThreadData[ThistleKey]; 2423SafeNativeMethods.Gdip.ThreadData[ThistleKey] = thistle; 2437Pen tomato = (Pen)SafeNativeMethods.Gdip.ThreadData[TomatoKey]; 2440SafeNativeMethods.Gdip.ThreadData[TomatoKey] = tomato; 2454Pen turquoise = (Pen)SafeNativeMethods.Gdip.ThreadData[TurquoiseKey]; 2457SafeNativeMethods.Gdip.ThreadData[TurquoiseKey] = turquoise; 2471Pen violet = (Pen)SafeNativeMethods.Gdip.ThreadData[VioletKey]; 2474SafeNativeMethods.Gdip.ThreadData[VioletKey] = violet; 2488Pen wheat = (Pen)SafeNativeMethods.Gdip.ThreadData[WheatKey]; 2491SafeNativeMethods.Gdip.ThreadData[WheatKey] = wheat; 2505Pen white = (Pen)SafeNativeMethods.Gdip.ThreadData[WhiteKey]; 2508SafeNativeMethods.Gdip.ThreadData[WhiteKey] = white; 2522Pen whiteSmoke = (Pen)SafeNativeMethods.Gdip.ThreadData[WhiteSmokeKey]; 2525SafeNativeMethods.Gdip.ThreadData[WhiteSmokeKey] = whiteSmoke; 2539Pen yellow = (Pen)SafeNativeMethods.Gdip.ThreadData[YellowKey]; 2542SafeNativeMethods.Gdip.ThreadData[YellowKey] = yellow; 2556Pen yellowGreen = (Pen)SafeNativeMethods.Gdip.ThreadData[YellowGreenKey]; 2559SafeNativeMethods.Gdip.ThreadData[YellowGreenKey] = yellowGreen;
commonui\System\Drawing\Printing\DefaultPrintController.cs (15)
61SafeNativeMethods.DOCINFO info = new SafeNativeMethods.DOCINFO(); 70int result = SafeNativeMethods.StartDoc(new HandleRef(this.dc, dc.Hdc), info); 73if (error == SafeNativeMethods.ERROR_CANCELLED) { 102IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 104IntPtr result = SafeNativeMethods.ResetDC(new HandleRef(this.dc, dc.Hdc), new HandleRef(null, modePointer)); 108SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 125int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 126int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 127int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 128int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 137int result2 = SafeNativeMethods.StartPage(new HandleRef(this.dc, dc.Hdc)); 160int result = SafeNativeMethods.EndPage(new HandleRef(this.dc, dc.Hdc)); 191int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new HandleRef(dc, dc.Hdc)) : SafeNativeMethods.EndDoc(new HandleRef(dc, dc.Hdc));
commonui\System\Drawing\Printing\Duplex.cs (3)
38Simplex = SafeNativeMethods.DMDUP_SIMPLEX, 47Horizontal = SafeNativeMethods.DMDUP_HORIZONTAL, 56Vertical = SafeNativeMethods.DMDUP_VERTICAL,
commonui\System\Drawing\Printing\PageSettings.cs (102)
73SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 87return printerSettings.GetModeField(ModeField.Color, SafeNativeMethods.DMCOLOR_MONOCHROME) == SafeNativeMethods.DMCOLOR_COLOR; 113int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 114int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 143int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 144int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 163return printerSettings.GetModeField(ModeField.Orientation, SafeNativeMethods.DMORIENT_PORTRAIT) == SafeNativeMethods.DMORIENT_LANDSCAPE; 211IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 212SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 216SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 217SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 242int dpiX = UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.LOGPIXELSX); 243int dpiY = UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.LOGPIXELSY); 247printableArea.X = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETX) * 100 / dpiX; 248printableArea.Y = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETY) * 100 / dpiY; 249printableArea.Width = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.HORZRES) * 100 / dpiX; 250printableArea.Height = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.VERTRES) * 100 / dpiY; 255printableArea.Y = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETX) * 100 / dpiX; 256printableArea.X = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETY) * 100 / dpiY; 257printableArea.Height = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.HORZRES) * 100 / dpiX; 258printableArea.Width = (float)UnsafeNativeMethods.GetDeviceCaps(hdc, SafeNativeMethods.VERTRES) * 100 / dpiY; 283IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 284SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 288SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 289SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 338IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 339SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 341if (color.IsNotDefault && ((mode.dmFields & SafeNativeMethods.DM_COLOR) == SafeNativeMethods.DM_COLOR)) 342mode.dmColor = unchecked((short) (((bool) color) ? SafeNativeMethods.DMCOLOR_COLOR : SafeNativeMethods.DMCOLOR_MONOCHROME)); 343if (landscape.IsNotDefault && ((mode.dmFields & SafeNativeMethods.DM_ORIENTATION) == SafeNativeMethods.DM_ORIENTATION)) 344mode.dmOrientation = unchecked((short) (((bool) landscape) ? SafeNativeMethods.DMORIENT_LANDSCAPE : SafeNativeMethods.DMORIENT_PORTRAIT)); 348if ((mode.dmFields & SafeNativeMethods.DM_PAPERSIZE) == SafeNativeMethods.DM_PAPERSIZE) 356if ((mode.dmFields & SafeNativeMethods.DM_PAPERLENGTH) == SafeNativeMethods.DM_PAPERLENGTH) 364if ((mode.dmFields & SafeNativeMethods.DM_PAPERWIDTH) == SafeNativeMethods.DM_PAPERWIDTH) 375mode.dmFields |= SafeNativeMethods.DM_PAPERLENGTH; 381mode.dmFields |= SafeNativeMethods.DM_PAPERWIDTH; 388if (paperSource != null && ((mode.dmFields & SafeNativeMethods.DM_DEFAULTSOURCE) == SafeNativeMethods.DM_DEFAULTSOURCE)) { 394if ((mode.dmFields & SafeNativeMethods.DM_PRINTQUALITY) == SafeNativeMethods.DM_PRINTQUALITY) 398if ((mode.dmFields & SafeNativeMethods.DM_YRESOLUTION) == SafeNativeMethods.DM_YRESOLUTION) 404if ((mode.dmFields & SafeNativeMethods.DM_PRINTQUALITY) == SafeNativeMethods.DM_PRINTQUALITY) 419int retCode = SafeNativeMethods.DocumentProperties(NativeMethods.NullHandleRef, NativeMethods.NullHandleRef, printerSettings.PrinterName, modePointer, modePointer, SafeNativeMethods.DM_IN_BUFFER | SafeNativeMethods.DM_OUT_BUFFER); 421SafeNativeMethods.GlobalFree(new HandleRef(null, modePointer)); 425SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 431IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 432SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 436SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 437SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 458return printerSettings.GetModeField(ModeField.Orientation, SafeNativeMethods.DMORIENT_PORTRAIT, modeHandle) == SafeNativeMethods.DMORIENT_LANDSCAPE; 473IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, modeHandle)); 474SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 478SafeNativeMethods.GlobalUnlock(new HandleRef(null, modeHandle)); 481SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 489private PaperSize PaperSizeFromMode(SafeNativeMethods.DEVMODE mode) { 491if ((mode.dmFields & SafeNativeMethods.DM_PAPERSIZE) == SafeNativeMethods.DM_PAPERSIZE) 504private PaperSource PaperSourceFromMode(SafeNativeMethods.DEVMODE mode) { 506if ((mode.dmFields & SafeNativeMethods.DM_DEFAULTSOURCE) == SafeNativeMethods.DM_DEFAULTSOURCE) 521private PrinterResolution PrinterResolutionFromMode(SafeNativeMethods.DEVMODE mode) { 524if (mode.dmPrintQuality >= 0 && ((mode.dmFields & SafeNativeMethods.DM_PRINTQUALITY) == SafeNativeMethods.DM_PRINTQUALITY) 525&& ((mode.dmFields & SafeNativeMethods.DM_YRESOLUTION) == SafeNativeMethods.DM_YRESOLUTION)) { 531if ((mode.dmFields & SafeNativeMethods.DM_PRINTQUALITY) == SafeNativeMethods.DM_PRINTQUALITY) 557IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 558SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE)); 560if ((mode.dmFields & SafeNativeMethods.DM_COLOR) == SafeNativeMethods.DM_COLOR) 562color = (mode.dmColor == SafeNativeMethods.DMCOLOR_COLOR); 565if ((mode.dmFields & SafeNativeMethods.DM_ORIENTATION) == SafeNativeMethods.DM_ORIENTATION) 567landscape = (mode.dmOrientation == SafeNativeMethods.DMORIENT_LANDSCAPE); 574SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode));
commonui\System\Drawing\Printing\PaperKinds.cs (116)
47Letter = SafeNativeMethods.DMPAPER_LETTER, 56Legal = SafeNativeMethods.DMPAPER_LEGAL, 65A4 = SafeNativeMethods.DMPAPER_A4, 70CSheet = SafeNativeMethods.DMPAPER_CSHEET, 78DSheet = SafeNativeMethods.DMPAPER_DSHEET, 86ESheet = SafeNativeMethods.DMPAPER_ESHEET, 93LetterSmall = SafeNativeMethods.DMPAPER_LETTERSMALL, 101Tabloid = SafeNativeMethods.DMPAPER_TABLOID, 109Ledger = SafeNativeMethods.DMPAPER_LEDGER, 117Statement = SafeNativeMethods.DMPAPER_STATEMENT, 126Executive = SafeNativeMethods.DMPAPER_EXECUTIVE, 134A3 = SafeNativeMethods.DMPAPER_A3, 142A4Small = SafeNativeMethods.DMPAPER_A4SMALL, 151A5 = SafeNativeMethods.DMPAPER_A5, 158B4 = SafeNativeMethods.DMPAPER_B4, 166B5 = SafeNativeMethods.DMPAPER_B5, 174Folio = SafeNativeMethods.DMPAPER_FOLIO, 182Quarto = SafeNativeMethods.DMPAPER_QUARTO, 190Standard10x14 = SafeNativeMethods.DMPAPER_10X14, 198Standard11x17 = SafeNativeMethods.DMPAPER_11X17, 206Note = SafeNativeMethods.DMPAPER_NOTE, 214Number9Envelope = SafeNativeMethods.DMPAPER_ENV_9, 222Number10Envelope = SafeNativeMethods.DMPAPER_ENV_10, 230Number11Envelope = SafeNativeMethods.DMPAPER_ENV_11, 238Number12Envelope = SafeNativeMethods.DMPAPER_ENV_12, 245Number14Envelope = SafeNativeMethods.DMPAPER_ENV_14, 253DLEnvelope = SafeNativeMethods.DMPAPER_ENV_DL, 261C5Envelope = SafeNativeMethods.DMPAPER_ENV_C5, 266C3Envelope = SafeNativeMethods.DMPAPER_ENV_C3, 274C4Envelope = SafeNativeMethods.DMPAPER_ENV_C4, 279C6Envelope = SafeNativeMethods.DMPAPER_ENV_C6, 287C65Envelope = SafeNativeMethods.DMPAPER_ENV_C65, 294B4Envelope = SafeNativeMethods.DMPAPER_ENV_B4, 302B5Envelope = SafeNativeMethods.DMPAPER_ENV_B5, 310B6Envelope = SafeNativeMethods.DMPAPER_ENV_B6, 317ItalyEnvelope = SafeNativeMethods.DMPAPER_ENV_ITALY, 325MonarchEnvelope = SafeNativeMethods.DMPAPER_ENV_MONARCH, 333PersonalEnvelope = SafeNativeMethods.DMPAPER_ENV_PERSONAL, 341USStandardFanfold = SafeNativeMethods.DMPAPER_FANFOLD_US, 349GermanStandardFanfold = SafeNativeMethods.DMPAPER_FANFOLD_STD_GERMAN, 357GermanLegalFanfold = SafeNativeMethods.DMPAPER_FANFOLD_LGL_GERMAN, 365IsoB4 = SafeNativeMethods.DMPAPER_ISO_B4, 372JapanesePostcard = SafeNativeMethods.DMPAPER_JAPANESE_POSTCARD, 381Standard9x11 = SafeNativeMethods.DMPAPER_9X11, 389Standard10x11 = SafeNativeMethods.DMPAPER_10X11, 397Standard15x11 = SafeNativeMethods.DMPAPER_15X11, 405InviteEnvelope= SafeNativeMethods.DMPAPER_ENV_INVITE, 417LetterExtra = SafeNativeMethods.DMPAPER_LETTER_EXTRA, 427LegalExtra = SafeNativeMethods.DMPAPER_LEGAL_EXTRA, 436TabloidExtra = SafeNativeMethods.DMPAPER_TABLOID_EXTRA, 446A4Extra = SafeNativeMethods.DMPAPER_A4_EXTRA, 454LetterTransverse = SafeNativeMethods.DMPAPER_LETTER_TRANSVERSE, 462A4Transverse = SafeNativeMethods.DMPAPER_A4_TRANSVERSE, 471LetterExtraTransverse = SafeNativeMethods.DMPAPER_LETTER_EXTRA_TRANSVERSE, 479APlus = SafeNativeMethods.DMPAPER_A_PLUS, 487BPlus = SafeNativeMethods.DMPAPER_B_PLUS, 495LetterPlus = SafeNativeMethods.DMPAPER_LETTER_PLUS, 503A4Plus = SafeNativeMethods.DMPAPER_A4_PLUS, 512A5Transverse = SafeNativeMethods.DMPAPER_A5_TRANSVERSE, 520B5Transverse = SafeNativeMethods.DMPAPER_B5_TRANSVERSE, 528A3Extra = SafeNativeMethods.DMPAPER_A3_EXTRA, 536A5Extra = SafeNativeMethods.DMPAPER_A5_EXTRA, 544B5Extra = SafeNativeMethods.DMPAPER_B5_EXTRA, 553A2 = SafeNativeMethods.DMPAPER_A2, 561A3Transverse = SafeNativeMethods.DMPAPER_A3_TRANSVERSE, 569A3ExtraTransverse = SafeNativeMethods.DMPAPER_A3_EXTRA_TRANSVERSE, 579JapaneseDoublePostcard = SafeNativeMethods.DMPAPER_DBL_JAPANESE_POSTCARD, /* Japanese Double Postcard 200 x 148 mm */ 590A6 = SafeNativeMethods.DMPAPER_A6, /* A6 105 x 148 mm */ 598JapaneseEnvelopeKakuNumber2 = SafeNativeMethods.DMPAPER_JENV_KAKU2, /* Japanese Envelope Kaku #2 */ 605JapaneseEnvelopeKakuNumber3 = SafeNativeMethods.DMPAPER_JENV_KAKU3, /* Japanese Envelope Kaku #3 */ 613JapaneseEnvelopeChouNumber3= SafeNativeMethods.DMPAPER_JENV_CHOU3, /* Japanese Envelope Chou #3 */ 621JapaneseEnvelopeChouNumber4 = SafeNativeMethods.DMPAPER_JENV_CHOU4, /* Japanese Envelope Chou #4 */ 630LetterRotated = SafeNativeMethods.DMPAPER_LETTER_ROTATED, /* Letter Rotated 11 x 8 1/2 11 in */ 638A3Rotated = SafeNativeMethods.DMPAPER_A3_ROTATED, /* A3 Rotated 420 x 297 mm */ 648A4Rotated = SafeNativeMethods.DMPAPER_A4_ROTATED, /* A4 Rotated 297 x 210 mm */ 658A5Rotated = SafeNativeMethods.DMPAPER_A5_ROTATED, /* A5 Rotated 210 x 148 mm */ 668B4JisRotated = SafeNativeMethods.DMPAPER_B4_JIS_ROTATED, /* B4 (JIS) Rotated 364 x 257 mm */ 678B5JisRotated = SafeNativeMethods.DMPAPER_B5_JIS_ROTATED, /* B5 (JIS) Rotated 257 x 182 mm */ 689JapanesePostcardRotated = SafeNativeMethods.DMPAPER_JAPANESE_POSTCARD_ROTATED, /* Japanese Postcard Rotated 148 x 100 mm */ 699JapaneseDoublePostcardRotated = SafeNativeMethods.DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED, /* Double Japanese Postcard Rotated 148 x 200 mm */ 710A6Rotated = SafeNativeMethods.DMPAPER_A6_ROTATED, /* A6 Rotated 148 x 105 mm */ 718JapaneseEnvelopeKakuNumber2Rotated = SafeNativeMethods.DMPAPER_JENV_KAKU2_ROTATED, /* Japanese Envelope Kaku #2 Rotated */ 726JapaneseEnvelopeKakuNumber3Rotated = SafeNativeMethods.DMPAPER_JENV_KAKU3_ROTATED, /* Japanese Envelope Kaku #3 Rotated */ 734JapaneseEnvelopeChouNumber3Rotated = SafeNativeMethods.DMPAPER_JENV_CHOU3_ROTATED, /* Japanese Envelope Chou #3 Rotated */ 742JapaneseEnvelopeChouNumber4Rotated = SafeNativeMethods.DMPAPER_JENV_CHOU4_ROTATED, /* Japanese Envelope Chou #4 Rotated */ 752B6Jis = SafeNativeMethods.DMPAPER_B6_JIS, /* B6 (JIS) 128 x 182 mm */ 762B6JisRotated = SafeNativeMethods.DMPAPER_B6_JIS_ROTATED, /* B6 (JIS) Rotated 182 x 128 mm */ 771Standard12x11 = SafeNativeMethods.DMPAPER_12X11, /* 12 x 11 in */ 779JapaneseEnvelopeYouNumber4 = SafeNativeMethods.DMPAPER_JENV_YOU4, /* Japanese Envelope You #4 */ 787JapaneseEnvelopeYouNumber4Rotated = SafeNativeMethods.DMPAPER_JENV_YOU4_ROTATED, /* Japanese Envelope You #4 Rotated*/ 798Prc16K = SafeNativeMethods.DMPAPER_P16K, /* PRC 16K 146 x 215 mm */ 808Prc32K = SafeNativeMethods.DMPAPER_P32K, /* PRC 32K 97 x 151 mm */ 818Prc32KBig = SafeNativeMethods.DMPAPER_P32KBIG, /* PRC 32K(Big) 97 x 151 mm */ 827PrcEnvelopeNumber1 = SafeNativeMethods.DMPAPER_PENV_1, /* PRC Envelope #1 102 x 165 mm */ 836PrcEnvelopeNumber2 = SafeNativeMethods.DMPAPER_PENV_2, /* PRC Envelope #2 102 x 176 mm */ 845PrcEnvelopeNumber3 = SafeNativeMethods.DMPAPER_PENV_3, /* PRC Envelope #3 125 x 176 mm */ 854PrcEnvelopeNumber4 = SafeNativeMethods.DMPAPER_PENV_4, /* PRC Envelope #4 110 x 208 mm */ 861PrcEnvelopeNumber5 = SafeNativeMethods.DMPAPER_PENV_5, /* PRC Envelope #5 110 x 220 mm */ 868PrcEnvelopeNumber6 = SafeNativeMethods.DMPAPER_PENV_6, /* PRC Envelope #6 120 x 230 mm */ 877PrcEnvelopeNumber7 = SafeNativeMethods.DMPAPER_PENV_7, /* PRC Envelope #7 160 x 230 mm */ 886PrcEnvelopeNumber8 = SafeNativeMethods.DMPAPER_PENV_8, /* PRC Envelope #8 120 x 309 mm */ 893PrcEnvelopeNumber9 = SafeNativeMethods.DMPAPER_PENV_9, /* PRC Envelope #9 229 x 324 mm */ 903PrcEnvelopeNumber10 = SafeNativeMethods.DMPAPER_PENV_10, /* PRC Envelope #10 324 x 458 mm */ 910Prc16KRotated = SafeNativeMethods.DMPAPER_P16K_ROTATED, /* PRC 16K Rotated */ 918Prc32KRotated = SafeNativeMethods.DMPAPER_P32K_ROTATED, /* PRC 32K Rotated */ 925Prc32KBigRotated = SafeNativeMethods.DMPAPER_P32KBIG_ROTATED, /* PRC 32K(Big) Rotated */ 932PrcEnvelopeNumber1Rotated = SafeNativeMethods.DMPAPER_PENV_1_ROTATED, /* PRC Envelope #1 Rotated 165 x 102 mm */ 942PrcEnvelopeNumber2Rotated = SafeNativeMethods.DMPAPER_PENV_2_ROTATED, /* PRC Envelope #2 Rotated 176 x 102 mm */ 952PrcEnvelopeNumber3Rotated = SafeNativeMethods.DMPAPER_PENV_3_ROTATED, /* PRC Envelope #3 Rotated 176 x 125 mm */ 959PrcEnvelopeNumber4Rotated = SafeNativeMethods.DMPAPER_PENV_4_ROTATED, /* PRC Envelope #4 Rotated 208 x 110 mm */ 967PrcEnvelopeNumber5Rotated = SafeNativeMethods.DMPAPER_PENV_5_ROTATED, /* PRC Envelope #5 Rotated 220 x 110 mm */ 974PrcEnvelopeNumber6Rotated = SafeNativeMethods.DMPAPER_PENV_6_ROTATED, /* PRC Envelope #6 Rotated 230 x 120 mm */ 981PrcEnvelopeNumber7Rotated = SafeNativeMethods.DMPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */ 991PrcEnvelopeNumber8Rotated = SafeNativeMethods.DMPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */ 998PrcEnvelopeNumber9Rotated = SafeNativeMethods.DMPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */ 1005PrcEnvelopeNumber10Rotated = SafeNativeMethods.DMPAPER_PENV_10_ROTATED, /* PRC Envelope #10 Rotated 458 x 324 mm */
commonui\System\Drawing\Printing\PaperSize.cs (3)
93if (kind <= (PaperKind)SafeNativeMethods.DMPAPER_LAST && 94!(kind == (PaperKind)SafeNativeMethods.DMPAPER_RESERVED_48 || kind == (PaperKind)SafeNativeMethods.DMPAPER_RESERVED_49))
commonui\System\Drawing\Printing\PaperSource.cs (1)
55if ((unchecked((int) kind)) >= SafeNativeMethods.DMBIN_USER)
commonui\System\Drawing\Printing\PaperSourceKind.cs (14)
34Upper = SafeNativeMethods.DMBIN_UPPER, 42Lower = SafeNativeMethods.DMBIN_LOWER, 50Middle = SafeNativeMethods.DMBIN_MIDDLE, 58Manual = SafeNativeMethods.DMBIN_MANUAL, 67Envelope = SafeNativeMethods.DMBIN_ENVELOPE, 75ManualFeed = SafeNativeMethods.DMBIN_ENVMANUAL, 84AutomaticFeed = SafeNativeMethods.DMBIN_AUTO, 92TractorFeed = SafeNativeMethods.DMBIN_TRACTOR, 100SmallFormat = SafeNativeMethods.DMBIN_SMALLFMT, 108LargeFormat = SafeNativeMethods.DMBIN_LARGEFMT, 118LargeCapacity = SafeNativeMethods.DMBIN_LARGECAPACITY, 126Cassette = SafeNativeMethods.DMBIN_CASSETTE, 131FormSource = SafeNativeMethods.DMBIN_FORMSOURCE, 139Custom = SafeNativeMethods.DMBIN_USER + 1,
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
134int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 135int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 136int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 137int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrintController.cs (1)
60SafeNativeMethods.GlobalFree(new HandleRef(this, handle));
commonui\System\Drawing\Printing\PrinterResolutionKind.cs (4)
29High = SafeNativeMethods.DMRES_HIGH, 37Medium = SafeNativeMethods.DMRES_MEDIUM, 45Low = SafeNativeMethods.DMRES_LOW, 53Draft = SafeNativeMethods.DMRES_DRAFT,
commonui\System\Drawing\Printing\PrinterSettings.cs (129)
82get { return DeviceCapabilities(SafeNativeMethods.DC_DUPLEX, IntPtr.Zero, 0) == 1;} 126return GetModeField(ModeField.Collate, SafeNativeMethods.DMCOLLATE_FALSE) == SafeNativeMethods.DMCOLLATE_TRUE; 175return(Duplex) GetModeField(ModeField.Duplex, SafeNativeMethods.DMDUP_SIMPLEX); 241SafeNativeMethods.EnumPrinters(SafeNativeMethods.PRINTER_ENUM_LOCAL | SafeNativeMethods.PRINTER_ENUM_CONNECTIONS, null, level, IntPtr.Zero, 0, out bufferSize, out count); 244returnCode = SafeNativeMethods.EnumPrinters(SafeNativeMethods.PRINTER_ENUM_LOCAL | SafeNativeMethods.PRINTER_ENUM_CONNECTIONS, 292return GetDeviceCaps(SafeNativeMethods.TECHNOLOGY, SafeNativeMethods.DT_RASPRINTER) == SafeNativeMethods.DT_PLOTTER; 305return DeviceCapabilities(SafeNativeMethods.DC_COPIES, IntPtr.Zero, -1) != -1; 317get { return DeviceCapabilities(SafeNativeMethods.DC_ORIENTATION, IntPtr.Zero, 0);} 327get { return DeviceCapabilities(SafeNativeMethods.DC_COPIES, IntPtr.Zero, 1);} 529int nEscape = imageFormat.Equals(ImageFormat.Jpeg) ? SafeNativeMethods.CHECKJPEGFORMAT : SafeNativeMethods.CHECKPNGFORMAT; 534isDirectPrintingSupported = SafeNativeMethods.ExtEscape(hdc, SafeNativeMethods.QUERYESCSUPPORT, Marshal.SizeOf(typeof(int)), ref nEscape, 0, out outData) > 0; 571int nEscape = image.RawFormat.Equals(ImageFormat.Jpeg) ? SafeNativeMethods.CHECKJPEGFORMAT : SafeNativeMethods.CHECKPNGFORMAT; 577bool querySupported = SafeNativeMethods.ExtEscape(hdc, SafeNativeMethods.QUERYESCSUPPORT, Marshal.SizeOf(typeof(int)), ref nEscape, 0, out outData) > 0; 579isDirectPrintingSupported = (SafeNativeMethods.ExtEscape(hdc, nEscape, pvImageLen, pvImage, Marshal.SizeOf(typeof(int)), out outData) > 0) 606return GetDeviceCaps(SafeNativeMethods.BITSPIXEL, 1) > 1; 659SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 667IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 669SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 696SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 705IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 707SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 774private static SafeNativeMethods.PRINTDLGX86 CreatePRINTDLGX86() { 775SafeNativeMethods.PRINTDLGX86 data = new SafeNativeMethods.PRINTDLGX86(); 776data.lStructSize = Marshal.SizeOf(typeof(SafeNativeMethods.PRINTDLGX86)); 802private static SafeNativeMethods.PRINTDLG CreatePRINTDLG() { 803SafeNativeMethods.PRINTDLG data = new SafeNativeMethods.PRINTDLG(); 804data.lStructSize = Marshal.SizeOf(typeof(SafeNativeMethods.PRINTDLG)); 841int result = SafeNativeMethods.DeviceCapabilities(printerName, GetOutputPort(), 855SafeNativeMethods.PRINTDLG data = CreatePRINTDLG(); 856data.Flags = SafeNativeMethods.PD_RETURNDEFAULT; 857bool status = SafeNativeMethods.PrintDlg(data); 863IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 868SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 872SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 873SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 878SafeNativeMethods.PRINTDLGX86 data = CreatePRINTDLGX86(); 879data.Flags = SafeNativeMethods.PD_RETURNDEFAULT; 880bool status = SafeNativeMethods.PrintDlg(data); 886IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 891SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 895SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 896SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 911SafeNativeMethods.PRINTDLG data = CreatePRINTDLG(); 912data.Flags = SafeNativeMethods.PD_RETURNDEFAULT; 913bool status = SafeNativeMethods.PrintDlg(data); 918IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 924SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 928SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 929SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 934SafeNativeMethods.PRINTDLGX86 data = CreatePRINTDLGX86(); 935data.Flags = SafeNativeMethods.PD_RETURNDEFAULT; 936bool status = SafeNativeMethods.PrintDlg(data); 942IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 948SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 952SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 953SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 1006int modeSize = SafeNativeMethods.DocumentProperties(NativeMethods.NullHandleRef, NativeMethods.NullHandleRef, printer, IntPtr.Zero, NativeMethods.NullHandleRef, 0); 1010IntPtr handle = SafeNativeMethods.GlobalAlloc(SafeNativeMethods.GMEM_MOVEABLE, (uint)modeSize); // cannot be <0 anyway 1011IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1018int returnCode = SafeNativeMethods.DocumentProperties(NativeMethods.NullHandleRef, NativeMethods.NullHandleRef, printer, pointer, NativeMethods.NullHandleRef, SafeNativeMethods.DM_OUT_BUFFER); 1024SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE)); 1035if ((mode.dmFields & SafeNativeMethods.DM_COPIES) == SafeNativeMethods.DM_COPIES) 1040if ((mode.dmFields & SafeNativeMethods.DM_DUPLEX) == SafeNativeMethods.DM_DUPLEX) 1045if ((mode.dmFields & SafeNativeMethods.DM_COLLATE) == SafeNativeMethods.DM_COLLATE) 1048mode.dmCollate = (short) (((bool) collate) ? SafeNativeMethods.DMCOLLATE_TRUE : SafeNativeMethods.DMCOLLATE_FALSE); 1053int retCode = SafeNativeMethods.DocumentProperties(NativeMethods.NullHandleRef, NativeMethods.NullHandleRef, printer, pointer, pointer, SafeNativeMethods.DM_IN_BUFFER | SafeNativeMethods.DM_OUT_BUFFER); 1055SafeNativeMethods.GlobalFree(new HandleRef(null, handle)); 1056SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1061SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1110IntPtr handle = SafeNativeMethods.GlobalAlloc(SafeNativeMethods.GMEM_MOVEABLE | SafeNativeMethods.GMEM_ZEROINIT, namesSize); 1111IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1121SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1147IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 1148SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE)); 1167SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 1172SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 1184int count = FastDeviceCapabilities(SafeNativeMethods.DC_PAPERNAMES, IntPtr.Zero, -1, printerName); 1189FastDeviceCapabilities(SafeNativeMethods.DC_PAPERNAMES, namesBuffer, -1, printerName); 1191Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERS, IntPtr.Zero, -1, printerName) == count, 1194FastDeviceCapabilities(SafeNativeMethods.DC_PAPERS, kindsBuffer, -1, printerName); 1196Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERSIZE, IntPtr.Zero, -1, printerName) == count, 1199FastDeviceCapabilities(SafeNativeMethods.DC_PAPERSIZE, dimensionsBuffer, -1, printerName); 1227int count = FastDeviceCapabilities(SafeNativeMethods.DC_BINNAMES, IntPtr.Zero, -1, printerName); 1235FastDeviceCapabilities(SafeNativeMethods.DC_BINNAMES, namesBuffer, -1, printerName); 1237Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_BINS, IntPtr.Zero, -1, printerName) == count, 1240FastDeviceCapabilities(SafeNativeMethods.DC_BINS, kindsBuffer, -1, printerName); 1265int count = FastDeviceCapabilities(SafeNativeMethods.DC_ENUMRESOLUTIONS, IntPtr.Zero, -1, printerName); 1284FastDeviceCapabilities(SafeNativeMethods.DC_ENUMRESOLUTIONS, buffer, -1, printerName); 1318IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 1319SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE) UnsafeNativeMethods.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE)); 1335if ((mode.dmFields & SafeNativeMethods.DM_COPIES) == SafeNativeMethods.DM_COPIES) { 1339if ((mode.dmFields & SafeNativeMethods.DM_DUPLEX) == SafeNativeMethods.DM_DUPLEX ) { 1343if ((mode.dmFields & SafeNativeMethods.DM_COLLATE) == SafeNativeMethods.DM_COLLATE) { 1344collate = (mode.dmCollate == SafeNativeMethods.DMCOLLATE_TRUE); 1347SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 1362IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevnames)); 1370SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevnames));
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (4)
55int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 56int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 57int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 58int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrintRange.cs (4)
34AllPages = SafeNativeMethods.PD_ALLPAGES, 43SomePages = SafeNativeMethods.PD_PAGENUMS, 52Selection = SafeNativeMethods.PD_SELECTION, 63CurrentPage = SafeNativeMethods.PD_CURRENTPAGE,
commonui\System\Drawing\Region.cs (137)
49int status = SafeNativeMethods.Gdip.GdipCreateRegion(out region); 51if (status != SafeNativeMethods.Gdip.Ok) 52throw SafeNativeMethods.Gdip.StatusException(status); 70int status = SafeNativeMethods.Gdip.GdipCreateRegionRect(ref gprectf, out region); 72if (status != SafeNativeMethods.Gdip.Ok) 73throw SafeNativeMethods.Gdip.StatusException(status); 91int status = SafeNativeMethods.Gdip.GdipCreateRegionRectI(ref gprect, out region); 93if (status != SafeNativeMethods.Gdip.Ok) 94throw SafeNativeMethods.Gdip.StatusException(status); 114int status = SafeNativeMethods.Gdip.GdipCreateRegionPath(new HandleRef(path, path.nativePath), out region); 116if (status != SafeNativeMethods.Gdip.Ok) 117throw SafeNativeMethods.Gdip.StatusException(status); 134int status = SafeNativeMethods.Gdip.GdipCreateRegionRgnData(rgnData.Data, 138if (status != SafeNativeMethods.Gdip.Ok) 139throw SafeNativeMethods.Gdip.StatusException(status); 160int status = SafeNativeMethods.Gdip.GdipCreateRegionHrgn(new HandleRef(null, hrgn), out region); 162if (status != SafeNativeMethods.Gdip.Ok) 163throw SafeNativeMethods.Gdip.StatusException(status); 187int status = SafeNativeMethods.Gdip.GdipCloneRegion(new HandleRef(this, nativeRegion), out region); 189if (status != SafeNativeMethods.Gdip.Ok) 190throw SafeNativeMethods.Gdip.StatusException(status); 219SafeNativeMethods.Gdip.GdipDeleteRegion(new HandleRef(this, nativeRegion)); 256int status = SafeNativeMethods.Gdip.GdipSetInfinite(new HandleRef(this, nativeRegion)); 258if (status != SafeNativeMethods.Gdip.Ok) 259throw SafeNativeMethods.Gdip.StatusException(status); 268int status = SafeNativeMethods.Gdip.GdipSetEmpty(new HandleRef(this, nativeRegion)); 270if (status != SafeNativeMethods.Gdip.Ok) 271throw SafeNativeMethods.Gdip.StatusException(status); 282int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Intersect); 284if (status != SafeNativeMethods.Gdip.Ok) 285throw SafeNativeMethods.Gdip.StatusException(status); 298int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Intersect); 300if (status != SafeNativeMethods.Gdip.Ok) 301throw SafeNativeMethods.Gdip.StatusException(status); 315int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Intersect); 317if (status != SafeNativeMethods.Gdip.Ok) 318throw SafeNativeMethods.Gdip.StatusException(status); 332int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Intersect); 334if (status != SafeNativeMethods.Gdip.Ok) 335throw SafeNativeMethods.Gdip.StatusException(status); 349SafeNativeMethods.IntDeleteObject(new HandleRef(this, regionHandle)); 362int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Union); 364if (status != SafeNativeMethods.Gdip.Ok) 365throw SafeNativeMethods.Gdip.StatusException(status); 376int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Union); 378if (status != SafeNativeMethods.Gdip.Ok) 379throw SafeNativeMethods.Gdip.StatusException(status); 391int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Union); 393if (status != SafeNativeMethods.Gdip.Ok) 394throw SafeNativeMethods.Gdip.StatusException(status); 407int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Union); 409if (status != SafeNativeMethods.Gdip.Ok) 410throw SafeNativeMethods.Gdip.StatusException(status); 421int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Xor); 423if (status != SafeNativeMethods.Gdip.Ok) 424throw SafeNativeMethods.Gdip.StatusException(status); 435int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Xor); 437if (status != SafeNativeMethods.Gdip.Ok) 438throw SafeNativeMethods.Gdip.StatusException(status); 450int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Xor); 452if (status != SafeNativeMethods.Gdip.Ok) 453throw SafeNativeMethods.Gdip.StatusException(status); 465int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Xor); 467if (status != SafeNativeMethods.Gdip.Ok) 468throw SafeNativeMethods.Gdip.StatusException(status); 479int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Exclude); 481if (status != SafeNativeMethods.Gdip.Ok) 482throw SafeNativeMethods.Gdip.StatusException(status); 493int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Exclude); 495if (status != SafeNativeMethods.Gdip.Ok) 496throw SafeNativeMethods.Gdip.StatusException(status); 508int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), 511if (status != SafeNativeMethods.Gdip.Ok) 512throw SafeNativeMethods.Gdip.StatusException(status); 524int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), 527if (status != SafeNativeMethods.Gdip.Ok) 528throw SafeNativeMethods.Gdip.StatusException(status); 539int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Complement); 541if (status != SafeNativeMethods.Gdip.Ok) 542throw SafeNativeMethods.Gdip.StatusException(status); 553int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Complement); 555if (status != SafeNativeMethods.Gdip.Ok) 556throw SafeNativeMethods.Gdip.StatusException(status); 569int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Complement); 571if (status != SafeNativeMethods.Gdip.Ok) 572throw SafeNativeMethods.Gdip.StatusException(status); 586int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Complement); 588if (status != SafeNativeMethods.Gdip.Ok) 589throw SafeNativeMethods.Gdip.StatusException(status); 601int status = SafeNativeMethods.Gdip.GdipTranslateRegion(new HandleRef(this, nativeRegion), dx, dy); 603if (status != SafeNativeMethods.Gdip.Ok) 604throw SafeNativeMethods.Gdip.StatusException(status); 613int status = SafeNativeMethods.Gdip.GdipTranslateRegionI(new HandleRef(this, nativeRegion), dx, dy); 615if (status != SafeNativeMethods.Gdip.Ok) 616throw SafeNativeMethods.Gdip.StatusException(status); 628int status = SafeNativeMethods.Gdip.GdipTransformRegion(new HandleRef(this, nativeRegion), 631if (status != SafeNativeMethods.Gdip.Ok) 632throw SafeNativeMethods.Gdip.StatusException(status); 649int status = SafeNativeMethods.Gdip.GdipGetRegionBounds(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), ref gprectf); 651if (status != SafeNativeMethods.Gdip.Ok) 652throw SafeNativeMethods.Gdip.StatusException(status); 672int status = SafeNativeMethods.Gdip.GdipGetRegionHRgn(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out hrgn); 674if (status != SafeNativeMethods.Gdip.Ok) 675throw SafeNativeMethods.Gdip.StatusException(status); 692int status = SafeNativeMethods.Gdip.GdipIsEmptyRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isEmpty); 694if (status != SafeNativeMethods.Gdip.Ok) 695throw SafeNativeMethods.Gdip.StatusException(status); 712int status = SafeNativeMethods.Gdip.GdipIsInfiniteRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isInfinite); 714if (status != SafeNativeMethods.Gdip.Ok) 715throw SafeNativeMethods.Gdip.StatusException(status); 736int status = SafeNativeMethods.Gdip.GdipIsEqualRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), new HandleRef(g, g.NativeGraphics), out isEqual); 738if (status != SafeNativeMethods.Gdip.Ok) 739throw SafeNativeMethods.Gdip.StatusException(status); 753int status = SafeNativeMethods.Gdip.GdipGetRegionDataSize(new HandleRef(this, nativeRegion), out regionSize); 755if (status != SafeNativeMethods.Gdip.Ok) 756throw SafeNativeMethods.Gdip.StatusException(status); 763status = SafeNativeMethods.Gdip.GdipGetRegionData(new HandleRef(this, nativeRegion), regionData, regionSize, out regionSize); 765if (status != SafeNativeMethods.Gdip.Ok) 766throw SafeNativeMethods.Gdip.StatusException(status); 817int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPoint(new HandleRef(this, nativeRegion), point.X, point.Y, 821if (status != SafeNativeMethods.Gdip.Ok) 822throw SafeNativeMethods.Gdip.StatusException(status); 869int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRect(new HandleRef(this, nativeRegion), rect.X, rect.Y, 874if (status != SafeNativeMethods.Gdip.Ok) 875throw SafeNativeMethods.Gdip.StatusException(status); 912int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPointI(new HandleRef(this, nativeRegion), point.X, point.Y, 916if (status != SafeNativeMethods.Gdip.Ok) 917throw SafeNativeMethods.Gdip.StatusException(status); 966int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRectI(new HandleRef(this, nativeRegion), rect.X, rect.Y, 971if (status != SafeNativeMethods.Gdip.Ok) 972throw SafeNativeMethods.Gdip.StatusException(status); 993int status = SafeNativeMethods.Gdip.GdipGetRegionScansCount(new HandleRef(this, nativeRegion), 997if (status != SafeNativeMethods.Gdip.Ok) 998throw SafeNativeMethods.Gdip.StatusException(status); 1005status = SafeNativeMethods.Gdip.GdipGetRegionScans(new HandleRef(this, nativeRegion), 1010if (status != SafeNativeMethods.Gdip.Ok) { 1011throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\SolidBrush.cs (12)
45int status = SafeNativeMethods.Gdip.GdipCreateSolidFill(this.color.ToArgb(), out brush); 47if (status != SafeNativeMethods.Gdip.Ok) 48throw SafeNativeMethods.Gdip.StatusException(status); 81int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 83if (status != SafeNativeMethods.Gdip.Ok) 84throw SafeNativeMethods.Gdip.StatusException(status); 116int status = SafeNativeMethods.Gdip.GdipGetSolidFillColor(new HandleRef(this, this.NativeBrush), out colorARGB); 118if (status != SafeNativeMethods.Gdip.Ok) 119throw SafeNativeMethods.Gdip.StatusException(status); 152int status = SafeNativeMethods.Gdip.GdipSetSolidFillColor(new HandleRef(this, this.NativeBrush), value.ToArgb()); 154if (status != SafeNativeMethods.Gdip.Ok) 155throw SafeNativeMethods.Gdip.StatusException(status);
commonui\System\Drawing\SystemBrushes.cs (2)
371Brush[] systemBrushes = (Brush[])SafeNativeMethods.Gdip.ThreadData[SystemBrushesKey]; 374SafeNativeMethods.Gdip.ThreadData[SystemBrushesKey] = systemBrushes;
commonui\System\Drawing\SystemFonts.cs (2)
258SafeNativeMethods.LOGFONT itfont = new SafeNativeMethods.LOGFONT();
commonui\System\Drawing\SystemIcons.cs (20)
46_application = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_APPLICATION )); 60_asterisk = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ASTERISK )); 74_error = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ERROR )); 88_exclamation = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_EXCLAMATION )); 102_hand = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_HAND )); 116_information = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_INFORMATION )); 130_question = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_QUESTION )); 144_warning = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WARNING )); 158_winlogo = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WINLOGO )); 178int result = SafeNativeMethods.LoadIconWithScaleDown( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_SHIELD, 32, 32, ref hIcon );
commonui\System\Drawing\SystemPens.cs (2)
371Pen[] systemPens = (Pen[])SafeNativeMethods.Gdip.ThreadData[SystemPensKey]; 374SafeNativeMethods.Gdip.ThreadData[SystemPensKey] = systemPens;
commonui\System\Drawing\ToolboxBitmapAttribute.cs (1)
487SafeNativeMethods.Gdip.DummyFunction();
commonui\System\Drawing\UnsafeNativeMethods.cs (10)
35return System.Internal.HandleCollector.Add(IntGetDC(hWnd), SafeNativeMethods.CommonHandles.HDC); 42System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.GDI); 50System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.HDC); 98return System.Internal.HandleCollector.Add(IntCreateCompatibleDC(hDC), SafeNativeMethods.CommonHandles.GDI); 119public static extern bool SystemParametersInfo(int uiAction, int uiParam, [In, Out] SafeNativeMethods.LOGFONT pvParam, int fWinIni); 288throw new ExternalException(msg, SafeNativeMethods.E_FAIL); 292throw new ExternalException(SR.GetString(SR.NotImplemented), SafeNativeMethods.E_NOTIMPL); 320case SafeNativeMethods.StreamConsts.STREAM_SEEK_SET: 329case SafeNativeMethods.StreamConsts.STREAM_SEEK_END: 338case SafeNativeMethods.StreamConsts.STREAM_SEEK_CUR:
misc\DpiHelper.cs (2)
19using CAPS = System.Drawing.SafeNativeMethods; 111deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX);