Back to index

salome-gui  6.5.0
Functions
Style_Model.cxx File Reference
#include "Style_Model.h"
#include "Style_Salome.h"
#include <QtxResourceMgr.h>
#include <QApplication>
#include <QColor>
#include <QFont>
#include <QPalette>

Go to the source code of this file.

Functions

static QColor mixColors (const QColor &c1, const QColor &c2)
 Mix two colors to get color with averaged red, green, blue and alpha-channel values.

Function Documentation

static QColor mixColors ( const QColor &  c1,
const QColor &  c2 
) [static]

Mix two colors to get color with averaged red, green, blue and alpha-channel values.

Parameters:
c1first color
c2second color
Returns:
averaged color

Definition at line 40 of file Style_Model.cxx.

{
  return QColor( (c1.red()   + c2.red() )   / 2,
                 (c1.green() + c2.green() ) / 2,
                 (c1.blue()  + c2.blue() )  / 2,
                 (c1.alpha() + c2.alpha() ) / 2 );
}