RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::DrawColour Struct Reference

#include <MolDraw2DHelpers.h>

Public Member Functions

 DrawColour ()=default
 
 DrawColour (double r, double g, double b, double a=1.0)
 
bool operator== (const DrawColour &other) const
 
bool operator!= (const DrawColour &other) const
 
bool feq (const DrawColour &other, double tol=0.001, bool ignoreAlpha=true) const
 
DrawColour operator+ (const DrawColour &other) const
 
DrawColour operator- (const DrawColour &other) const
 
DrawColour operator/ (double v) const
 
DrawColour operator* (double v) const
 

Public Attributes

double r = 0.0
 
double g = 0.0
 
double b = 0.0
 
double a = 1.0
 

Detailed Description

Definition at line 29 of file MolDraw2DHelpers.h.

Constructor & Destructor Documentation

◆ DrawColour() [1/2]

RDKit::DrawColour::DrawColour ( )
default

◆ DrawColour() [2/2]

RDKit::DrawColour::DrawColour ( double r,
double g,
double b,
double a = 1.0 )
inline

Definition at line 32 of file MolDraw2DHelpers.h.

Member Function Documentation

◆ feq()

bool RDKit::DrawColour::feq ( const DrawColour & other,
double tol = 0.001,
bool ignoreAlpha = true ) const
inline

Definition at line 38 of file MolDraw2DHelpers.h.

References a, b, g, r, and RDKit::rdvalue_is().

◆ operator!=()

bool RDKit::DrawColour::operator!= ( const DrawColour & other) const
inline

Definition at line 37 of file MolDraw2DHelpers.h.

References RDKit::rdvalue_is().

◆ operator*()

DrawColour RDKit::DrawColour::operator* ( double v) const
inline

Definition at line 54 of file MolDraw2DHelpers.h.

References a, b, g, and r.

◆ operator+()

DrawColour RDKit::DrawColour::operator+ ( const DrawColour & other) const
inline

Definition at line 44 of file MolDraw2DHelpers.h.

References a, b, g, r, and RDKit::rdvalue_is().

◆ operator-()

DrawColour RDKit::DrawColour::operator- ( const DrawColour & other) const
inline

Definition at line 47 of file MolDraw2DHelpers.h.

References a, b, g, r, and RDKit::rdvalue_is().

◆ operator/()

DrawColour RDKit::DrawColour::operator/ ( double v) const
inline

Definition at line 50 of file MolDraw2DHelpers.h.

References a, b, g, PRECONDITION, and r.

◆ operator==()

bool RDKit::DrawColour::operator== ( const DrawColour & other) const
inline

Definition at line 34 of file MolDraw2DHelpers.h.

References a, b, g, r, and RDKit::rdvalue_is().

Member Data Documentation

◆ a

double RDKit::DrawColour::a = 1.0

Definition at line 30 of file MolDraw2DHelpers.h.

Referenced by feq(), operator*(), operator+(), operator-(), operator/(), and operator==().

◆ b

double RDKit::DrawColour::b = 0.0

Definition at line 30 of file MolDraw2DHelpers.h.

Referenced by feq(), operator*(), operator+(), operator-(), operator/(), and operator==().

◆ g

double RDKit::DrawColour::g = 0.0

Definition at line 30 of file MolDraw2DHelpers.h.

Referenced by feq(), operator*(), operator+(), operator-(), operator/(), and operator==().

◆ r

double RDKit::DrawColour::r = 0.0

Definition at line 30 of file MolDraw2DHelpers.h.

Referenced by feq(), operator*(), operator+(), operator-(), operator/(), and operator==().


The documentation for this struct was generated from the following file: