Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Newbyte
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #293236 | Initial revision | — | 4 days ago |
Answer | — |
A: How do I get a hexadecimal string representation of a GdkRGBA struct in C? I ended up implementing it like this: ```c #define RGBHEXSTRINGLENGTH 8 gchar gdkrgbatorgbhexstring (const GdkRGBA const from) { guchar red = roundf (from->red 255.0f); guchar green = roundf (from->green 255.0f); guchar blue = roundf (from->blue 255.0f); gchar to = malloc (RG... (more) |
— | 4 days ago |
Edit | Post #293231 | Initial revision | — | 5 days ago |
Question | — |
How do I get a hexadecimal string representation of a GdkRGBA struct in C? I have a program that reads a hexadecimal string representation from a configuration file, turns it into a GdkRGBA struct from Gdk, uses `gtkcolordialogbuttonsetrgba ()` to set it as the default colour of a GtkColorDialogButton, and then listens to user changes to the aforementioned button. On use... (more) |
— | 5 days ago |