public static void SetBackgroundColor(System.Drawing.Color c1) { // Desc2 var Desc2 = ColorAPI.CreateRGBColorDescriptor(c1); ColorAPI.__SetAppColor((int)con.phKeyBackgroundColor, Desc2); }
public static void SetForegroundColor(System.Drawing.Color c1) { // Desc2 PhotoshopTypeLibrary.IActionDescriptor Desc2 = ColorAPI.CreateRGBColorDescriptor(c1); __SetAppColor((int)con.phKeyForegroundColor, Desc2); }
public static void SetForegroundColor(int red, int green, int blue) { // Desc2 PhotoshopTypeLibrary.IActionDescriptor Desc2 = ColorAPI.CreateRGBColorDescriptor(red, green, blue); ColorAPI.__SetAppColor((int)con.phKeyForegroundColor, Desc2); }
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 PhotoshopTypeLibrary.IActionDescriptor CreateRGBColorDescriptor(System.Drawing.Color c1) { return(ColorAPI.CreateRGBColorDescriptor(c1.R, c1.G, c1.B)); }
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]); }