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)
60applyGraphicsState ? ApplyGraphicsProperties.All : ApplyGraphicsProperties.None, 75ApplyGraphicsProperties applyGraphicsState, 113bool needToApplyProperties = applyGraphicsState != ApplyGraphicsProperties.None;
System.Windows.Forms (11)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (1)
111using DeviceContextHdcScope hdc = _deviceContext.ToHdcScope(ApplyGraphicsProperties.None);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3489using 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"/>. 602internal static ApplyGraphicsProperties GetApplyStateFlags(IDeviceContext deviceContext, TextFormatFlags textFormatFlags) 606return ApplyGraphicsProperties.None; 609var apply = ApplyGraphicsProperties.None; 612apply |= ApplyGraphicsProperties.Clipping; 617apply |= ApplyGraphicsProperties.TranslateTransform; 635Debug.Assert(apply.HasFlag(ApplyGraphicsProperties.Clipping) 640Debug.Assert(apply.HasFlag(ApplyGraphicsProperties.TranslateTransform)
System.Windows.Forms.Primitives (2)
System\Windows\Forms\DeviceContextExtensions.cs (2)
182ApplyGraphicsProperties applyProperties = ApplyGraphicsProperties.All) => deviceContext switch
System.Windows.Forms.Primitives.Tests (23)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (23)
27using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.TranslateTransform)) 42using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.Clipping)) 57using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.All)) 72using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.None)) 110using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.TranslateTransform)) 137using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.Clipping)) 160using (DeviceContextHdcScope scope = new(g, ApplyGraphicsProperties.All)) 183using (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)] 226using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (ApplyGraphicsProperties)apply)) 243[InlineData((int)ApplyGraphicsProperties.TranslateTransform)] 244[InlineData((int)ApplyGraphicsProperties.Clipping)] 245[InlineData((int)ApplyGraphicsProperties.All)] 264using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (ApplyGraphicsProperties)apply)) 298using (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)] 329using (DeviceContextHdcScope scope = new(mockIDeviceContext.Object, (ApplyGraphicsProperties)apply))