picofuse-objc

NXColor.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include <picofuse/pix/color.h>
7 #include <stdint.h>
8 
27 @interface NXColor : NXObject {
28 @private
29  pix_color_t _rgba;
30 }
31 
35 + (NXColor *)colorWithRed:(float)red green:(float)green blue:(float)blue;
36 
41 + (NXColor *)colorWithRed:(float)red green:(float)green blue:(float)blue opacity:(float)opacity;
42 
51 + (NXColor *)colorWithHex:(NXString *)hex;
52 
56 + (NXColor *)colorWithRGBA:(pix_color_t)rgba;
57 
61 + (NXColor *)blackColor;
62 
66 + (NXColor *)whiteColor;
67 
71 + (NXColor *)redColor;
72 
76 + (NXColor *)greenColor;
77 
81 + (NXColor *)blueColor;
82 
86 + (NXColor *)clearColor;
87 
91 - (float)red;
92 
96 - (float)green;
97 
101 - (float)blue;
102 
106 - (float)opacity;
107 
111 - (pix_color_t)rgbaValue;
112 
116 - (NXColor *)colorWithOpacity:(float)opacity;
117 
121 - (BOOL)isEqual:(id)other;
122 
127 - (NXString *)description;
128 
129 @end
float green()
Returns the green, from 0 to 1.
NXColor * clearColor()
Returns transparent black, which is no color.
float blue()
Returns the blue, from 0 to 1.
NXColor * whiteColor()
Returns opaque white.
NXString * description()
Returns the color in hexadecimal, as "#RRGGBB", or "#RRGGBBAA" unless it&#39;s opaque, in capitals.
NXColor * redColor()
Returns opaque red.
float opacity()
Returns the opacity, from 0, which is transparent, to 1, which is opaque.
pix_color_t rgbaValue()
Returns the color as a pix_color_t of picofuse, 0xRRGGBBAA.
bool BOOL
A Boolean value.
Definition: runtime.h:60
NXColor * greenColor()
Returns opaque green.
A string of UTF-8 text.
Definition: NXString.h:53
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
float red()
Returns the red, from 0 to 1.
A color: red, green and blue, with an opacity.
Definition: NXColor.h:27
NXColor * blackColor()
Returns opaque black.
NXColor * blueColor()
Returns opaque blue.