1

我正在尝试在我的设置文件中使用 System.Drawing.RotateFlipType。此屏幕截图总结了我的问题:

替代文字 http://l-2.incito.hr/rotatefliptype.png

每个 RotateFlipType 值都加倍,并且缺少一些。如果我尝试使用一些缺失值(例如 Rotate180FlipX,通过 app.config) - 它会被忽略。

在 Windows 7 上使用带有 SP1 的 VS2008、带有框架 3.5 的 vb.net。

4

1 回答 1

3
// Summary:
//     Specifies the direction of an image's rotation and the axis used to flip
//     the image.
public enum RotateFlipType
{
    // Summary:
    //     Specifies a 180-degree rotation followed by a horizontal and vertical flip.
    Rotate180FlipXY = 0,
    //
    // Summary:
    //     Specifies no rotation and no flipping.
    RotateNoneFlipNone = 0,
    //
    // Summary:
    //     Specifies a 270-degree rotation followed by a horizontal and vertical flip.
    Rotate270FlipXY = 1,
    //
    // Summary:
    //     Specifies a 90-degree rotation without flipping.
    Rotate90FlipNone = 1,
    //
    // Summary:
    //     Specifies a 180-degree rotation without flipping.
    Rotate180FlipNone = 2,
    //
    // Summary:
    //     Specifies no rotation followed by a horizontal and vertical flip.
    RotateNoneFlipXY = 2,
    //
    // Summary:
    //     Specifies a 270-degree rotation without flipping.
    Rotate270FlipNone = 3,
    //
    // Summary:
    //     Specifies a 90-degree rotation followed by a horizontal and vertical flip.
    Rotate90FlipXY = 3,
    //
    // Summary:
    //     Specifies a 180-degree rotation followed by a vertical flip.
    Rotate180FlipY = 4,
    //
    // Summary:
    //     Specifies no rotation followed by a horizontal flip.
    RotateNoneFlipX = 4,
    //
    // Summary:
    //     Specifies a 90-degree rotation followed by a horizontal flip.
    Rotate90FlipX = 5,
    //
    // Summary:
    //     Specifies a 270-degree rotation followed by a vertical flip.
    Rotate270FlipY = 5,
    //
    // Summary:
    //     Specifies no rotation followed by a vertical flip.
    RotateNoneFlipY = 6,
    //
    // Summary:
    //     Specifies a 180-degree rotation followed by a horizontal flip.
    Rotate180FlipX = 6,
    //
    // Summary:
    //     Specifies a 90-degree rotation followed by a vertical flip.
    Rotate90FlipY = 7,
    //
    // Summary:
    //     Specifies a 270-degree rotation followed by a horizontal flip.
    Rotate270FlipX = 7,
}

拿一张纸并尝试翻转和旋转它,您会发现重复的值确实是重复的,即。它们代表相同的转换。枚举转换器显然从 0 变为 7,搜索枚举字符串并为您获取 FIRST。

于 2010-05-31T20:28:03.530 回答