A Pango::Color is used to represent a color in an uncalibrated RGB colorspace.
More...
#include <pangomm/color.h>
|
static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system.
|
|
A Pango::Color is used to represent a color in an uncalibrated RGB colorspace.
◆ Color() [1/4]
◆ Color() [2/4]
Pango::Color::Color |
( |
Color && | other | ) |
|
|
noexcept |
◆ Color() [3/4]
◆ Color() [4/4]
Pango::Color::Color |
( |
const PangoColor * | gobject | ) |
|
|
explicit |
◆ get_blue()
guint16 Pango::Color::get_blue |
( |
| ) |
const |
Gets the blue component of the color.
- Returns
- The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
◆ get_green()
guint16 Pango::Color::get_green |
( |
| ) |
const |
Gets the green component of the color.
- Returns
- The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
◆ get_red()
guint16 Pango::Color::get_red |
( |
| ) |
const |
Gets the red component of the color.
- Returns
- The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
◆ get_type()
Get the GType for this class, for use with the underlying GObject type system.
◆ gobj() [1/2]
PangoColor * Pango::Color::gobj |
( |
| ) |
|
|
inline |
Provides access to the underlying C instance.
◆ gobj() [2/2]
const PangoColor * Pango::Color::gobj |
( |
| ) |
const |
|
inline |
Provides access to the underlying C instance.
◆ operator bool()
Pango::Color::operator bool |
( |
| ) |
const |
|
explicit |
Tests whether the Color is valid.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ parse()
Fill in the fields of a color from a string specification.
The string can either one of a large set of standard names. (Taken from the X11 <filename>rgb.txt</filename> file), or it can be a hex value in the form 'rgb' 'rrggbb' 'rrrgggbbb' or 'rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is 'fff' 'ffffff' 'fffffffff' and 'ffffffffffff')
- Parameters
-
spec | A string specifying the new color. |
- Returns
true
if parsing of the specifier succeeded, otherwise false
.
◆ set_blue()
Sets the blue component of the color.
- Parameters
-
value | The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity. |
◆ set_green()
Sets the green component of the color.
- Parameters
-
value | The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity. |
◆ set_red()
Sets the red component of the color.
- Parameters
-
value | The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity. |
◆ to_string()
Returns a textual specification of color.
The string is in the hexadecimal form #rrrrggggbbbb
, where r
, g
and b
are hex digits representing the red, green, and blue components respectively.
- Since pangomm 1.16
- Returns
- A newly-allocated text string that must be freed with Glib::free().
◆ wrap() [1/2]
- Parameters
-
- Returns
- A C++ instance that wraps this C instance.
◆ wrap() [2/2]
- Parameters
-
- Returns
- A C++ instance that wraps this C instance.
◆ gobject_
PangoColor Pango::Color::gobject_ |
|
protected |