Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::Colors::Space::HSL Class Reference

#include <hsl.h>

Inheritance diagram for Inkscape::Colors::Space::HSL:
Inkscape::Colors::Space::RGB Inkscape::Colors::Space::AnySpace

Classes

class  Parser
 

Public Member Functions

 HSL ()=default
 
 ~HSL () override=default
 
Type getType () const override
 
std::string const getName () const override
 
std::string const getIcon () const override
 
- Public Member Functions inherited from Inkscape::Colors::Space::RGB
 RGB ()=default
 
 ~RGB () override=default
 
Type getType () const override
 
std::string const getName () const override
 
std::string const getIcon () const override
 
unsigned int getComponentCount () const override
 
std::shared_ptr< Colors::CMS::Profile > const getProfile () const override
 Return the RGB color profile, this is static for all RGB sub-types.
 
- Public Member Functions inherited from Inkscape::Colors::Space::AnySpace
virtual ~AnySpace ()=default
 
bool operator== (AnySpace const &other) const
 
bool operator!= (AnySpace const &other) const
 
virtual Type getComponentType () const
 
virtual RenderingIntent getIntent () const
 
Components const & getComponents (bool alpha=false) const
 Return a list of Component objects, in order of the channels in this color space.
 
std::string const getPrefsPath () const
 
virtual bool isValid () const
 

Protected Member Functions

std::string toString (std::vector< double > const &values, bool opacity=true) const override
 Print the HSL color to a CSS string.
 
void spaceToProfile (std::vector< double > &output) const override
 Convert the HSL color into sRGB components used in the sRGB icc profile.
 
void profileToSpace (std::vector< double > &output) const override
 Convert from sRGB icc values to HSL values.
 
- Protected Member Functions inherited from Inkscape::Colors::Space::RGB
std::string toString (std::vector< double > const &values, bool opacity=true) const override
 Print the RGB color to a CSS Hex code of 6 or 8 digits.
 
uint32_t toRGBA (std::vector< double > const &values, double opacity=1.0) const override
 Convert the color into an RGBA32 for use within Gdk rendering.
 
- Protected Member Functions inherited from Inkscape::Colors::Space::AnySpace
 AnySpace ()
 
bool isValidData (std::vector< double > const &values) const
 Return true if the given data would be valid for this color space.
 
virtual std::vector< ParsergetParsers () const
 
bool convert (std::vector< double > &io, std::shared_ptr< AnySpace > to_space) const
 In place conversion of a color object to the given space.
 
bool profileToProfile (std::vector< double > &io, std::shared_ptr< AnySpace > to_space) const
 Step two in coverting a color, convert it's profile to another profile (if needed)
 
virtual bool overInk (std::vector< double > const &input) const
 
bool outOfGamut (std::vector< double > const &input, std::shared_ptr< AnySpace > to_space) const
 Return true if the color would be out of gamut in the target color space.
 

Friends

class Inkscape::Colors::Color
 

Additional Inherited Members

- Protected Attributes inherited from Inkscape::Colors::Space::AnySpace
std::shared_ptr< Colors::CMS::Profilesrgb_profile
 

Detailed Description

Definition at line 18 of file hsl.h.

Constructor & Destructor Documentation

◆ HSL()

Inkscape::Colors::Space::HSL::HSL ( )
default

◆ ~HSL()

Inkscape::Colors::Space::HSL::~HSL ( )
overridedefault

Member Function Documentation

◆ getIcon()

std::string const Inkscape::Colors::Space::HSL::getIcon ( ) const
inlineoverridevirtual

Implements Inkscape::Colors::Space::AnySpace.

Definition at line 26 of file hsl.h.

◆ getName()

std::string const Inkscape::Colors::Space::HSL::getName ( ) const
inlineoverridevirtual

Implements Inkscape::Colors::Space::AnySpace.

Definition at line 25 of file hsl.h.

◆ getType()

Type Inkscape::Colors::Space::HSL::getType ( ) const
inlineoverridevirtual

Implements Inkscape::Colors::Space::AnySpace.

Definition at line 24 of file hsl.h.

References Inkscape::Colors::Space::HSL.

◆ profileToSpace()

void Inkscape::Colors::Space::HSL::profileToSpace ( std::vector< double > &  output) const
overrideprotectedvirtual

Convert from sRGB icc values to HSL values.

Reimplemented from Inkscape::Colors::Space::AnySpace.

Definition at line 65 of file hsl.cpp.

References delta.

◆ spaceToProfile()

void Inkscape::Colors::Space::HSL::spaceToProfile ( std::vector< double > &  output) const
overrideprotectedvirtual

Convert the HSL color into sRGB components used in the sRGB icc profile.

Reimplemented from Inkscape::Colors::Space::AnySpace.

Definition at line 37 of file hsl.cpp.

References Inkscape::Colors::Space::hue_2_rgb().

◆ toString()

std::string Inkscape::Colors::Space::HSL::toString ( std::vector< double > const &  values,
bool  opacity = true 
) const
overrideprotectedvirtual

Print the HSL color to a CSS string.

  • values - A vector of doubles for each channel in the HSL space
  • opacity - True if the opacity should be included in the output.

Implements Inkscape::Colors::Space::AnySpace.

Definition at line 110 of file hsl.cpp.

Friends And Related Symbol Documentation

◆ Inkscape::Colors::Color

friend class Inkscape::Colors::Color
friend

Definition at line 29 of file hsl.h.


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