Color转ArcEngine的IRgbColor与IColor

Color转ArcEngine的IRgbColor与IColor

//Color转ArcEngine的IRgbColor

public static IRgbColor ColorToIRgbColor(Color pColor)

{

    IRgbColor pRgbColor = new RgbColorClass();

    pRgbColor.RGB = pColor.B * 65536 + pColor.G * 256 + pColor.R;

    return pRgbColor;

}

//Color转ArcEngine的IColor

public static IColor ColorToIColor(Color color)

{

     IColor pColor = new RgbColorClass();

     pColor.RGB = color.B * 65536 + color.G * 256 + color.R;

     return pColor;

}

转载自:https://blog.csdn.net/yanleigis/article/details/4737253

You may also like...