2#ifndef _aspose_system_drawing_color_h_
3#define _aspose_system_drawing_color_h_
5#include <system/string.h>
6#include <system/boxed_value.h>
7#include <drawing/known_color.h>
11#define ARGB_ALPHA_SHIFT 24
13#define ARGB_RED_SHIFT 16
15#define ARGB_GREEN_SHIFT 8
17#define ARGB_BLUE_SHIFT 0
19namespace System {
namespace Drawing {
23class ASPOSECPP_SHARED_CLASS
Color
29 inline int ToArgb()
const {
return m_argb; }
51 static ASPOSECPP_SHARED_API
Color FromArgb(
int alpha,
int red,
int green,
int blue);
57 static ASPOSECPP_SHARED_API
Color FromArgb(
int red,
int green,
int blue);
358 ASPOSECPP_SHARED_API
int get_R()
const;
360 ASPOSECPP_SHARED_API
int get_G()
const;
362 ASPOSECPP_SHARED_API
int get_B()
const;
364 ASPOSECPP_SHARED_API
int get_A()
const;
382 bool operator==(
const std::nullptr_t &r)
const { ASPOSE_UNUSED(r);
return false; };
384 bool operator!=(
const std::nullptr_t &r)
const { ASPOSE_UNUSED(r);
return true; };
409 Color(
int alpha,
int red,
int green,
int blue);
450 template<>
struct IsBoxable<Drawing::Color> : std::true_type {};
454 class BoxedValue<
System::Drawing::Color> :
public DefaultBoxedValue<System::Drawing::Color>
460 : DefaultBoxedValue<
System::Drawing::Color>(value)
471 class hash<
System::Drawing::Color>
477 typedef std::size_t result_type;
481 result_type operator () (
const argument_type &color)
const
BoxedValue(const T &value)
Constructs an object that represents the specified value boxed.
Definition: boxed_value.h:192
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:24
static Color get_Brown()
Returns a color whose ARGB value in hexadecimal notation is #FFA52A2A.
static Color get_Chocolate()
Returns a color whose ARGB value in hexadecimal notation is #FFD2691E.
static Color get_LimeGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF32CD32.
static Color get_DarkViolet()
Returns a color whose ARGB value in hexadecimal notation is #FF9400D3.
static Color get_PaleVioletRed()
Returns a color whose ARGB value in hexadecimal notation is #FFDB7093.
static Color get_DarkGray()
Returns a color whose ARGB value in hexadecimal notation is #FFA9A9A9.
static Color get_LightSteelBlue()
Returns a color whose ARGB value in hexadecimal notation is #FFB0C4DE.
static Color get_BurlyWood()
Returns a color whose ARGB value in hexadecimal notation is #FFDEB887.
static Color get_DarkSeaGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF8FBC8F.
bool operator!=(const Color &r) const
Determines if the current and the specified Color objects represent distinct colors.
static Color get_LemonChiffon()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFACD.
int get_R() const
Returns the value of the red component of the color represented by the current object.
static Color get_GreenYellow()
Returns a color whose ARGB value in hexadecimal notation is #FFADFF2F.
static Color get_LightYellow()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFFE0.
static Color get_DarkRed()
Returns a color whose ARGB value in hexadecimal notation is #FF8B0000.
static Color get_White()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFFFF.
static Color get_Red()
Returns a color whose ARGB value in hexadecimal notation is #FFFF0000.
int get_G() const
Returns the value of the green component of the color represented by the current object.
static Color get_OldLace()
Returns a color whose ARGB value in hexadecimal notation is #FFFDF5E6.
static Color get_MediumTurquoise()
Returns a color whose ARGB value in hexadecimal notation is #FF48D1CC.
static Color get_LightSeaGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF20B2AA.
static Color get_Pink()
Returns a color whose ARGB value in hexadecimal notation is #FFFFC0CB.
static Color get_Violet()
Returns a color whose ARGB value in hexadecimal notation is #FFEE82EE.
static Color get_DarkSalmon()
Returns a color whose ARGB value in hexadecimal notation is #FFE9967A.
static Color get_Peru()
Returns a color whose ARGB value in hexadecimal notation is #FFCD853F.
static Color get_ForestGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF228B22.
static Color get_Olive()
Returns a color whose ARGB value in hexadecimal notation is #FF808000.
static Color get_Azure()
Returns a color whose ARGB value in hexadecimal notation is #FFF0FFFF.
int get_A() const
Returns the value of the alpha component of the color represented by the current object.
static Color get_DarkOrange()
Returns a color whose ARGB value in hexadecimal notation is #FFFF8C00.
static Color get_LightSalmon()
Returns a color whose ARGB value in hexadecimal notation is #FFFFA07A.
static Color get_DeepPink()
Returns a color whose ARGB value in hexadecimal notation is #FFFF1493.
static Color get_DeepSkyBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF00BFFF.
static Color get_PaleTurquoise()
Returns a color whose ARGB value in hexadecimal notation is #FFAFEEEE.
static Color get_AntiqueWhite()
Returns a color whose ARGB value in hexadecimal notation is #FFFAEBD7.
static Color get_SteelBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF4682B4.
static Color get_RoyalBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF4169E1.
Color()
Constructs an "empty" instance of Color class that does not represent any color.
static const Color Empty
An "empty" instance of Color class i.e. an instance that does not represent any color.
Definition: color.h:38
static Color get_Maroon()
Returns a color whose ARGB value in hexadecimal notation is #FF800000.
static Color get_PeachPuff()
Returns a color whose ARGB value in hexadecimal notation is #FFFFDAB9.
bool operator==(const Color &r) const
Determines if the current and the specified Color objects represent the same color.
String get_Name() const
Returns the name of the color represented by the current object.
static Color get_PaleGoldenrod()
Returns a color whose ARGB value in hexadecimal notation is #FFEEE8AA.
static Color FromArgb(int alpha, int red, int green, int blue)
Constructs an instance of Color class that reprsents the specfied color.
static Color get_BlanchedAlmond()
Returns a color whose ARGB value in hexadecimal notation is #FFFFEBCD.
static Color get_Firebrick()
Returns a color whose ARGB value in hexadecimal notation is #FFB22222.
static Color get_LightCyan()
Returns a color whose ARGB value in hexadecimal notation is #FFE0FFFF.
static Color get_Sienna()
Returns a color whose ARGB value in hexadecimal notation is #FFA0522D.
static Color get_Tomato()
Returns a color whose ARGB value in hexadecimal notation is #FFFF6347.
static Color get_DodgerBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF1E90FF.
static Color get_LightSlateGray()
Returns a color whose ARGB value in hexadecimal notation is #FF778899.
static Color get_Goldenrod()
Returns a color whose ARGB value in hexadecimal notation is #FFDAA520.
static Color FromName(const String &name)
Constructs an instance of Color class that represents a color with the specified name.
static Color get_Cornsilk()
Returns a color whose ARGB value in hexadecimal notation is #FFFFF8DC.
static Color get_Aqua()
Returns a color whose ARGB value in hexadecimal notation is #FF00FFFF.
static Color get_DarkMagenta()
Returns a color whose ARGB value in hexadecimal notation is #FF8B008B.
static Color get_SlateBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF6A5ACD.
static Color get_SeaShell()
Returns a color whose ARGB value in hexadecimal notation is #FFFFF5EE.
static Color get_DarkSlateBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF483D8B.
static Color get_SkyBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF87CEEB.
static Color get_LightGoldenrodYellow()
Returns a color whose ARGB value in hexadecimal notation is #FFFAFAD2.
static Color get_Thistle()
Returns a color whose ARGB value in hexadecimal notation is #FFD8BFD8.
static Color get_DarkKhaki()
Returns a color whose ARGB value in hexadecimal notation is #FFBDB76B.
static Color get_DarkCyan()
Returns a color whose ARGB value in hexadecimal notation is #FF008B8B.
float GetHue()
Returns the Hue-Saturation-Brightness (HSB) hue value, in degrees, for the color reprsented by the cu...
static Color get_WhiteSmoke()
Returns a color whose ARGB value in hexadecimal notation is #FFF5F5F5.
static Color get_LightGray()
Returns a color whose ARGB value in hexadecimal notation is #FFD3D3D3.
static Color get_Green()
Returns a color whose ARGB value in hexadecimal notation is #FF008000.
static Color get_CadetBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF5F9EA0.
static Color get_Black()
Returns a color whose ARGB value in hexadecimal notation is #FF000000.
static Color get_DarkGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF006400.
static Color get_Silver()
Returns a color whose ARGB value in hexadecimal notation is #FFC0C0C0.
int ToArgb() const
Returns a 32-bit ARGB value of the color represented by the current object.
Definition: color.h:29
static Color get_MediumSlateBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF7B68EE.
static Color FromKnownColor(KnownColor kc)
Constructs an instance of Color class that represents the specified known color.
float GetSaturation()
Returns the Hue-Saturation-Brightness (HSB) saturation for the color reprsented by the current object...
static Color get_SandyBrown()
Returns a color whose ARGB value in hexadecimal notation is #FFF4A460.
static Color get_NavajoWhite()
Returns a color whose ARGB value in hexadecimal notation is #FFFFDEAD.
static Color get_Teal()
Returns a color whose ARGB value in hexadecimal notation is #FF008080.
static Color get_MediumOrchid()
Returns a color whose ARGB value in hexadecimal notation is #FFBA55D3.
static Color get_MediumPurple()
Returns a color whose ARGB value in hexadecimal notation is #FF9370DB.
static Color get_MidnightBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF191970.
static Color get_Lime()
Returns a color whose ARGB value in hexadecimal notation is #FF00FF00.
static Color get_LightPink()
Returns a color whose ARGB value in hexadecimal notation is #FFFFB6C1.
static Color get_Gainsboro()
Returns a color whose ARGB value in hexadecimal notation is #FFDCDCDC.
static Color get_Orange()
Returns a color whose ARGB value in hexadecimal notation is #FFFFA500.
static Color get_SaddleBrown()
Returns a color whose ARGB value in hexadecimal notation is #FF8B4513.
static Color get_MediumAquamarine()
Returns a color whose ARGB value in hexadecimal notation is #FF66CDAA.
static Color get_Salmon()
Returns a color whose ARGB value in hexadecimal notation is #FFFA8072.
static Color get_Indigo()
Returns a color whose ARGB value in hexadecimal notation is #FF4B0082.
static Color get_Crimson()
Returns a color whose ARGB value in hexadecimal notation is #FFDC143C.
bool IsNull() const
Always returns false.
Definition: color.h:380
static Color get_Coral()
Returns a color whose ARGB value in hexadecimal notation is #FFFF7F50.
static Color get_PaleGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF98FB98.
static Color get_PapayaWhip()
Returns a color whose ARGB value in hexadecimal notation is #FFFFEFD5.
static Color get_Aquamarine()
Returns a color whose ARGB value in hexadecimal notation is #FF7FFFD4.
static Color get_IndianRed()
Returns a color whose ARGB value in hexadecimal notation is #FFCD5C5C.
static Color get_MintCream()
Returns a color whose ARGB value in hexadecimal notation is #FFF5FFFA.
static Color get_Gold()
Returns a color whose ARGB value in hexadecimal notation is #FFFFD700.
static Color get_LightBlue()
Returns a color whose ARGB value in hexadecimal notation is #FFADD8E6.
static Color get_MediumVioletRed()
Returns a color whose ARGB value in hexadecimal notation is #FFC71585.
static Color get_SpringGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF00FF7F.
static Color get_Plum()
Returns a color whose ARGB value in hexadecimal notation is #FFDDA0DD.
static Color get_Purple()
Returns a color whose ARGB value in hexadecimal notation is #FF800080.
static Color get_RosyBrown()
Returns a color whose ARGB value in hexadecimal notation is #FFBC8F8F.
static Color get_DarkBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF00008B.
static Color get_Honeydew()
Returns a color whose ARGB value in hexadecimal notation is #FFF0FFF0.
static Color get_Lavender()
Returns a color whose ARGB value in hexadecimal notation is #FFE6E6FA.
int get_B() const
Returns the value of the blue component of the color represented by the current object.
static Color get_PowderBlue()
Returns a color whose ARGB value in hexadecimal notation is #FFB0E0E6.
bool Equals(const Color &color) const
Determines if the current and the specified Color objects represent the same color.
static Color get_Gray()
Returns a color whose ARGB value in hexadecimal notation is #FF808080.
static Color get_MistyRose()
Returns a color whose ARGB value in hexadecimal notation is #FFFFE4E1.
static Color get_Navy()
Returns a color whose ARGB value in hexadecimal notation is #FF000080.
static Color get_Wheat()
Returns a color whose ARGB value in hexadecimal notation is #FFF5DEB3.
String ToString() const
Returns the string representation of the current object.
static Color get_Beige()
Returns a color whose ARGB value in hexadecimal notation is #FFF5F5DC.
static Color get_Ivory()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFFF0.
static Color FromArgb(int alpha, Color base_color)
Constructs an instance of Color class that reprsents the specfied color.
bool operator==(const std::nullptr_t &r) const
Always returns false.
Definition: color.h:382
static Color get_Yellow()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFF00.
static Color get_Chartreuse()
Returns a color whose ARGB value in hexadecimal notation is #FF7FFF00.
static Color get_Blue()
Returns a color whose ARGB value in hexadecimal notation is #FF0000FF.
static Color get_LavenderBlush()
Returns a color whose ARGB value in hexadecimal notation is #FFFFF0F5.
static Color get_Bisque()
Returns a color whose ARGB value in hexadecimal notation is #FFFFE4C4.
static Color get_Moccasin()
Returns a color whose ARGB value in hexadecimal notation is #FFFFE4B5.
static Color get_DimGray()
Returns a color whose ARGB value in hexadecimal notation is #FF696969.
static Color get_Snow()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFAFA.
static Color get_DarkGoldenrod()
Returns a color whose ARGB value in hexadecimal notation is #FFB8860B.
static Color get_DarkSlateGray()
Returns a color whose ARGB value in hexadecimal notation is #FF2F4F4F.
static Color get_LightCoral()
Returns a color whose ARGB value in hexadecimal notation is #FFF08080.
static Color get_YellowGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF9ACD32.
static Color get_Turquoise()
Returns a color whose ARGB value in hexadecimal notation is #FF40E0D0.
static Color get_LightSkyBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF87CEFA.
static Color get_Fuchsia()
Returns a color whose ARGB value in hexadecimal notation is #FFFF00FF.
float GetBrightness()
Returns the brightness component of the color reprsented by the current object.
static Color get_BlueViolet()
Returns a color whose ARGB value in hexadecimal notation is #FF8A2BE2.
static Color get_MediumSeaGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF3CB371.
bool get_IsNamedColor() const
Returns a value that determines whether the Color structure represents a named color or a member of t...
static Color get_MediumSpringGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF00FA9A.
static Color FromArgb(int argb)
Constructs an instance of Color class that reprsents the specfied color.
static Color get_DarkTurquoise()
Returns a color whose ARGB value in hexadecimal notation is #FF00CED1.
static Color get_GhostWhite()
Returns a color whose ARGB value in hexadecimal notation is #FFF8F8FF.
static Color get_MediumBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF0000CD.
int GetHashCode() const
Returns the hash code of the current object.
bool get_IsEmpty() const
Returns a value that indicate if the current object is "empty" i.e. does not represent any color.
static Color get_HotPink()
Returns a color whose ARGB value in hexadecimal notation is #FFFF69B4.
static Color get_OrangeRed()
Returns a color whose ARGB value in hexadecimal notation is #FFFF4500.
static Color get_Tan()
Returns a color whose ARGB value in hexadecimal notation is #FFD2B48C.
static Color get_LightGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF90EE90.
static Color get_Khaki()
Returns a color whose ARGB value in hexadecimal notation is #FFF0E68C.
static Color get_OliveDrab()
Returns a color whose ARGB value in hexadecimal notation is #FF6B8E23.
static Color get_Magenta()
Returns a color whose ARGB value in hexadecimal notation is #FFFF00FF.
static Color get_SlateGray()
Returns a color whose ARGB value in hexadecimal notation is #FF708090.
static Color get_DarkOrchid()
Returns a color whose ARGB value in hexadecimal notation is #FF9932CC.
static Color get_LawnGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF7CFC00.
static Color get_Linen()
Returns a color whose ARGB value in hexadecimal notation is #FFFAF0E6.
static Color get_FloralWhite()
Returns a color whose ARGB value in hexadecimal notation is #FFFFFAF0.
static Color get_Cyan()
Returns a color whose ARGB value in hexadecimal notation is #FF00FFFF.
bool operator!=(const std::nullptr_t &r) const
Always returns true.
Definition: color.h:384
static Color get_DarkOliveGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF556B2F.
static Color get_Orchid()
Returns a color whose ARGB value in hexadecimal notation is #FFDA70D6.
static Color get_CornflowerBlue()
Returns a color whose ARGB value in hexadecimal notation is #FF6495ED.
static Color get_AliceBlue()
Returns a color whose ARGB value in hexadecimal notation is #FFF0F8FF.
static Color get_SeaGreen()
Returns a color whose ARGB value in hexadecimal notation is #FF2E8B57.
static Color get_Transparent()
Returns a color whose ARGB value in hexadecimal notation is #00FFFFFF.
static Color FromArgb(int red, int green, int blue)
Constructs an instance of Color class that reprsents the specfied color with alpha component set to 0...
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
KnownColor
Specifies the known system colors.
Definition: known_color.h:8
std::ostream & operator<<(std::ostream &stream, Color color)
Insert data into the stream using UTF-8 encoding.
Definition: color.h:427
Definition: db_command.h:9