2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using Tizen.NUI.Binding;
20 using System.ComponentModel;
21 using System.Globalization;
28 [Tizen.NUI.Binding.TypeConverter(typeof(ColorTypeConverter))]
29 public class Color : Disposable, ICloneable
32 /// Gets the alice_blue colored Color class.
34 [EditorBrowsable(EditorBrowsableState.Never)]
35 public static readonly Color AliceBlue = NDalic.ALICE_BLUE;
38 /// Gets the antique_white colored Color class.
40 [EditorBrowsable(EditorBrowsableState.Never)]
41 public static readonly Color AntiqueWhite = NDalic.ANTIQUE_WHITE;
44 /// Gets the aqua colored Color class.
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public static readonly Color Aqua = NDalic.AQUA;
50 /// Gets the aqua_marine colored Color class.
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 public static readonly Color AquaMarine = NDalic.AQUA_MARINE;
56 /// Gets the azure colored Color class.
58 [EditorBrowsable(EditorBrowsableState.Never)]
59 public static readonly Color Azure = NDalic.AZURE;
62 /// Gets the beige colored Color class.
64 [EditorBrowsable(EditorBrowsableState.Never)]
65 public static readonly Color Beige = NDalic.BEIGE;
68 /// Gets the bisque colored Color class.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public static readonly Color Bisque = NDalic.BISQUE;
74 /// Gets the black colored Color class.
76 /// <since_tizen> 3 </since_tizen>
77 public static readonly Color Black = NDalic.BLACK;
80 /// Gets the blanche_dalmond colored Color class.
82 [EditorBrowsable(EditorBrowsableState.Never)]
83 public static readonly Color BlancheDalmond = NDalic.BLANCHE_DALMOND;
86 /// Gets the blue colored Color class.
88 /// <since_tizen> 3 </since_tizen>
89 public static readonly Color Blue = NDalic.BLUE;
92 /// Gets the blue_violet colored Color class.
94 [EditorBrowsable(EditorBrowsableState.Never)]
95 public static readonly Color BlueViolet = NDalic.BLUE_VIOLET;
98 /// Gets the brown colored Color class.
100 [EditorBrowsable(EditorBrowsableState.Never)]
101 public static readonly Color Brown = NDalic.BROWN;
104 /// Gets the burly_wood colored Color class.
106 [EditorBrowsable(EditorBrowsableState.Never)]
107 public static readonly Color BurlyWood = NDalic.BURLY_WOOD;
110 /// Gets the cadet_blue colored Color class.
112 [EditorBrowsable(EditorBrowsableState.Never)]
113 public static readonly Color CadetBlue = NDalic.CADET_BLUE;
116 /// Gets the chartreuse colored Color class.
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public static readonly Color Chartreuse = NDalic.CHARTREUSE;
122 /// Gets the chocolate colored Color class.
124 [EditorBrowsable(EditorBrowsableState.Never)]
125 public static readonly Color Chocolate = NDalic.CHOCOLATE;
128 /// Gets the coral colored Color class.
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public static readonly Color Coral = NDalic.CORAL;
134 /// Gets the cornflower_blue colored Color class.
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public static readonly Color CornflowerBlue = NDalic.CORNFLOWER_BLUE;
140 /// Gets the cornsilk colored Color class.
142 [EditorBrowsable(EditorBrowsableState.Never)]
143 public static readonly Color Cornsilk = NDalic.CORNSILK;
146 /// Gets the crimson colored Color class.
148 [EditorBrowsable(EditorBrowsableState.Never)]
149 public static readonly Color Crimson = NDalic.CRIMSON;
152 /// Gets the cyan colored Color class.
154 /// <since_tizen> 3 </since_tizen>
155 public static readonly Color Cyan = NDalic.CYAN;
158 /// Gets the dark_blue colored Color class.
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public static readonly Color DarkBlue = NDalic.DARK_BLUE;
164 /// Gets the dark_cyan colored Color class.
166 [EditorBrowsable(EditorBrowsableState.Never)]
167 public static readonly Color DarkCyan = NDalic.DARK_CYAN;
170 /// Gets the dark_goldenrod colored Color class.
172 [EditorBrowsable(EditorBrowsableState.Never)]
173 public static readonly Color DarkGoldenrod = NDalic.DARK_GOLDENROD;
176 /// Gets the dark_gray colored Color class.
178 [EditorBrowsable(EditorBrowsableState.Never)]
179 public static readonly Color DarkGray = NDalic.DARK_GRAY;
182 /// Gets the dark_green colored Color class.
184 [EditorBrowsable(EditorBrowsableState.Never)]
185 public static readonly Color DarkGreen = NDalic.DARK_GREEN;
188 /// Gets the dark_grey colored Color class.
190 [EditorBrowsable(EditorBrowsableState.Never)]
191 public static readonly Color DarkGrey = NDalic.DARK_GREY;
194 /// Gets the dark_khaki colored Color class.
196 [EditorBrowsable(EditorBrowsableState.Never)]
197 public static readonly Color DarkKhaki = NDalic.DARK_KHAKI;
200 /// Gets the dark_magenta colored Color class.
202 [EditorBrowsable(EditorBrowsableState.Never)]
203 public static readonly Color DarkMagenta = NDalic.DARK_MAGENTA;
206 /// Gets the dark_olive_green colored Color class.
208 [EditorBrowsable(EditorBrowsableState.Never)]
209 public static readonly Color DarkOliveGreen = NDalic.DARK_OLIVE_GREEN;
212 /// Gets the dark_orange colored Color class.
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 public static readonly Color DarkOrange = NDalic.DARK_ORANGE;
218 /// Gets the dark_orchid colored Color class.
220 [EditorBrowsable(EditorBrowsableState.Never)]
221 public static readonly Color DarkOrchid = NDalic.DARK_ORCHID;
224 /// Gets the dark_red colored Color class.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public static readonly Color DarkRed = NDalic.DARK_RED;
230 /// Gets the dark_salmon colored Color class.
232 [EditorBrowsable(EditorBrowsableState.Never)]
233 public static readonly Color DarkSalmon = NDalic.DARK_SALMON;
236 /// Gets the dark_sea_green colored Color class.
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public static readonly Color DarkSeaGreen = NDalic.DARK_SEA_GREEN;
242 /// Gets the dark_slate_blue colored Color class.
244 [EditorBrowsable(EditorBrowsableState.Never)]
245 public static readonly Color DarkSlateBlue = NDalic.DARK_SLATE_BLUE;
248 /// Gets the dark_slate_gray colored Color class.
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 public static readonly Color DarkSlateGray = NDalic.DARK_SLATE_GRAY;
254 /// Gets the dark_slate_grey colored Color class.
256 [EditorBrowsable(EditorBrowsableState.Never)]
257 public static readonly Color DarkSlateGrey = NDalic.DARK_SLATE_GREY;
260 /// Gets the dark_turquoise colored Color class.
262 [EditorBrowsable(EditorBrowsableState.Never)]
263 public static readonly Color DarkTurquoise = NDalic.DARK_TURQUOISE;
266 /// Gets the dark_violet colored Color class.
268 [EditorBrowsable(EditorBrowsableState.Never)]
269 public static readonly Color DarkViolet = NDalic.DARK_VIOLET;
272 /// Gets the deep_pink colored Color class.
274 [EditorBrowsable(EditorBrowsableState.Never)]
275 public static readonly Color DeepPink = NDalic.DEEP_PINK;
278 /// Gets the deep_sky_blue colored Color class.
280 [EditorBrowsable(EditorBrowsableState.Never)]
281 public static readonly Color DeepSkyBlue = NDalic.DEEP_SKY_BLUE;
284 /// Gets the dim_gray colored Color class.
286 [EditorBrowsable(EditorBrowsableState.Never)]
287 public static readonly Color DimGray = NDalic.DIM_GRAY;
290 /// Gets the dim_grey colored Color class.
292 [EditorBrowsable(EditorBrowsableState.Never)]
293 public static readonly Color DimGrey = NDalic.DIM_GREY;
296 /// Gets the dodger_blue colored Color class.
298 [EditorBrowsable(EditorBrowsableState.Never)]
299 public static readonly Color DodgerBlue = NDalic.DODGER_BLUE;
302 /// Gets the fire_brick colored Color class.
304 [EditorBrowsable(EditorBrowsableState.Never)]
305 public static readonly Color FireBrick = NDalic.FIRE_BRICK;
308 /// Gets the floral_white colored Color class.
310 [EditorBrowsable(EditorBrowsableState.Never)]
311 public static readonly Color FloralWhite = NDalic.FLORAL_WHITE;
314 /// Gets the forest_green colored Color class.
316 [EditorBrowsable(EditorBrowsableState.Never)]
317 public static readonly Color ForestGreen = NDalic.FOREST_GREEN;
320 /// Gets the fuchsia colored Color class.
322 [EditorBrowsable(EditorBrowsableState.Never)]
323 public static readonly Color Fuchsia = NDalic.FUCHSIA;
326 /// Gets the gainsboro colored Color class.
328 [EditorBrowsable(EditorBrowsableState.Never)]
329 public static readonly Color Gainsboro = NDalic.GAINSBORO;
332 /// Gets the ghost_white colored Color class.
334 [EditorBrowsable(EditorBrowsableState.Never)]
335 public static readonly Color GhostWhite = NDalic.GHOST_WHITE;
338 /// Gets the gold colored Color class.
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public static readonly Color Gold = NDalic.GOLD;
344 /// Gets the golden_rod colored Color class.
346 [EditorBrowsable(EditorBrowsableState.Never)]
347 public static readonly Color GoldenRod = NDalic.GOLDEN_ROD;
350 /// Gets the gray colored Color class.
352 [EditorBrowsable(EditorBrowsableState.Never)]
353 public static readonly Color Gray = NDalic.GRAY;
356 /// Gets the green colored Color class.
358 /// <since_tizen> 3 </since_tizen>
359 public static readonly Color Green = NDalic.GREEN;
362 /// Gets the green_yellow colored Color class.
364 [EditorBrowsable(EditorBrowsableState.Never)]
365 public static readonly Color GreenYellow = NDalic.GREEN_YELLOW;
368 /// Gets the grey colored Color class.
370 [EditorBrowsable(EditorBrowsableState.Never)]
371 public static readonly Color Grey = NDalic.GREY;
374 /// Gets the honeydew colored Color class.
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public static readonly Color Honeydew = NDalic.HONEYDEW;
380 /// Gets the hot_pink colored Color class.
382 [EditorBrowsable(EditorBrowsableState.Never)]
383 public static readonly Color HotPink = NDalic.HOT_PINK;
386 /// Gets the indianred colored Color class.
388 [EditorBrowsable(EditorBrowsableState.Never)]
389 public static readonly Color Indianred = NDalic.INDIANRED;
392 /// Gets the indigo colored Color class.
394 [EditorBrowsable(EditorBrowsableState.Never)]
395 public static readonly Color Indigo = NDalic.INDIGO;
398 /// Gets the ivory colored Color class.
400 [EditorBrowsable(EditorBrowsableState.Never)]
401 public static readonly Color Ivory = NDalic.IVORY;
404 /// Gets the khaki colored Color class.
406 [EditorBrowsable(EditorBrowsableState.Never)]
407 public static readonly Color Khaki = NDalic.KHAKI;
410 /// Gets the lavender colored Color class.
412 [EditorBrowsable(EditorBrowsableState.Never)]
413 public static readonly Color Lavender = NDalic.LAVENDER;
416 /// Gets the lavender_blush colored Color class.
418 [EditorBrowsable(EditorBrowsableState.Never)]
419 public static readonly Color LavenderBlush = NDalic.LAVENDER_BLUSH;
422 /// Gets the lawn_green colored Color class.
424 [EditorBrowsable(EditorBrowsableState.Never)]
425 public static readonly Color LawnGreen = NDalic.LAWN_GREEN;
428 /// Gets the lemon_chiffon colored Color class.
430 [EditorBrowsable(EditorBrowsableState.Never)]
431 public static readonly Color LemonChiffon = NDalic.LEMON_CHIFFON;
434 /// Gets the light_blue colored Color class.
436 [EditorBrowsable(EditorBrowsableState.Never)]
437 public static readonly Color LightBlue = NDalic.LIGHT_BLUE;
440 /// Gets the light_coral colored Color class.
442 [EditorBrowsable(EditorBrowsableState.Never)]
443 public static readonly Color LightCoral = NDalic.LIGHT_CORAL;
446 /// Gets the light_cyan colored Color class.
448 [EditorBrowsable(EditorBrowsableState.Never)]
449 public static readonly Color LightCyan = NDalic.LIGHT_CYAN;
452 /// Gets the light_golden_rod_yellow colored Color class.
454 [EditorBrowsable(EditorBrowsableState.Never)]
455 public static readonly Color LightGoldenRodYellow = NDalic.LIGHT_GOLDEN_ROD_YELLOW;
458 /// Gets the light_gray colored Color class.
460 [EditorBrowsable(EditorBrowsableState.Never)]
461 public static readonly Color LightGray = NDalic.LIGHT_GRAY;
464 /// Gets the light_green colored Color class.
466 [EditorBrowsable(EditorBrowsableState.Never)]
467 public static readonly Color LightGreen = NDalic.LIGHT_GREEN;
470 /// Gets the light_grey colored Color class.
472 [EditorBrowsable(EditorBrowsableState.Never)]
473 public static readonly Color LightGrey = NDalic.LIGHT_GREY;
476 /// Gets the light_pink colored Color class.
478 [EditorBrowsable(EditorBrowsableState.Never)]
479 public static readonly Color LightPink = NDalic.LIGHT_PINK;
482 /// Gets the light_salmon colored Color class.
484 [EditorBrowsable(EditorBrowsableState.Never)]
485 public static readonly Color LightSalmon = NDalic.LIGHT_SALMON;
488 /// Gets the light_sea_green colored Color class.
490 [EditorBrowsable(EditorBrowsableState.Never)]
491 public static readonly Color LightSeaGreen = NDalic.LIGHT_SEA_GREEN;
494 /// Gets the light_sky_blue colored Color class.
496 [EditorBrowsable(EditorBrowsableState.Never)]
497 public static readonly Color LightSkyBlue = NDalic.LIGHT_SKY_BLUE;
500 /// Gets the light_slate_gray colored Color class.
502 [EditorBrowsable(EditorBrowsableState.Never)]
503 public static readonly Color LightSlateGray = NDalic.LIGHT_SLATE_GRAY;
506 /// Gets the light_slate_grey colored Color class.
508 [EditorBrowsable(EditorBrowsableState.Never)]
509 public static readonly Color LightSlateGrey = NDalic.LIGHT_SLATE_GREY;
512 /// Gets the light_steel_blue colored Color class.
514 [EditorBrowsable(EditorBrowsableState.Never)]
515 public static readonly Color LightSteelBlue = NDalic.LIGHT_STEEL_BLUE;
518 /// Gets the light_yellow colored Color class.
520 [EditorBrowsable(EditorBrowsableState.Never)]
521 public static readonly Color LightYellow = NDalic.LIGHT_YELLOW;
524 /// Gets the lime colored Color class.
526 [EditorBrowsable(EditorBrowsableState.Never)]
527 public static readonly Color Lime = NDalic.LIME;
530 /// Gets the lime_green colored Color class.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public static readonly Color LimeGreen = NDalic.LIME_GREEN;
536 /// Gets the linen colored Color class.
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public static readonly Color Linen = NDalic.LINEN;
542 /// Gets the magenta colored Color class.
544 /// <since_tizen> 3 </since_tizen>
545 public static readonly Color Magenta = NDalic.MAGENTA;
548 /// Gets the maroon colored Color class.
550 [EditorBrowsable(EditorBrowsableState.Never)]
551 public static readonly Color Maroon = NDalic.MAROON;
554 /// Gets the medium_aqua_marine colored Color class.
556 [EditorBrowsable(EditorBrowsableState.Never)]
557 public static readonly Color MediumAquaMarine = NDalic.MEDIUM_AQUA_MARINE;
560 /// Gets the medium_blue colored Color class.
562 [EditorBrowsable(EditorBrowsableState.Never)]
563 public static readonly Color MediumBlue = NDalic.MEDIUM_BLUE;
566 /// Gets the medium_orchid colored Color class.
568 [EditorBrowsable(EditorBrowsableState.Never)]
569 public static readonly Color MediumOrchid = NDalic.MEDIUM_ORCHID;
572 /// Gets the medium_purple colored Color class.
574 [EditorBrowsable(EditorBrowsableState.Never)]
575 public static readonly Color MediumPurple = NDalic.MEDIUM_PURPLE;
578 /// Gets the medium_sea_green colored Color class.
580 [EditorBrowsable(EditorBrowsableState.Never)]
581 public static readonly Color MediumSeaGreen = NDalic.MEDIUM_SEA_GREEN;
584 /// Gets the medium_slate_blue colored Color class.
586 [EditorBrowsable(EditorBrowsableState.Never)]
587 public static readonly Color MediumSlateBlue = NDalic.MEDIUM_SLATE_BLUE;
590 /// Gets the medium_spring_green colored Color class.
592 [EditorBrowsable(EditorBrowsableState.Never)]
593 public static readonly Color MediumSpringGreen = NDalic.MEDIUM_SPRING_GREEN;
596 /// Gets the medium_turquoise colored Color class.
598 [EditorBrowsable(EditorBrowsableState.Never)]
599 public static readonly Color MediumTurquoise = NDalic.MEDIUM_TURQUOISE;
602 /// Gets the medium_violetred colored Color class.
604 [EditorBrowsable(EditorBrowsableState.Never)]
605 public static readonly Color MediumVioletred = NDalic.MEDIUM_VIOLETRED;
608 /// Gets the midnight_blue colored Color class.
610 [EditorBrowsable(EditorBrowsableState.Never)]
611 public static readonly Color MidnightBlue = NDalic.MIDNIGHT_BLUE;
614 /// Gets the mint_cream colored Color class.
616 [EditorBrowsable(EditorBrowsableState.Never)]
617 public static readonly Color MintCream = NDalic.MINT_CREAM;
620 /// Gets the misty_rose colored Color class.
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public static readonly Color MistyRose = NDalic.MISTY_ROSE;
626 /// Gets the moccasin colored Color class.
628 [EditorBrowsable(EditorBrowsableState.Never)]
629 public static readonly Color Moccasin = NDalic.MOCCASIN;
632 /// Gets the navajo_white colored Color class.
634 [EditorBrowsable(EditorBrowsableState.Never)]
635 public static readonly Color NavajoWhite = NDalic.NAVAJO_WHITE;
638 /// Gets the navy colored Color class.
640 [EditorBrowsable(EditorBrowsableState.Never)]
641 public static readonly Color Navy = NDalic.NAVY;
644 /// Gets the old_lace colored Color class.
646 [EditorBrowsable(EditorBrowsableState.Never)]
647 public static readonly Color OldLace = NDalic.OLD_LACE;
650 /// Gets the olive colored Color class.
652 [EditorBrowsable(EditorBrowsableState.Never)]
653 public static readonly Color Olive = NDalic.OLIVE;
656 /// Gets the olive_drab colored Color class.
658 [EditorBrowsable(EditorBrowsableState.Never)]
659 public static readonly Color OliveDrab = NDalic.OLIVE_DRAB;
662 /// Gets the orange colored Color class.
664 [EditorBrowsable(EditorBrowsableState.Never)]
665 public static readonly Color Orange = NDalic.ORANGE;
668 /// Gets the orange_red colored Color class.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public static readonly Color OrangeRed = NDalic.ORANGE_RED;
674 /// Gets the orchid colored Color class.
676 [EditorBrowsable(EditorBrowsableState.Never)]
677 public static readonly Color Orchid = NDalic.ORCHID;
680 /// Gets the pale_golden_rod colored Color class.
682 [EditorBrowsable(EditorBrowsableState.Never)]
683 public static readonly Color PaleGoldenRod = NDalic.PALE_GOLDEN_ROD;
686 /// Gets the pale_green colored Color class.
688 [EditorBrowsable(EditorBrowsableState.Never)]
689 public static readonly Color PaleGreen = NDalic.PALE_GREEN;
692 /// Gets the Pale_Turquoise colored Color class.
694 [EditorBrowsable(EditorBrowsableState.Never)]
695 public static readonly Color PaleTurquoise = NDalic.PALE_TURQUOISE;
698 /// Gets the Pale_Violet_Red colored Color class.
700 [EditorBrowsable(EditorBrowsableState.Never)]
701 public static readonly Color PaleVioletRed = NDalic.PALE_VIOLET_RED;
704 /// Gets the Papaya_whip colored Color class.
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 public static readonly Color PapayaWhip = NDalic.PAPAYA_WHIP;
710 /// Gets the Peach_puff colored Color class.
712 [EditorBrowsable(EditorBrowsableState.Never)]
713 public static readonly Color PeachPuff = NDalic.PEACH_PUFF;
716 /// Gets the peru colored Color class.
718 [EditorBrowsable(EditorBrowsableState.Never)]
719 public static readonly Color Peru = NDalic.PERU;
722 /// Gets the pink colored Color class.
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public static readonly Color Pink = NDalic.PINK;
728 /// Gets the plum colored Color class.
730 [EditorBrowsable(EditorBrowsableState.Never)]
731 public static readonly Color Plum = NDalic.PLUM;
734 /// Gets the powder_blue colored Color class.
736 [EditorBrowsable(EditorBrowsableState.Never)]
737 public static readonly Color PowderBlue = NDalic.POWDER_BLUE;
740 /// Gets the purple colored Color class.
742 [EditorBrowsable(EditorBrowsableState.Never)]
743 public static readonly Color Purple = NDalic.PURPLE;
746 /// Gets the red colored Color class.
748 /// <since_tizen> 3 </since_tizen>
749 public static readonly Color Red = NDalic.RED;
752 /// Gets the rosy_brown colored Color class.
754 [EditorBrowsable(EditorBrowsableState.Never)]
755 public static readonly Color RosyBrown = NDalic.ROSY_BROWN;
758 /// Gets the royal_blue colored Color class.
760 [EditorBrowsable(EditorBrowsableState.Never)]
761 public static readonly Color RoyalBlue = NDalic.ROYAL_BLUE;
764 /// Gets the saddle_brown colored Color class.
766 [EditorBrowsable(EditorBrowsableState.Never)]
767 public static readonly Color SaddleBrown = NDalic.SADDLE_BROWN;
770 /// Gets the salmon colored Color class.
772 [EditorBrowsable(EditorBrowsableState.Never)]
773 public static readonly Color Salmon = NDalic.SALMON;
776 /// Gets the sandy_brown colored Color class.
778 [EditorBrowsable(EditorBrowsableState.Never)]
779 public static readonly Color SandyBrown = NDalic.SANDY_BROWN;
782 /// Gets the sea_green colored Color class.
784 [EditorBrowsable(EditorBrowsableState.Never)]
785 public static readonly Color SeaGreen = NDalic.SEA_GREEN;
788 /// Gets the sea_shell colored Color class.
790 [EditorBrowsable(EditorBrowsableState.Never)]
791 public static readonly Color SeaShell = NDalic.SEA_SHELL;
794 /// Gets the sienna colored Color class.
796 [EditorBrowsable(EditorBrowsableState.Never)]
797 public static readonly Color Sienna = NDalic.SIENNA;
800 /// Gets the silver colored Color class.
802 [EditorBrowsable(EditorBrowsableState.Never)]
803 public static readonly Color Silver = NDalic.SILVER;
806 /// Gets the sky_blue colored Color class.
808 [EditorBrowsable(EditorBrowsableState.Never)]
809 public static readonly Color SkyBlue = NDalic.SKY_BLUE;
812 /// Gets the slate_blue colored Color class.
814 [EditorBrowsable(EditorBrowsableState.Never)]
815 public static readonly Color SlateBlue = NDalic.SLATE_BLUE;
818 /// Gets the slate_gray colored Color class.
820 [EditorBrowsable(EditorBrowsableState.Never)]
821 public static readonly Color SlateGray = NDalic.SLATE_GRAY;
824 /// Gets the slate_grey colored Color class.
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public static readonly Color SlateGrey = NDalic.SLATE_GREY;
830 /// Gets the snow colored Color class.
832 [EditorBrowsable(EditorBrowsableState.Never)]
833 public static readonly Color Snow = NDalic.SNOW;
836 /// Gets the spring_green colored Color class.
838 [EditorBrowsable(EditorBrowsableState.Never)]
839 public static readonly Color SpringGreen = NDalic.SPRING_GREEN;
842 /// Gets the steel_blue colored Color class.
844 [EditorBrowsable(EditorBrowsableState.Never)]
845 public static readonly Color SteelBlue = NDalic.STEEL_BLUE;
848 /// Gets the tan colored Color class.
850 [EditorBrowsable(EditorBrowsableState.Never)]
851 public static readonly Color Tan = NDalic.TAN;
854 /// Gets the teal colored Color class.
856 [EditorBrowsable(EditorBrowsableState.Never)]
857 public static readonly Color Teal = NDalic.TEAL;
860 /// Gets the thistle colored Color class.
862 [EditorBrowsable(EditorBrowsableState.Never)]
863 public static readonly Color Thistle = NDalic.THISTLE;
866 /// Gets the tomato colored Color class.
868 [EditorBrowsable(EditorBrowsableState.Never)]
869 public static readonly Color Tomato = NDalic.TOMATO;
872 /// Gets the transparent colored Color class.
874 /// <since_tizen> 3 </since_tizen>
875 public static readonly Color Transparent = NDalic.TRANSPARENT;
878 /// Gets the turquoise colored Color class.
880 [EditorBrowsable(EditorBrowsableState.Never)]
881 public static readonly Color Turquoise = NDalic.TURQUOISE;
884 /// Gets the violet colored Color class.
886 [EditorBrowsable(EditorBrowsableState.Never)]
887 public static readonly Color Violet = NDalic.VIOLET;
890 /// Gets the wheat colored Color class.
892 [EditorBrowsable(EditorBrowsableState.Never)]
893 public static readonly Color Wheat = NDalic.WHEAT;
896 /// Gets the white colored Color class.
898 /// <since_tizen> 3 </since_tizen>
899 public static readonly Color White = NDalic.WHITE;
902 /// Gets the white_smoke colored Color class.
904 [EditorBrowsable(EditorBrowsableState.Never)]
905 public static readonly Color WhiteSmoke = NDalic.WHITE_SMOKE;
908 /// Gets the yellow colored Color class.
910 /// <since_tizen> 3 </since_tizen>
911 public static readonly Color Yellow = NDalic.YELLOW;
914 /// Gets the yellow_green colored Color class.
916 [EditorBrowsable(EditorBrowsableState.Never)]
917 public static readonly Color YellowGreen = NDalic.YELLOW_GREEN;
920 private readonly bool hashDummy;
923 /// Default constructor
925 /// <since_tizen> 3 </since_tizen>
926 public Color() : this(Interop.Vector4.NewVector4(), true)
928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935 /// <param name="r">The red component.</param>
936 /// <param name="g">The green component.</param>
937 /// <param name="b">The blue component.</param>
938 /// <param name="a">The alpha component.</param>
939 /// <since_tizen> 3 </since_tizen>
940 public Color(float r, float g, float b, float a) : this(Interop.Vector4.NewVector4(ValueCheck(r), ValueCheck(g), ValueCheck(b), ValueCheck(a)), true)
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 /// The conversion constructor from an array of four floats.
948 /// <param name="array">array Array of R,G,B,A.</param>
949 /// <since_tizen> 3 </since_tizen>
950 public Color(float[] array) : this(Interop.Vector4.NewVector4(ValueCheck(array)), true)
952 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
956 /// The conversion constructor from text color representation.
957 /// hexcode representation : #RGB #RGBA #RRGGBB #RRGGBBAA
958 /// rgb representation : rgb(0-255,0-255,0-255) rgba(0-255,0-255,0-255,0.0-1.0)
960 /// <param name="textColor">color text representation as Hexcode, rgb() or rgba()</param>
961 /// <exception cref="ArgumentNullException">This exception is thrown when hexColor is null.</exception>
962 /// <since_tizen> 6 </since_tizen>
963 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
964 [EditorBrowsable(EditorBrowsableState.Never)]
965 public Color(string textColor) : this(Interop.Vector4.NewVector4(), true)
969 if (null == textColor)
971 throw new ArgumentNullException(nameof(textColor));
974 textColor = textColor.ToUpperInvariant();
975 textColor = textColor.Replace(" ", "");
977 if (textColor.Length > 0 && textColor[0] == '#')
979 textColor = textColor.Replace("#", "");
980 int textColorLength = textColor.Length;
982 if (textColorLength == 6 || textColorLength == 8) /* #RRGGBB or #RRGGBBAA */
984 R = ((float)Convert.ToInt32(textColor.Substring(0, 2), 16)) / 255.0f;
985 G = ((float)Convert.ToInt32(textColor.Substring(2, 2), 16)) / 255.0f;
986 B = ((float)Convert.ToInt32(textColor.Substring(4, 2), 16)) / 255.0f;
987 A = textColor.Length > 6 ? ((float)Convert.ToInt32(textColor.Substring(6, 2), 16)) / 255.0f : 1.0f;
989 else if (textColorLength == 3 || textColorLength == 4) /* #RGB */
991 R = ((float)Convert.ToInt32(textColor.Substring(0, 1), 16)) / 15.0f;
992 G = ((float)Convert.ToInt32(textColor.Substring(1, 1), 16)) / 15.0f;
993 B = ((float)Convert.ToInt32(textColor.Substring(2, 1), 16)) / 15.0f;
994 A = textColor.Length > 3 ? ((float)Convert.ToInt32(textColor.Substring(3, 1), 16)) / 15.0f : 1.0f;
998 throw new global::System.ArgumentException("Please check your color text code");
1001 else // example rgb(255,255,255) or rgb(255,255,255,1.0)
1003 bool isRGBA = textColor.StartsWith("RGBA(");
1004 bool isRGB = textColor.StartsWith("RGB(");
1006 if (!isRGBA && !isRGB)
1008 throw new global::System.ArgumentException("Please check your color text code");
1012 textColor = textColor.Substring(4);
1014 textColor = textColor.Substring(3);
1016 textColor = textColor.Replace(")", "");
1017 textColor = textColor.Replace("(", "");
1019 string[] components = textColor.Split(',');
1021 if (components.Length == 3 && isRGB)
1023 R = Math.Min(1.0f, ((float)Convert.ToInt32(components[0], 10)) / 255.0f);
1024 G = Math.Min(1.0f, ((float)Convert.ToInt32(components[1], 10)) / 255.0f);
1025 B = Math.Min(1.0f, ((float)Convert.ToInt32(components[2], 10)) / 255.0f);
1028 else if (components.Length == 4 && isRGBA)
1030 R = Math.Min(1.0f, ((float)Convert.ToInt32(components[0], 10)) / 255.0f);
1031 G = Math.Min(1.0f, ((float)Convert.ToInt32(components[1], 10)) / 255.0f);
1032 B = Math.Min(1.0f, ((float)Convert.ToInt32(components[2], 10)) / 255.0f);
1033 A = Math.Min(1.0f, float.Parse(components[3], CultureInfo.InvariantCulture));
1039 throw new global::System.ArgumentException("Please check your color text code");
1044 /// The conversion constructor from an System.Drawing.Color instance.
1046 /// <param name="color">System.Drawing.Color instance</param>
1047 [EditorBrowsable(EditorBrowsableState.Never)]
1048 public Color(global::System.Drawing.Color color) : this(Interop.Vector4.NewVector4(), true)
1050 R = color.R / 255.0f;
1051 G = color.G / 255.0f;
1052 B = color.B / 255.0f;
1053 A = color.A / 255.0f;
1057 /// The copy constructor.
1059 /// <param name="other">The copy target.</param>
1060 /// <exception cref="ArgumentNullException"> Thrown when other is null. </exception>
1061 [EditorBrowsable(EditorBrowsableState.Never)]
1062 public Color(Color other) : this(other == null ? throw new ArgumentNullException(nameof(other)) : other.R, other.G, other.B, other.A)
1066 internal Color(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
1071 internal Color(ColorChangedCallback cb, float r, float g, float b, float a) : this(Interop.Vector4.NewVector4(ValueCheck(r), ValueCheck(g), ValueCheck(b), ValueCheck(a)), true)
1074 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1077 internal Color(ColorChangedCallback cb, Color other) : this(cb, other.R, other.G, other.B, other.A)
1081 internal delegate void ColorChangedCallback(float r, float g, float b, float a);
1082 private ColorChangedCallback callback = null;
1085 /// The red component.
1088 /// The setter is deprecated in API8 and will be removed in API10. Please use new Color(...) constructor.
1091 /// // DO NOT use like the followings!
1092 /// Color color = new Color();
1094 /// // Please USE like this
1095 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
1096 /// Color color = new Color(r, g, b, a);
1098 /// <since_tizen> 3 </since_tizen>
1101 [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Color(...) constructor")]
1104 Interop.Vector4.RSet(SwigCPtr, ValueCheck(value));
1105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1107 callback?.Invoke(R, G, B, A);
1111 float ret = Interop.Vector4.RGet(SwigCPtr);
1112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1118 /// The green component.
1121 /// The setter is deprecated in API8 and will be removed in API10. Please use new Color(...) constructor.
1124 /// // DO NOT use like the followings!
1125 /// Color color = new Color();
1127 /// // Please USE like this
1128 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
1129 /// Color color = new Color(r, g, b, a);
1131 /// <since_tizen> 3 </since_tizen>
1134 [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Color(...) constructor")]
1137 Interop.Vector4.GSet(SwigCPtr, ValueCheck(value));
1138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1140 callback?.Invoke(R, G, B, A);
1144 float ret = Interop.Vector4.GGet(SwigCPtr);
1145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1151 /// The blue component.
1154 /// The setter is deprecated in API8 and will be removed in API10. Please use new Color(...) constructor.
1157 /// // DO NOT use like the followings!
1158 /// Color color = new Color();
1160 /// // Please USE like this
1161 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
1162 /// Color color = new Color(r, g, b, a);
1164 /// <since_tizen> 3 </since_tizen>
1167 [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Color(...) constructor")]
1170 Interop.Vector4.BSet(SwigCPtr, ValueCheck(value));
1171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1173 callback?.Invoke(R, G, B, A);
1177 float ret = Interop.Vector4.BGet(SwigCPtr);
1178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1184 /// The alpha component.
1187 /// The setter is deprecated in API8 and will be removed in API10. Please use new Color(...) constructor.
1190 /// // DO NOT use like the followings!
1191 /// Color color = new Color();
1193 /// // Please USE like this
1194 /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f;
1195 /// Color color = new Color(r, g, b, a);
1197 /// <since_tizen> 3 </since_tizen>
1200 [Obsolete("Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Color(...) constructor")]
1203 Interop.Vector4.ASet(SwigCPtr, ValueCheck(value));
1204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1206 callback?.Invoke(R, G, B, A);
1210 float ret = Interop.Vector4.AGet(SwigCPtr);
1211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1217 /// The array subscript operator overload.
1219 /// <param name="index">The subscript index.</param>
1220 /// <returns>The float at the given index.</returns>
1221 /// <since_tizen> 3 </since_tizen>
1222 public float this[uint index]
1226 return ValueOfIndex(index);
1231 /// Converts the Color class to Vector4 class implicitly.
1233 /// <param name="color">A color to be converted to Vector4</param>
1234 /// <since_tizen> 3 </since_tizen>
1235 public static implicit operator Vector4(Color color)
1241 return new Vector4(color.R, color.G, color.B, color.A);
1245 /// Converts Vector4 class to Color class implicitly.
1247 /// <param name="vec">A Vector4 to be converted to color.</param>
1248 /// <since_tizen> 3 </since_tizen>
1249 public static implicit operator Color(Vector4 vec)
1255 return new Color(vec.R, vec.G, vec.B, vec.A);
1259 /// The addition operator.
1261 /// <param name="arg1">The first value.</param>
1262 /// <param name="arg2">The second value.</param>
1263 /// <returns>The color containing the result of the addition.</returns>
1264 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1265 /// <since_tizen> 3 </since_tizen>
1266 public static Color operator +(Color arg1, Color arg2)
1270 throw new ArgumentNullException(nameof(arg1));
1272 Color result = arg1.Add(arg2);
1273 return ValueCheck(result);
1277 /// The subtraction operator.
1279 /// <param name="arg1">The first value.</param>
1280 /// <param name="arg2">The second value.</param>
1281 /// <returns>The color containing the result of the subtraction.</returns>
1282 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1283 /// <since_tizen> 3 </since_tizen>
1284 public static Color operator -(Color arg1, Color arg2)
1288 throw new ArgumentNullException(nameof(arg1));
1290 Color result = arg1.Subtract(arg2);
1291 return ValueCheck(result);
1295 /// The unary negation operator.
1297 /// <param name="arg1">The target value.</param>
1298 /// <returns>The color containg the negation.</returns>
1299 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1300 /// <since_tizen> 3 </since_tizen>
1301 public static Color operator -(Color arg1)
1305 throw new ArgumentNullException(nameof(arg1));
1307 Color result = arg1.Subtract();
1308 return ValueCheck(result);
1312 /// The multiplication operator.
1314 /// <param name="arg1">The first value.</param>
1315 /// <param name="arg2">The second value.</param>
1316 /// <returns>The color containing the result of the multiplication.</returns>
1317 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1318 /// <since_tizen> 3 </since_tizen>
1319 public static Color operator *(Color arg1, Color arg2)
1323 throw new ArgumentNullException(nameof(arg1));
1325 Color result = arg1.Multiply(arg2);
1326 return ValueCheck(result);
1330 /// The multiplication operator.
1332 /// <param name="arg1">The first value.</param>
1333 /// <param name="arg2">The second value.</param>
1334 /// <returns>The color containing the result of the multiplication.</returns>
1335 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1336 /// <since_tizen> 3 </since_tizen>
1337 public static Color operator *(Color arg1, float arg2)
1341 throw new ArgumentNullException(nameof(arg1));
1343 Color result = arg1.Multiply(arg2);
1344 return ValueCheck(result);
1348 /// The division operator.
1350 /// <param name="arg1">The first value.</param>
1351 /// <param name="arg2">The second value.</param>
1352 /// <returns>The color containing the result of the division.</returns>
1353 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1354 /// <since_tizen> 3 </since_tizen>
1355 public static Color operator /(Color arg1, Color arg2)
1359 throw new ArgumentNullException(nameof(arg1));
1361 Color result = arg1.Divide(arg2);
1362 return ValueCheck(result);
1366 /// The division operator.
1368 /// <param name="arg1">The first value.</param>
1369 /// <param name="arg2">The second value.</param>
1370 /// <returns>The color containing the result of the division.</returns>
1371 /// <exception cref="ArgumentNullException"> Thrown when arg1 is null. </exception>
1372 /// <since_tizen> 3 </since_tizen>
1373 public static Color operator /(Color arg1, float arg2)
1377 throw new ArgumentNullException(nameof(arg1));
1379 Color result = arg1.Divide(arg2);
1380 return ValueCheck(result);
1384 /// Checks if two color classes are same.
1386 /// <param name="rhs">A color to be compared.</param>
1387 /// <returns>If two colors are are same, then true.</returns>
1388 /// <since_tizen> 3 </since_tizen>
1389 public bool EqualTo(Color rhs)
1391 bool ret = Interop.Vector4.EqualTo(SwigCPtr, Color.getCPtr(rhs));
1393 if (rhs == null) return false;
1395 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1400 /// Checks if two color classes are different.
1402 /// <param name="rhs">A color to be compared.</param>
1403 /// <returns>If two colors are are different, then true.</returns>
1404 /// <since_tizen> 3 </since_tizen>
1405 public bool NotEqualTo(Color rhs)
1407 bool ret = Interop.Vector4.NotEqualTo(SwigCPtr, Color.getCPtr(rhs));
1408 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1413 [EditorBrowsable(EditorBrowsableState.Never)]
1414 public object Clone() => new Color(this);
1416 internal static Color GetColorFromPtr(global::System.IntPtr cPtr)
1418 Color ret = new Color(cPtr, false);
1419 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1423 internal static Color ValueCheck(Color color)
1430 if (IsInvalidValue(ref r) | IsInvalidValue(ref g) | IsInvalidValue(ref b) | IsInvalidValue(ref a))
1432 NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. Color is {color.R}, {color.G}, {color.B}, {color.A}");
1434 color = new Color(r, g, b, a);
1438 internal static float ValueCheck(float value)
1440 float refValue = value;
1441 if (IsInvalidValue(ref refValue))
1443 NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. float value is {value}");
1448 internal static float[] ValueCheck(float[] arr)
1452 throw new ArgumentNullException(nameof(arr));
1455 for (int i = 0; i < arr.Length; i++)
1457 float refValue = arr[i];
1458 if (IsInvalidValue(ref refValue))
1460 NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. arr[] is {arr[i]}");
1467 private static bool IsInvalidValue(ref float value)
1474 else if (value > 1.0f)
1482 /// This will not be public opened.
1483 [EditorBrowsable(EditorBrowsableState.Never)]
1484 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1486 Interop.Vector4.DeleteVector4(swigCPtr);
1489 private Color Add(Color rhs)
1491 Color ret = new Color(Interop.Vector4.Add(SwigCPtr, Color.getCPtr(rhs)), true);
1492 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1496 private Color AddAssign(Vector4 rhs)
1498 Color ret = new Color(Interop.Vector4.AddAssign(SwigCPtr, Color.getCPtr(rhs)), false);
1499 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1503 private Color Subtract(Color rhs)
1505 Color ret = new Color(Interop.Vector4.Subtract(SwigCPtr, Color.getCPtr(rhs)), true);
1506 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1510 private Color SubtractAssign(Color rhs)
1512 Color ret = new Color(Interop.Vector4.SubtractAssign(SwigCPtr, Color.getCPtr(rhs)), false);
1513 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1517 private Color Multiply(Color rhs)
1519 Color ret = new Color(Interop.Vector4.Multiply(SwigCPtr, Color.getCPtr(rhs)), true);
1520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1524 private Color Multiply(float rhs)
1526 Color ret = new Color(Interop.Vector4.Multiply(SwigCPtr, rhs), true);
1527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1531 private Color MultiplyAssign(Color rhs)
1533 Color ret = new Color(Interop.Vector4.MultiplyAssign(SwigCPtr, Color.getCPtr(rhs)), false);
1534 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1538 private Color MultiplyAssign(float rhs)
1540 Color ret = new Color(Interop.Vector4.MultiplyAssign(SwigCPtr, rhs), false);
1541 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1545 private Color Divide(Vector4 rhs)
1547 Color ret = new Color(Interop.Vector4.Divide(SwigCPtr, Color.getCPtr(rhs)), true);
1548 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1552 private Color Divide(float rhs)
1554 Color ret = new Color(Interop.Vector4.Divide(SwigCPtr, rhs), true);
1555 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1559 private Color DivideAssign(Color rhs)
1561 Color ret = new Color(Interop.Vector4.DivideAssign(SwigCPtr, Color.getCPtr(rhs)), false);
1562 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1566 private Color DivideAssign(float rhs)
1568 Color ret = new Color(Interop.Vector4.DivideAssign(SwigCPtr, rhs), false);
1569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1573 private Color Subtract()
1575 Color ret = new Color(Interop.Vector4.Subtract(SwigCPtr), true);
1576 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1580 private static bool EqualsColorValue(float f1, float f2)
1582 float EPS = (float)Math.Abs(f1 * .00001);
1583 if (Math.Abs(f1 - f2) <= EPS)
1593 private static bool EqualsColor(Color c1, Color c2)
1595 return EqualsColorValue(c1.R, c2.R) && EqualsColorValue(c1.G, c2.G)
1596 && EqualsColorValue(c1.B, c2.B) && EqualsColorValue(c1.A, c2.A);
1600 /// Determines whether the specified object is equal to the current object.
1602 /// <param name="obj">The object to compare with the current object.</param>
1603 /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
1604 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1605 [EditorBrowsable(EditorBrowsableState.Never)]
1606 public override bool Equals(System.Object obj)
1608 Color color = obj as Color;
1615 if (EqualsColor(this, color))
1622 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1623 [EditorBrowsable(EditorBrowsableState.Never)]
1624 public override int GetHashCode()
1626 return hashDummy.GetHashCode();
1629 private float ValueOfIndex(uint index)
1631 float ret = Interop.Vector4.ValueOfIndex(SwigCPtr, index);
1632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();