Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
   /// <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);
   }
Esempio n. 3
0
 public Color(IAColor c) : this(c.R, c.G, c.B, c.A) { }
Esempio n. 4
0
 public Color(IAColor c) : this(c.R, c.G, c.B, c.A)
 {
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 public override void ColorChanged(IAColor col, bool ButtonUp)
 {
    this.color = col;
 }