Graphics.GetContextInfo 方法

定义

重载

GetContextInfo(PointF, Region)

获取累积偏移量和剪辑区域。

GetContextInfo()
已过时.

获取累积图形上下文。

GetContextInfo(PointF)

获取累积偏移量。

GetContextInfo(PointF, Region)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

获取累积偏移量和剪辑区域。

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public void GetContextInfo (out System.Drawing.PointF offset, out System.Drawing.Region? clip);

参数

offset
PointF

此方法返回时,包含累积偏移量。 此参数被视为未初始化。

clip
Region

此方法返回时,包含累积剪辑区域;如果剪辑区域是无限的,则包含 null。 此参数被视为未初始化。

属性

适用于

.NET 9 和其他版本
产品 版本
.NET 6, 7, 8, 9
Windows Desktop 6, 7, 8, 9

GetContextInfo()

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

注意

Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations.

获取累积图形上下文。

C#
[System.Obsolete("Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations.", DiagnosticId="SYSLIB0016", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public object GetContextInfo ();
C#
public object GetContextInfo ();

返回

表示累积图形上下文的 Object

属性

注解

返回值是一个对象数组,其中第一个元素包含累积剪辑区域,第二个元素包含累积转换/转换矩阵。

适用于

.NET 9 和其他版本
产品 版本 (已过时)
.NET (6, 7, 8, 9)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5 (6, 7, 8, 9)

GetContextInfo(PointF)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

获取累积偏移量。

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public void GetContextInfo (out System.Drawing.PointF offset);

参数

offset
PointF

此方法返回时,包含累积偏移量。 此参数被视为未初始化。

属性

适用于

.NET 9 和其他版本
产品 版本
.NET 6, 7, 8, 9
Windows Desktop 6, 7, 8, 9