Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Colors::Space::Component Struct Reference

#include <components.h>

Public Member Functions

 Component (Type type, unsigned int index, std::string id, std::string name, std::string tip, Unit unit=Unit::EightBit)
 
 Component (std::string id, std::string name, std::string tip, Unit unit=Unit::EightBit)
 
double normalize (double value) const
 Clamp the value to between 0.0 and 1.0, except for hue which is wrapped around.
 

Public Attributes

Type type
 
unsigned int index
 
std::string id
 
std::string name
 
std::string tip
 
unsigned scale
 
Unit unit = Unit::EightBit
 

Detailed Description

Definition at line 50 of file components.h.

Constructor & Destructor Documentation

◆ Component() [1/2]

Inkscape::Colors::Space::Component::Component ( Type  type,
unsigned int  index,
std::string  id,
std::string  name,
std::string  tip,
Unit  unit = Unit::EightBit 
)

◆ Component() [2/2]

Inkscape::Colors::Space::Component::Component ( std::string  id,
std::string  name,
std::string  tip,
Unit  unit = Unit::EightBit 
)

Definition at line 205 of file components.cpp.

Member Function Documentation

◆ normalize()

double Inkscape::Colors::Space::Component::normalize ( double  value) const

Clamp the value to between 0.0 and 1.0, except for hue which is wrapped around.

Definition at line 212 of file components.cpp.

References Inkscape::Colors::Space::Degree, and unit.

Member Data Documentation

◆ id

std::string Inkscape::Colors::Space::Component::id

Definition at line 57 of file components.h.

Referenced by Inkscape::UI::Widget::ColorSlider::draw_func().

◆ index

unsigned int Inkscape::Colors::Space::Component::index

Definition at line 56 of file components.h.

Referenced by Inkscape::UI::Widget::ColorSlider::draw_func().

◆ name

std::string Inkscape::Colors::Space::Component::name

Definition at line 58 of file components.h.

◆ scale

unsigned Inkscape::Colors::Space::Component::scale

◆ tip

std::string Inkscape::Colors::Space::Component::tip

Definition at line 59 of file components.h.

◆ type

Type Inkscape::Colors::Space::Component::type

◆ unit

Unit Inkscape::Colors::Space::Component::unit = Unit::EightBit

Definition at line 61 of file components.h.

Referenced by Component(), and normalize().


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