简体   繁体   English

在.Net,WinForms中查找有关PixelOffsetMode枚举的详细信息

[英]Looking for details on the PixelOffsetMode Enumeration in .Net, WinForms

The possible values of PixelOffsetMode are: PixelOffsetMode的可能值为:

Invalid  
Default  
HighSpeed  
HighQuality  
None  
Half  

I'm guessing that HighQuality = Half, HighSpeed = None and Default = HighSpeed. 我猜想HighQuality = Half,HighSpeed = None,默认= HighSpeed。

If this is true then, like the SmoothingMode , I can offer just two simple options. 如果是这样,那么像SmoothingMode ,我只能提供两个简单的选项。

Does anyone know if this is correct and, if so, where on earth did you find the information? 有谁知道这是正确的,如果是,您是在哪里找到信息的?

If this is true then, like the SmoothingMode, I can offer just two simple options. 如果这是真的,那么像SmoothingMode一样,我只能提供两个简单的选项。

Your assumption seems to be correct. 您的假设似乎是正确的。

According to this excellent page/blog about Graphics.DrawImage: 根据有关Graphics.DrawImage的出色网页/博客

Those docs make it clear; 这些文档很清楚; there are really only two options, and the Remarks section describes quite nicely what each does. 实际上只有两个选项,“备注”部分很好地描述了每个选项。 The real options: None and Half. 真正的选择:无和一半。 The rest are just aliases for those two. 其余只是这两个的别名。 I'll make it even simpler: None=Bad, Half=Good. 我将使其更简单:None = Bad,Half = Good。 The default value is Bad. 默认值为“错误”。

The GDI+ MSDN actively explains that there are actually only two options: GDI + MSDN积极地解释说,实际上只有两种选择:

PixelOffsetModeNone Indicates that pixel centers have integer coordinates. PixelOffsetModeNone指示像素中心具有整数坐标。

PixelOffsetModeHalf Indicates that pixel centers have coordinates that are half way between integer values. PixelOffsetModeHalf指示像素中心的坐标介于整数值之间。

Invalid is never to be used, and the other values simply link through to the ones mentioned above. 永远不要使用Invalid,而其他值只是简单地链接到上述值。

So in summary, although the enumeration has different values: 因此,总而言之, 尽管枚举具有不同的值:

None == Default == HighSpeed, yielding a lower quality but faster operation, pixels usually do NOT represent the color value of their integer location (ie their corner) 无==默认==高速,产生较低的质量但操作更快,像素通常不代表其整数位置(即角)的颜色值

Half == HighQuality , yielding better results (less artifacting) but in a costlier operation, after all pixels usually represent the value of their center. Half == HighQuality,在所有像素通常代表其中心值之后,产生更好的结果(减少伪像),但操作成本更高。

PixelOffsetMode is defined as: PixelOffsetMode定义为:

public enum PixelOffsetMode
{
    Invalid = -1,
    Default = 0,
    HighSpeed = 1,
    HighQuality = 2,
    None = 3
    Half = 4,
}

A great way to see these values (and other similar things) is to use .NET Reflector . 查看这些值(和其他类似内容)的一种好方法是使用.NET Reflector

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM