public static Color GetColor(IAColor color) { switch (color) { case IAColor.BLACK: return(new Color(0.1f, 0.2f, 0.1f)); case IAColor.WHITE: return(new Color(0.9f, 0.9f, 0.9f)); case IAColor.RED: return(new Color(1.0f, 0.6f, 0.4f)); case IAColor.GREEN: return(new Color(0.6f, 1.0f, 0.4f)); case IAColor.BLUE: return(new Color(0.4f, 0.6f, 1.0f)); case IAColor.YELLOW: return(new Color(1.0f, 1.0f, 0.2f)); default: case IAColor.ORANGE: return(new Color(0.8f, 0.8f, 0.2f)); case IAColor.PURPLE: return(new Color(1.0f, 0.6f, 0.8f)); } }
/// <summary> /// Converts an Autodesk.Max.IAColor struct to a System.Drawing.Color struct. /// </summary> public static Color FromMaxColor(IAColor color) { Throw.IfNull(color, "color"); return Color.FromArgb((int)color.ToRGB); }
public Color(IAColor c) : this(c.R, c.G, c.B, c.A) { }
public TestCallback(IEnumerable<IMaxNode> nodes, IAColor initialColor, Action<IEnumerable<IMaxNode>, Color> previewChange, Action<IEnumerable<IMaxNode>, Color> commitChange) { this.nodes = nodes; this.initialColor = initialColor; this.color = initialColor; this.previewChange = previewChange; this.commitChange = commitChange; }
public override void ColorChanged(IAColor col, bool ButtonUp) { this.color = col; }