public static void FillRegion(System.Drawing.Rectangle r, System.Drawing.Color c, bool anti_alias, double opacity, int blend_mode) { int color_class_id; double [] color_v = { 0, 0, 0, 0 }; ColorAPI.GetColorEx((int)con.phKeyForegroundColor, out color_class_id, ref color_v); SelectionAPI.SelectShapeEx(r, (int)con.phClassRectangle, anti_alias, (int)con.phEventSet); ColorAPI.SetForegroundColor(c); DrawAPI.Fill((int)con.phEnumForegroundColor, 100, (int)con.phEnumNormal); ColorAPI.SetColorEx((int)con.phKeyForegroundColor, color_class_id, color_v); }
public static void GetColorEx(int color_id, out int color_class_id, out System.Drawing.Color c) { double [] v = new double[4]; ColorAPI.GetColorEx((int)con.phKeyForegroundColor, out color_class_id, ref v); c = System.Drawing.Color.FromArgb((int)v[0], (int)v[1], (int)v[2]); }