zoukankan      html  css  js  c++  java
  • RGBColor类定义

    这个类主要是颜色操作,操作详细原理如下图:

    类声明:

    class RGBColor {
    public:
    	RGBColor();
    	~RGBColor();
    	RGBColor(ldouble a);
    	RGBColor(ldouble red, ldouble green, ldouble blue);
    	RGBColor(const RGBColor& c);
    	RGBColor operator+(const RGBColor& c) const;
    	RGBColor& operator+=(const RGBColor& c);
    	RGBColor operator*(const ldouble a) const;
    	RGBColor& operator*=(const ldouble a);
    	RGBColor operator/(const ldouble f) const;
    	RGBColor& operator/=(const ldouble f);
    	RGBColor operator*(const RGBColor& c) const;
    	RGBColor& operator=(const RGBColor& c);
    	bool operator==(const RGBColor& c) const;
    	bool operator!=(const RGBColor& c) const;
    	RGBColor powc(ldouble p) const;
    	ldouble average() const;
    	friend std::ostream& operator<<(std::ostream& os, const RGBColor& c);
    	friend std::istream& operator>>(std::istream& is, RGBColor& c);
    	ldouble r, g, b;
    };
    

     

  • 相关阅读:
    Java常见异常处理情况
    动手动脑总结
    动手动脑 总结
    二柱子测试三
    动手动脑总结
    动手动脑总结
    Docker同步IDEA
    UISlider
    Docker 部署 uwsgi+nginx + django
    UITableView 九宫格
  • 原文地址:https://www.cnblogs.com/dalgleish/p/12602721.html
Copyright © 2011-2022 走看看