41 references to ApplyGraphicsProperties
System.Private.Windows.GdiPlus (5)
System\Drawing\IGraphicsContextInfo.cs (1)
10
(HDC hdc, int saveState) GetHdc(
ApplyGraphicsProperties
apply, bool alwaysSaveState);
Windows\Win32\Graphics\Gdi\DeviceContextHdcScope.cs (4)
60
applyGraphicsState ?
ApplyGraphicsProperties
.All :
ApplyGraphicsProperties
.None,
75
ApplyGraphicsProperties
applyGraphicsState,
113
bool needToApplyProperties = applyGraphicsState !=
ApplyGraphicsProperties
.None;
System.Windows.Forms (11)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (1)
111
using DeviceContextHdcScope hdc = _deviceContext.ToHdcScope(
ApplyGraphicsProperties
.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3489
using DeviceContextHdcScope toolStripHDC = new(toolstripGraphics,
ApplyGraphicsProperties
.Clipping);
System\Windows\Forms\Rendering\TextRenderer.cs (9)
600
/// Gets the proper <see cref="
ApplyGraphicsProperties
"/> flags for the given <paramref name="textFormatFlags"/>.
602
internal static
ApplyGraphicsProperties
GetApplyStateFlags(IDeviceContext deviceContext, TextFormatFlags textFormatFlags)
606
return
ApplyGraphicsProperties
.None;
609
var
apply =
ApplyGraphicsProperties
.None;
612
apply |=
ApplyGraphicsProperties
.Clipping;
617
apply |=
ApplyGraphicsProperties
.TranslateTransform;
635
Debug.Assert(apply.HasFlag(
ApplyGraphicsProperties
.Clipping)
640
Debug.Assert(apply.HasFlag(
ApplyGraphicsProperties
.TranslateTransform)
System.Windows.Forms.Primitives (2)
System\Windows\Forms\DeviceContextExtensions.cs (2)
182
ApplyGraphicsProperties
applyProperties =
ApplyGraphicsProperties
.All) => deviceContext switch
System.Windows.Forms.Primitives.Tests (23)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (23)
27
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.TranslateTransform))
42
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.Clipping))
57
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.All))
72
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.None))
110
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.TranslateTransform))
137
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.Clipping))
160
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.All))
183
using (DeviceContextHdcScope scope = new(g,
ApplyGraphicsProperties
.None))
210
[InlineData((int)
ApplyGraphicsProperties
.TranslateTransform)]
211
[InlineData((int)
ApplyGraphicsProperties
.Clipping)]
212
[InlineData((int)
ApplyGraphicsProperties
.All)]
213
[InlineData((int)
ApplyGraphicsProperties
.None)]
226
using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (
ApplyGraphicsProperties
)apply))
243
[InlineData((int)
ApplyGraphicsProperties
.TranslateTransform)]
244
[InlineData((int)
ApplyGraphicsProperties
.Clipping)]
245
[InlineData((int)
ApplyGraphicsProperties
.All)]
264
using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (
ApplyGraphicsProperties
)apply))
298
using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object,
ApplyGraphicsProperties
.None))
315
[InlineData((int)
ApplyGraphicsProperties
.TranslateTransform)]
316
[InlineData((int)
ApplyGraphicsProperties
.Clipping)]
317
[InlineData((int)
ApplyGraphicsProperties
.All)]
318
[InlineData((int)
ApplyGraphicsProperties
.None)]
329
using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (
ApplyGraphicsProperties
)apply))