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