Rhino C++ API  7.26
Public Member Functions | Static Public Attributes | List of all members
ON_4fColor Class Reference

#include <opennurbs_color.h>

Public Member Functions

 ON_4fColor ()
 
 ON_4fColor (const ON_4fColor &)=default
 
 ON_4fColor (const ON_Color &)
 Note that this function will set the alpha correctly from ON_Color's 'inverted' alpha. More...
 
 ON_4fColor (float r, float g, float b, float a)
 
 ~ON_4fColor ()=default
 
float Alpha (void) const
 Alpha in ON_4fColor is OPACITY, not transparency as in ON_Color. More...
 
float Blue (void) const
 
int Compare (const ON_4fColor &other) const
 Returns: < 0 if (this < other), 0 if (this == other), > 0 if (this > other). More...
 
float Green (void) const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const
 
 operator ON_Color (void) const
 Will invert the opacity alpha to transparency. More...
 
bool operator!= (const ON_4fColor &)
 
ON_4fColoroperator= (const ON_4fColor &)=default
 
ON_4fColoroperator= (const ON_Color &)
 
bool operator== (const ON_4fColor &)
 
float Red (void) const
 
void SetAlpha (float a)
 
void SetBlue (float b)
 
void SetGreen (float g)
 
void SetRed (float r)
 
void SetRGBA (float r, float g, float b, float a)
 

Static Public Attributes

static const ON_4fColor Unset
 

Constructor & Destructor Documentation

◆ ON_4fColor() [1/4]

ON_4fColor::ON_4fColor ( )

◆ ~ON_4fColor()

ON_4fColor::~ON_4fColor ( )
default

◆ ON_4fColor() [2/4]

ON_4fColor::ON_4fColor ( float  r,
float  g,
float  b,
float  a 
)

◆ ON_4fColor() [3/4]

ON_4fColor::ON_4fColor ( const ON_4fColor )
default

◆ ON_4fColor() [4/4]

ON_4fColor::ON_4fColor ( const ON_Color )

Note that this function will set the alpha correctly from ON_Color's 'inverted' alpha.

Member Function Documentation

◆ Alpha()

float ON_4fColor::Alpha ( void  ) const

Alpha in ON_4fColor is OPACITY, not transparency as in ON_Color.

◆ Blue()

float ON_4fColor::Blue ( void  ) const

◆ Compare()

int ON_4fColor::Compare ( const ON_4fColor other) const

Returns: < 0 if (this < other), 0 if (this == other), > 0 if (this > other).

◆ Green()

float ON_4fColor::Green ( void  ) const

◆ IsValid()

bool ON_4fColor::IsValid ( class ON_TextLog text_log = nullptr) const

◆ operator ON_Color()

ON_4fColor::operator ON_Color ( void  ) const

Will invert the opacity alpha to transparency.

◆ operator!=()

bool ON_4fColor::operator!= ( const ON_4fColor )

◆ operator=() [1/2]

ON_4fColor& ON_4fColor::operator= ( const ON_4fColor )
default

◆ operator=() [2/2]

ON_4fColor& ON_4fColor::operator= ( const ON_Color )

◆ operator==()

bool ON_4fColor::operator== ( const ON_4fColor )

◆ Red()

float ON_4fColor::Red ( void  ) const

◆ SetAlpha()

void ON_4fColor::SetAlpha ( float  a)

◆ SetBlue()

void ON_4fColor::SetBlue ( float  b)

◆ SetGreen()

void ON_4fColor::SetGreen ( float  g)

◆ SetRed()

void ON_4fColor::SetRed ( float  r)

◆ SetRGBA()

void ON_4fColor::SetRGBA ( float  r,
float  g,
float  b,
float  a 
)

Member Data Documentation

◆ Unset

const ON_4fColor ON_4fColor::Unset
static