From e9165ce89ab7d9b3ad059607a52767f462089f67 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 19 Jun 2012 16:55:09 +0200 Subject: [PATCH] Change color_ts structure un a class vertion of it --- Sources/libagg/agg-2.4/agg_curves.cpp | 2 +- .../libagg/agg-2.4/agg_trans_double_path.cpp | 4 +- Sources/libetk/etk/Color.cpp | 296 +++++++++--------- Sources/libetk/etk/Types.h | 22 ++ Sources/libewol/ewol/Texture.cpp | 4 +- Sources/libewol/ewol/widget/ButtonImage.cpp | 3 +- Sources/libewol/ewol/widget/ColorBar.cpp | 18 +- Sources/libewol/ewol/widget/Entry.cpp | 2 - .../libewol/ewol/widgetMeta/FileChooser.cpp | 2 +- tutorial.boo | 7 +- 10 files changed, 190 insertions(+), 170 deletions(-) diff --git a/Sources/libagg/agg-2.4/agg_curves.cpp b/Sources/libagg/agg-2.4/agg_curves.cpp index cb7a8d7a..1d05c640 100644 --- a/Sources/libagg/agg-2.4/agg_curves.cpp +++ b/Sources/libagg/agg-2.4/agg_curves.cpp @@ -253,7 +253,7 @@ namespace agg } //------------------------------------------------------------------------ - static double MSC60_fix_ICE(double v) { return v; } + //static double MSC60_fix_ICE(double v) { return v; } //------------------------------------------------------------------------ void curve4_inc::init(double x1, double y1, diff --git a/Sources/libagg/agg-2.4/agg_trans_double_path.cpp b/Sources/libagg/agg-2.4/agg_trans_double_path.cpp index cd40c7f5..d5692a9d 100644 --- a/Sources/libagg/agg-2.4/agg_trans_double_path.cpp +++ b/Sources/libagg/agg-2.4/agg_trans_double_path.cpp @@ -21,10 +21,10 @@ namespace agg //------------------------------------------------------------------------ trans_double_path::trans_double_path() : - m_kindex1(0.0), - m_kindex2(0.0), m_base_length(0.0), m_base_height(1.0), + m_kindex1(0.0), + m_kindex2(0.0), m_status1(initial), m_status2(initial), m_preserve_x_scale(true) diff --git a/Sources/libetk/etk/Color.cpp b/Sources/libetk/etk/Color.cpp index 276bfe06..a5400466 100644 --- a/Sources/libetk/etk/Color.cpp +++ b/Sources/libetk/etk/Color.cpp @@ -27,154 +27,154 @@ #include -const color_ts etk::color::color_none = {0x00, 0x00, 0x00, 0x00}; -const color_ts etk::color::color_AliceBlue = {0xF0, 0xF8, 0xFF, 0xFF}; -const color_ts etk::color::color_AntiqueWhite = {0xFA, 0xEB, 0xD7, 0xFF}; -const color_ts etk::color::color_Aqua = {0x00, 0xFF, 0xFF, 0xFF}; -const color_ts etk::color::color_Aquamarine = {0x7F, 0xFF, 0xD4, 0xFF}; -const color_ts etk::color::color_Azure = {0xF0, 0xFF, 0xFF, 0xFF}; -const color_ts etk::color::color_Beige = {0xF5, 0xF5, 0xDC, 0xFF}; -const color_ts etk::color::color_Bisque = {0xFF, 0xE4, 0xC4, 0xFF}; -const color_ts etk::color::color_Black = {0x00, 0x00, 0x00, 0xFF}; -const color_ts etk::color::color_BlanchedAlmond = {0xFF, 0xEB, 0xCD, 0xFF}; -const color_ts etk::color::color_Blue = {0x00, 0x00, 0xFF, 0xFF}; -const color_ts etk::color::color_BlueViolet = {0x8A, 0x2B, 0xE2, 0xFF}; -const color_ts etk::color::color_Brown = {0xA5, 0x2A, 0x2A, 0xFF}; -const color_ts etk::color::color_BurlyWood = {0xDE, 0xB8, 0x87, 0xFF}; -const color_ts etk::color::color_CadetBlue = {0x5F, 0x9E, 0xA0, 0xFF}; -const color_ts etk::color::color_Chartreuse = {0x7F, 0xFF, 0x00, 0xFF}; -const color_ts etk::color::color_Chocolate = {0xD2, 0x69, 0x1E, 0xFF}; -const color_ts etk::color::color_Coral = {0xFF, 0x7F, 0x50, 0xFF}; -const color_ts etk::color::color_CornflowerBlue = {0x64, 0x95, 0xED, 0xFF}; -const color_ts etk::color::color_Cornsilk = {0xFF, 0xF8, 0xDC, 0xFF}; -const color_ts etk::color::color_Crimson = {0xDC, 0x14, 0x3C, 0xFF}; -const color_ts etk::color::color_Cyan = {0x00, 0xFF, 0xFF, 0xFF}; -const color_ts etk::color::color_DarkBlue = {0x00, 0x00, 0x8B, 0xFF}; -const color_ts etk::color::color_DarkCyan = {0x00, 0x8B, 0x8B, 0xFF}; -const color_ts etk::color::color_DarkGoldenRod = {0xB8, 0x86, 0x0B, 0xFF}; -const color_ts etk::color::color_DarkGray = {0xA9, 0xA9, 0xA9, 0xFF}; -const color_ts etk::color::color_DarkGrey = {0xA9, 0xA9, 0xA9, 0xFF}; -const color_ts etk::color::color_DarkGreen = {0x00, 0x64, 0x00, 0xFF}; -const color_ts etk::color::color_DarkKhaki = {0xBD, 0xB7, 0x6B, 0xFF}; -const color_ts etk::color::color_DarkMagenta = {0x8B, 0x00, 0x8B, 0xFF}; -const color_ts etk::color::color_DarkOliveGreen = {0x55, 0x6B, 0x2F, 0xFF}; -const color_ts etk::color::color_Darkorange = {0xFF, 0x8C, 0x00, 0xFF}; -const color_ts etk::color::color_DarkOrchid = {0x99, 0x32, 0xCC, 0xFF}; -const color_ts etk::color::color_DarkRed = {0x8B, 0x00, 0x00, 0xFF}; -const color_ts etk::color::color_DarkSalmon = {0xE9, 0x96, 0x7A, 0xFF}; -const color_ts etk::color::color_DarkSeaGreen = {0x8F, 0xBC, 0x8F, 0xFF}; -const color_ts etk::color::color_DarkSlateBlue = {0x48, 0x3D, 0x8B, 0xFF}; -const color_ts etk::color::color_DarkSlateGray = {0x2F, 0x4F, 0x4F, 0xFF}; -const color_ts etk::color::color_DarkSlateGrey = {0x2F, 0x4F, 0x4F, 0xFF}; -const color_ts etk::color::color_DarkTurquoise = {0x00, 0xCE, 0xD1, 0xFF}; -const color_ts etk::color::color_DarkViolet = {0x94, 0x00, 0xD3, 0xFF}; -const color_ts etk::color::color_DeepPink = {0xFF, 0x14, 0x93, 0xFF}; -const color_ts etk::color::color_DeepSkyBlue = {0x00, 0xBF, 0xFF, 0xFF}; -const color_ts etk::color::color_DimGray = {0x69, 0x69, 0x69, 0xFF}; -const color_ts etk::color::color_DimGrey = {0x69, 0x69, 0x69, 0xFF}; -const color_ts etk::color::color_DodgerBlue = {0x1E, 0x90, 0xFF, 0xFF}; -const color_ts etk::color::color_FireBrick = {0xB2, 0x22, 0x22, 0xFF}; -const color_ts etk::color::color_FloralWhite = {0xFF, 0xFA, 0xF0, 0xFF}; -const color_ts etk::color::color_ForestGreen = {0x22, 0x8B, 0x22, 0xFF}; -const color_ts etk::color::color_Fuchsia = {0xFF, 0x00, 0xFF, 0xFF}; -const color_ts etk::color::color_Gainsboro = {0xDC, 0xDC, 0xDC, 0xFF}; -const color_ts etk::color::color_GhostWhite = {0xF8, 0xF8, 0xFF, 0xFF}; -const color_ts etk::color::color_Gold = {0xFF, 0xD7, 0x00, 0xFF}; -const color_ts etk::color::color_GoldenRod = {0xDA, 0xA5, 0x20, 0xFF}; -const color_ts etk::color::color_Gray = {0x80, 0x80, 0x80, 0xFF}; -const color_ts etk::color::color_Grey = {0x80, 0x80, 0x80, 0xFF}; -const color_ts etk::color::color_Green = {0x00, 0x80, 0x00, 0xFF}; -const color_ts etk::color::color_GreenYellow = {0xAD, 0xFF, 0x2F, 0xFF}; -const color_ts etk::color::color_HoneyDew = {0xF0, 0xFF, 0xF0, 0xFF}; -const color_ts etk::color::color_HotPink = {0xFF, 0x69, 0xB4, 0xFF}; -const color_ts etk::color::color_IndianRed = {0xCD, 0x5C, 0x5C, 0xFF}; -const color_ts etk::color::color_Indigo = {0x4B, 0x00, 0x82, 0xFF}; -const color_ts etk::color::color_Ivory = {0xFF, 0xFF, 0xF0, 0xFF}; -const color_ts etk::color::color_Khaki = {0xF0, 0xE6, 0x8C, 0xFF}; -const color_ts etk::color::color_Lavender = {0xE6, 0xE6, 0xFA, 0xFF}; -const color_ts etk::color::color_LavenderBlush = {0xFF, 0xF0, 0xF5, 0xFF}; -const color_ts etk::color::color_LawnGreen = {0x7C, 0xFC, 0x00, 0xFF}; -const color_ts etk::color::color_LemonChiffon = {0xFF, 0xFA, 0xCD, 0xFF}; -const color_ts etk::color::color_LightBlue = {0xAD, 0xD8, 0xE6, 0xFF}; -const color_ts etk::color::color_LightCoral = {0xF0, 0x80, 0x80, 0xFF}; -const color_ts etk::color::color_LightCyan = {0xE0, 0xFF, 0xFF, 0xFF}; -const color_ts etk::color::color_LightGoldenRodYellow = {0xFA, 0xFA, 0xD2, 0xFF}; -const color_ts etk::color::color_LightGray = {0xD3, 0xD3, 0xD3, 0xFF}; -const color_ts etk::color::color_LightGrey = {0xD3, 0xD3, 0xD3, 0xFF}; -const color_ts etk::color::color_LightGreen = {0x90, 0xEE, 0x90, 0xFF}; -const color_ts etk::color::color_LightPink = {0xFF, 0xB6, 0xC1, 0xFF}; -const color_ts etk::color::color_LightSalmon = {0xFF, 0xA0, 0x7A, 0xFF}; -const color_ts etk::color::color_LightSeaGreen = {0x20, 0xB2, 0xAA, 0xFF}; -const color_ts etk::color::color_LightSkyBlue = {0x87, 0xCE, 0xFA, 0xFF}; -const color_ts etk::color::color_LightSlateGray = {0x77, 0x88, 0x99, 0xFF}; -const color_ts etk::color::color_LightSlateGrey = {0x77, 0x88, 0x99, 0xFF}; -const color_ts etk::color::color_LightSteelBlue = {0xB0, 0xC4, 0xDE, 0xFF}; -const color_ts etk::color::color_LightYellow = {0xFF, 0xFF, 0xE0, 0xFF}; -const color_ts etk::color::color_Lime = {0x00, 0xFF, 0x00, 0xFF}; -const color_ts etk::color::color_LimeGreen = {0x32, 0xCD, 0x32, 0xFF}; -const color_ts etk::color::color_Linen = {0xFA, 0xF0, 0xE6, 0xFF}; -const color_ts etk::color::color_Magenta = {0xFF, 0x00, 0xFF, 0xFF}; -const color_ts etk::color::color_Maroon = {0x80, 0x00, 0x00, 0xFF}; -const color_ts etk::color::color_MediumAquaMarine = {0x66, 0xCD, 0xAA, 0xFF}; -const color_ts etk::color::color_MediumBlue = {0x00, 0x00, 0xCD, 0xFF}; -const color_ts etk::color::color_MediumOrchid = {0xBA, 0x55, 0xD3, 0xFF}; -const color_ts etk::color::color_MediumPurple = {0x93, 0x70, 0xD8, 0xFF}; -const color_ts etk::color::color_MediumSeaGreen = {0x3C, 0xB3, 0x71, 0xFF}; -const color_ts etk::color::color_MediumSlateBlue = {0x7B, 0x68, 0xEE, 0xFF}; -const color_ts etk::color::color_MediumSpringGreen = {0x00, 0xFA, 0x9A, 0xFF}; -const color_ts etk::color::color_MediumTurquoise = {0x48, 0xD1, 0xCC, 0xFF}; -const color_ts etk::color::color_MediumVioletRed = {0xC7, 0x15, 0x85, 0xFF}; -const color_ts etk::color::color_MidnightBlue = {0x19, 0x19, 0x70, 0xFF}; -const color_ts etk::color::color_MintCream = {0xF5, 0xFF, 0xFA, 0xFF}; -const color_ts etk::color::color_MistyRose = {0xFF, 0xE4, 0xE1, 0xFF}; -const color_ts etk::color::color_Moccasin = {0xFF, 0xE4, 0xB5, 0xFF}; -const color_ts etk::color::color_NavajoWhite = {0xFF, 0xDE, 0xAD, 0xFF}; -const color_ts etk::color::color_Navy = {0x00, 0x00, 0x80, 0xFF}; -const color_ts etk::color::color_OldLace = {0xFD, 0xF5, 0xE6, 0xFF}; -const color_ts etk::color::color_Olive = {0x80, 0x80, 0x00, 0xFF}; -const color_ts etk::color::color_OliveDrab = {0x6B, 0x8E, 0x23, 0xFF}; -const color_ts etk::color::color_Orange = {0xFF, 0xA5, 0x00, 0xFF}; -const color_ts etk::color::color_OrangeRed = {0xFF, 0x45, 0x00, 0xFF}; -const color_ts etk::color::color_Orchid = {0xDA, 0x70, 0xD6, 0xFF}; -const color_ts etk::color::color_PaleGoldenRod = {0xEE, 0xE8, 0xAA, 0xFF}; -const color_ts etk::color::color_PaleGreen = {0x98, 0xFB, 0x98, 0xFF}; -const color_ts etk::color::color_PaleTurquoise = {0xAF, 0xEE, 0xEE, 0xFF}; -const color_ts etk::color::color_PaleVioletRed = {0xD8, 0x70, 0x93, 0xFF}; -const color_ts etk::color::color_PapayaWhip = {0xFF, 0xEF, 0xD5, 0xFF}; -const color_ts etk::color::color_PeachPuff = {0xFF, 0xDA, 0xB9, 0xFF}; -const color_ts etk::color::color_Peru = {0xCD, 0x85, 0x3F, 0xFF}; -const color_ts etk::color::color_Pink = {0xFF, 0xC0, 0xCB, 0xFF}; -const color_ts etk::color::color_Plum = {0xDD, 0xA0, 0xDD, 0xFF}; -const color_ts etk::color::color_PowderBlue = {0xB0, 0xE0, 0xE6, 0xFF}; -const color_ts etk::color::color_Purple = {0x80, 0x00, 0x80, 0xFF}; -const color_ts etk::color::color_Red = {0xFF, 0x00, 0x00, 0xFF}; -const color_ts etk::color::color_RosyBrown = {0xBC, 0x8F, 0x8F, 0xFF}; -const color_ts etk::color::color_RoyalBlue = {0x41, 0x69, 0xE1, 0xFF}; -const color_ts etk::color::color_SaddleBrown = {0x8B, 0x45, 0x13, 0xFF}; -const color_ts etk::color::color_Salmon = {0xFA, 0x80, 0x72, 0xFF}; -const color_ts etk::color::color_SandyBrown = {0xF4, 0xA4, 0x60, 0xFF}; -const color_ts etk::color::color_SeaGreen = {0x2E, 0x8B, 0x57, 0xFF}; -const color_ts etk::color::color_SeaShell = {0xFF, 0xF5, 0xEE, 0xFF}; -const color_ts etk::color::color_Sienna = {0xA0, 0x52, 0x2D, 0xFF}; -const color_ts etk::color::color_Silver = {0xC0, 0xC0, 0xC0, 0xFF}; -const color_ts etk::color::color_SkyBlue = {0x87, 0xCE, 0xEB, 0xFF}; -const color_ts etk::color::color_SlateBlue = {0x6A, 0x5A, 0xCD, 0xFF}; -const color_ts etk::color::color_SlateGray = {0x70, 0x80, 0x90, 0xFF}; -const color_ts etk::color::color_SlateGrey = {0x70, 0x80, 0x90, 0xFF}; -const color_ts etk::color::color_Snow = {0xFF, 0xFA, 0xFA, 0xFF}; -const color_ts etk::color::color_SpringGreen = {0x00, 0xFF, 0x7F, 0xFF}; -const color_ts etk::color::color_SteelBlue = {0x46, 0x82, 0xB4, 0xFF}; -const color_ts etk::color::color_Tan = {0xD2, 0xB4, 0x8C, 0xFF}; -const color_ts etk::color::color_Teal = {0x00, 0x80, 0x80, 0xFF}; -const color_ts etk::color::color_Thistle = {0xD8, 0xBF, 0xD8, 0xFF}; -const color_ts etk::color::color_Tomato = {0xFF, 0x63, 0x47, 0xFF}; -const color_ts etk::color::color_Turquoise = {0x40, 0xE0, 0xD0, 0xFF}; -const color_ts etk::color::color_Violet = {0xEE, 0x82, 0xEE, 0xFF}; -const color_ts etk::color::color_Wheat = {0xF5, 0xDE, 0xB3, 0xFF}; -const color_ts etk::color::color_White = {0xFF, 0xFF, 0xFF, 0xFF}; -const color_ts etk::color::color_WhiteSmoke = {0xF5, 0xF5, 0xF5, 0xFF}; -const color_ts etk::color::color_Yellow = {0xFF, 0xFF, 0x00, 0xFF}; -const color_ts etk::color::color_YellowGreen = {0x9A, 0xCD, 0x32, 0xFF}; +const color_ts etk::color::color_none(0x00000000); +const color_ts etk::color::color_AliceBlue(0xF0F8FFFF); +const color_ts etk::color::color_AntiqueWhite(0xFAEBD7FF); +const color_ts etk::color::color_Aqua(0x00FFFFFF); +const color_ts etk::color::color_Aquamarine(0x7FFFD4FF); +const color_ts etk::color::color_Azure(0xF0FFFFFF); +const color_ts etk::color::color_Beige(0xF5F5DCFF); +const color_ts etk::color::color_Bisque(0xFFE4C4FF); +const color_ts etk::color::color_Black(0x000000FF); +const color_ts etk::color::color_BlanchedAlmond(0xFFEBCDFF); +const color_ts etk::color::color_Blue(0x0000FFFF); +const color_ts etk::color::color_BlueViolet(0x8A2BE2FF); +const color_ts etk::color::color_Brown(0xA52A2AFF); +const color_ts etk::color::color_BurlyWood(0xDEB887FF); +const color_ts etk::color::color_CadetBlue(0x5F9EA0FF); +const color_ts etk::color::color_Chartreuse(0x7FFF00FF); +const color_ts etk::color::color_Chocolate(0xD2691EFF); +const color_ts etk::color::color_Coral(0xFF7F50FF); +const color_ts etk::color::color_CornflowerBlue(0x6495EDFF); +const color_ts etk::color::color_Cornsilk(0xFFF8DCFF); +const color_ts etk::color::color_Crimson(0xDC143CFF); +const color_ts etk::color::color_Cyan(0x00FFFFFF); +const color_ts etk::color::color_DarkBlue(0x00008BFF); +const color_ts etk::color::color_DarkCyan(0x008B8BFF); +const color_ts etk::color::color_DarkGoldenRod(0xB8860BFF); +const color_ts etk::color::color_DarkGray(0xA9A9A9FF); +const color_ts etk::color::color_DarkGrey(0xA9A9A9FF); +const color_ts etk::color::color_DarkGreen(0x006400FF); +const color_ts etk::color::color_DarkKhaki(0xBDB76BFF); +const color_ts etk::color::color_DarkMagenta(0x8B008BFF); +const color_ts etk::color::color_DarkOliveGreen(0x556B2FFF); +const color_ts etk::color::color_Darkorange(0xFF8C00FF); +const color_ts etk::color::color_DarkOrchid(0x9932CCFF); +const color_ts etk::color::color_DarkRed(0x8B0000FF); +const color_ts etk::color::color_DarkSalmon(0xE9967AFF); +const color_ts etk::color::color_DarkSeaGreen(0x8FBC8FFF); +const color_ts etk::color::color_DarkSlateBlue(0x483D8BFF); +const color_ts etk::color::color_DarkSlateGray(0x2F4F4FFF); +const color_ts etk::color::color_DarkSlateGrey(0x2F4F4FFF); +const color_ts etk::color::color_DarkTurquoise(0x00CED1FF); +const color_ts etk::color::color_DarkViolet(0x9400D3FF); +const color_ts etk::color::color_DeepPink(0xFF1493FF); +const color_ts etk::color::color_DeepSkyBlue(0x00BFFFFF); +const color_ts etk::color::color_DimGray(0x696969FF); +const color_ts etk::color::color_DimGrey(0x696969FF); +const color_ts etk::color::color_DodgerBlue(0x1E90FFFF); +const color_ts etk::color::color_FireBrick(0xB22222FF); +const color_ts etk::color::color_FloralWhite(0xFFFAF0FF); +const color_ts etk::color::color_ForestGreen(0x228B22FF); +const color_ts etk::color::color_Fuchsia(0xFF00FFFF); +const color_ts etk::color::color_Gainsboro(0xDCDCDCFF); +const color_ts etk::color::color_GhostWhite(0xF8F8FFFF); +const color_ts etk::color::color_Gold(0xFFD700FF); +const color_ts etk::color::color_GoldenRod(0xDAA520FF); +const color_ts etk::color::color_Gray(0x808080FF); +const color_ts etk::color::color_Grey(0x808080FF); +const color_ts etk::color::color_Green(0x008000FF); +const color_ts etk::color::color_GreenYellow(0xADFF2FFF); +const color_ts etk::color::color_HoneyDew(0xF0FFF0FF); +const color_ts etk::color::color_HotPink(0xFF69B4FF); +const color_ts etk::color::color_IndianRed (0xCD5C5CFF); +const color_ts etk::color::color_Indigo (0x4B0082FF); +const color_ts etk::color::color_Ivory(0xFFFFF0FF); +const color_ts etk::color::color_Khaki(0xF0E68CFF); +const color_ts etk::color::color_Lavender(0xE6E6FAFF); +const color_ts etk::color::color_LavenderBlush(0xFFF0F5FF); +const color_ts etk::color::color_LawnGreen(0x7CFC00FF); +const color_ts etk::color::color_LemonChiffon(0xFFFACDFF); +const color_ts etk::color::color_LightBlue(0xADD8E6FF); +const color_ts etk::color::color_LightCoral(0xF08080FF); +const color_ts etk::color::color_LightCyan(0xE0FFFFFF); +const color_ts etk::color::color_LightGoldenRodYellow(0xFAFAD2FF); +const color_ts etk::color::color_LightGray(0xD3D3D3FF); +const color_ts etk::color::color_LightGrey(0xD3D3D3FF); +const color_ts etk::color::color_LightGreen(0x90EE90FF); +const color_ts etk::color::color_LightPink(0xFFB6C1FF); +const color_ts etk::color::color_LightSalmon(0xFFA07AFF); +const color_ts etk::color::color_LightSeaGreen(0x20B2AAFF); +const color_ts etk::color::color_LightSkyBlue(0x87CEFAFF); +const color_ts etk::color::color_LightSlateGray(0x778899FF); +const color_ts etk::color::color_LightSlateGrey(0x778899FF); +const color_ts etk::color::color_LightSteelBlue(0xB0C4DEFF); +const color_ts etk::color::color_LightYellow(0xFFFFE0FF); +const color_ts etk::color::color_Lime(0x00FF00FF); +const color_ts etk::color::color_LimeGreen(0x32CD32FF); +const color_ts etk::color::color_Linen(0xFAF0E6FF); +const color_ts etk::color::color_Magenta(0xFF00FFFF); +const color_ts etk::color::color_Maroon(0x800000FF); +const color_ts etk::color::color_MediumAquaMarine(0x66CDAAFF); +const color_ts etk::color::color_MediumBlue(0x0000CDFF); +const color_ts etk::color::color_MediumOrchid(0xBA55D3FF); +const color_ts etk::color::color_MediumPurple(0x9370D8FF); +const color_ts etk::color::color_MediumSeaGreen(0x3CB371FF); +const color_ts etk::color::color_MediumSlateBlue(0x7B68EEFF); +const color_ts etk::color::color_MediumSpringGreen(0x00FA9AFF); +const color_ts etk::color::color_MediumTurquoise(0x48D1CCFF); +const color_ts etk::color::color_MediumVioletRed(0xC71585FF); +const color_ts etk::color::color_MidnightBlue(0x191970FF); +const color_ts etk::color::color_MintCream(0xF5FFFAFF); +const color_ts etk::color::color_MistyRose(0xFFE4E1FF); +const color_ts etk::color::color_Moccasin(0xFFE4B5FF); +const color_ts etk::color::color_NavajoWhite(0xFFDEADFF); +const color_ts etk::color::color_Navy(0x000080FF); +const color_ts etk::color::color_OldLace(0xFDF5E6FF); +const color_ts etk::color::color_Olive(0x808000FF); +const color_ts etk::color::color_OliveDrab(0x6B8E23FF); +const color_ts etk::color::color_Orange(0xFFA500FF); +const color_ts etk::color::color_OrangeRed(0xFF4500FF); +const color_ts etk::color::color_Orchid(0xDA70D6FF); +const color_ts etk::color::color_PaleGoldenRod(0xEEE8AAFF); +const color_ts etk::color::color_PaleGreen(0x98FB98FF); +const color_ts etk::color::color_PaleTurquoise(0xAFEEEEFF); +const color_ts etk::color::color_PaleVioletRed(0xD87093FF); +const color_ts etk::color::color_PapayaWhip(0xFFEFD5FF); +const color_ts etk::color::color_PeachPuff(0xFFDAB9FF); +const color_ts etk::color::color_Peru(0xCD853FFF); +const color_ts etk::color::color_Pink(0xFFC0CBFF); +const color_ts etk::color::color_Plum(0xDDA0DDFF); +const color_ts etk::color::color_PowderBlue(0xB0E0E6FF); +const color_ts etk::color::color_Purple(0x800080FF); +const color_ts etk::color::color_Red(0xFF0000FF); +const color_ts etk::color::color_RosyBrown(0xBC8F8FFF); +const color_ts etk::color::color_RoyalBlue(0x4169E1FF); +const color_ts etk::color::color_SaddleBrown(0x8B4513FF); +const color_ts etk::color::color_Salmon(0xFA8072FF); +const color_ts etk::color::color_SandyBrown(0xF4A460FF); +const color_ts etk::color::color_SeaGreen(0x2E8B57FF); +const color_ts etk::color::color_SeaShell(0xFFF5EEFF); +const color_ts etk::color::color_Sienna(0xA0522DFF); +const color_ts etk::color::color_Silver(0xC0C0C0FF); +const color_ts etk::color::color_SkyBlue(0x87CEEBFF); +const color_ts etk::color::color_SlateBlue(0x6A5ACDFF); +const color_ts etk::color::color_SlateGray(0x708090FF); +const color_ts etk::color::color_SlateGrey(0x708090FF); +const color_ts etk::color::color_Snow(0xFFFAFAFF); +const color_ts etk::color::color_SpringGreen(0x00FF7FFF); +const color_ts etk::color::color_SteelBlue(0x4682B4FF); +const color_ts etk::color::color_Tan(0xD2B48CFF); +const color_ts etk::color::color_Teal(0x008080FF); +const color_ts etk::color::color_Thistle(0xD8BFD8FF); +const color_ts etk::color::color_Tomato(0xFF6347FF); +const color_ts etk::color::color_Turquoise(0x40E0D0FF); +const color_ts etk::color::color_Violet(0xEE82EEFF); +const color_ts etk::color::color_Wheat(0xF5DEB3FF); +const color_ts etk::color::color_White(0xFFFFFFFF); +const color_ts etk::color::color_WhiteSmoke(0xF5F5F5FF); +const color_ts etk::color::color_Yellow(0xFFFF00FF); +const color_ts etk::color::color_YellowGreen(0x9ACD32FF); typedef struct { diff --git a/Sources/libetk/etk/Types.h b/Sources/libetk/etk/Types.h index f6762935..3a1a8ec2 100644 --- a/Sources/libetk/etk/Types.h +++ b/Sources/libetk/etk/Types.h @@ -87,6 +87,28 @@ typedef struct color_ts { uint8_t green; uint8_t blue; uint8_t alpha; + color_ts(void) { + red = 0xFF; + green = 0xFF; + blue = 0xFF; + alpha = 0xFF; + }; + color_ts(uint32_t data) { + red = (uint8_t)((data&0xFF000000)>>24); + green = (uint8_t)((data&0x00FF0000)>>16); + blue = (uint8_t)((data&0x0000FF00)>>8); + alpha = (uint8_t)((data&0x000000FF)); + }; + color_ts(float _red, float _green, float _blue, float _alpha = 1.0) { + _red = etk_avg(0.0, _red, 1.0); + _green = etk_avg(0.0, _green, 1.0); + _blue = etk_avg(0.0, _blue, 1.0); + _alpha = etk_avg(0.0, _alpha, 1.0); + red = (uint8_t)(_red*256.0); + green = (uint8_t)(_green*256.0); + blue = (uint8_t)(_blue*256.0); + alpha = (uint8_t)(_alpha*256.0); + }; }color_ts; #include diff --git a/Sources/libewol/ewol/Texture.cpp b/Sources/libewol/ewol/Texture.cpp index ef9a6b2f..5fe29b11 100644 --- a/Sources/libewol/ewol/Texture.cpp +++ b/Sources/libewol/ewol/Texture.cpp @@ -352,7 +352,7 @@ int32_t ewol::texture::Load(etk::UString tmpfileName, int32_t requestedWidth) void ewol::texture::UnLoad(uint32_t textureID) { //EWOL_INFO("Unload a specific tecture ID=" << textureID); - if (textureID>=0 && (int32_t)textureID=0 && (int32_t)textureIDm_openGlTextureID; } return 0; diff --git a/Sources/libewol/ewol/widget/ButtonImage.cpp b/Sources/libewol/ewol/widget/ButtonImage.cpp index 9fb3073b..cfdb0125 100644 --- a/Sources/libewol/ewol/widget/ButtonImage.cpp +++ b/Sources/libewol/ewol/widget/ButtonImage.cpp @@ -316,8 +316,7 @@ void ewol::ButtonImage::OnFlipFlopEvent(void) // internal saving if (true == needFlipFlop) { if (m_resetNeeded[m_currentCreateId] == true) { - m_resetNeeded[m_currentCreateId] == false; - + m_resetNeeded[m_currentCreateId] = false; if (NULL != m_OOImageBG2[m_currentCreateId]) { delete(m_OOImageBG2[m_currentCreateId]); m_OOImageBG2[m_currentCreateId] = NULL; diff --git a/Sources/libewol/ewol/widget/ColorBar.cpp b/Sources/libewol/ewol/widget/ColorBar.cpp index 0356a555..211518d8 100644 --- a/Sources/libewol/ewol/widget/ColorBar.cpp +++ b/Sources/libewol/ewol/widget/ColorBar.cpp @@ -103,17 +103,17 @@ bool ewol::ColorBar::CalculateMinSize(void) MarkToReedraw(); return true; } -static color_ts s_listColorWhite = {0xFF, 0xFF, 0xFF, 0xFF}; -static color_ts s_listColorBlack = {0x00, 0x00, 0x00, 0xFF}; +static color_ts s_listColorWhite(0xFFFFFFFF); +static color_ts s_listColorBlack(0x000000FF); #define NB_BAND_COLOR (6) static color_ts s_listColor[NB_BAND_COLOR+1] = { - {0xFF, 0x00, 0x00, 0xFF}, - {0xFF, 0xFF, 0x00, 0xFF}, - {0x00, 0xFF, 0x00, 0xFF}, - {0x00, 0xFF, 0xFF, 0xFF}, - {0x00, 0x00, 0xFF, 0xFF}, - {0xFF, 0x00, 0xFF, 0xFF}, - {0xFF, 0x00, 0x00, 0xFF} + 0xFF0000FF, + 0xFFFF00FF, + 0x00FF00FF, + 0x00FFFFFF, + 0x0000FFFF, + 0xFF00FFFF, + 0xFF0000FF }; color_ts ewol::ColorBar::GetCurrentColor(void) diff --git a/Sources/libewol/ewol/widget/Entry.cpp b/Sources/libewol/ewol/widget/Entry.cpp index 7ae2b7eb..79279a3c 100644 --- a/Sources/libewol/ewol/widget/Entry.cpp +++ b/Sources/libewol/ewol/widget/Entry.cpp @@ -248,7 +248,6 @@ bool ewol::Entry::OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData) // SUPPR : if (m_data.Size() > 0 && m_displayCursorPos add the SDK needed for android you will use like android 2.3.3 for xperia X10 # ... wait download ... @@ -19,7 +20,7 @@ android list targets # need to generate the application APK ... cd /home/edupin/progperso/android/ndk-r7/samples/hello-jni/ -android update project -p . -s --target 1 +sh -x ~/dev/perso/android/sdk/tools/android update project -p . -s --target 1 #install ant with aptitude ...