libgeda

s_color.c File Reference

#include <config.h>
#include <missing.h>
#include <stdio.h>
#include <math.h>
#include "libgeda_priv.h"
Include dependency graph for s_color.c:

Go to the source code of this file.

Defines

#define NOCOLOR   {0xff, 0xff, 0xff, 0xff, FALSE}
#define WHITE   {0xff, 0xff, 0xff, 0xff, TRUE}
#define GRAY   {0x88, 0x88, 0x88, 0xff, TRUE}
#define BLACK   {0x00, 0x00, 0x00, 0xff, TRUE}
#define ENDMAP   {0x00, 0x00, 0x00, 0x00, FALSE}

Functions

void s_color_init (void)
 Initialises the color subsystem.
void s_color_map_defaults (COLOR *map)
 Initialise a color map to B&W.
gboolean s_color_rgba_decode (const gchar *rgba, guint8 *r, guint8 *g, guint8 *b, guint8 *a)
gchar * s_color_rgba_encode (guint8 r, guint8 g, guint8 b, guint8 a)
gchar * s_color_ps_string (gint color)
SCM s_color_map_to_scm (const COLOR *map)
void s_color_map_from_scm (COLOR *map, SCM lst, const char *scheme_proc_name)

Variables

COLOR print_colors [MAX_COLORS]
static COLOR default_colors []

Define Documentation

#define NOCOLOR   {0xff, 0xff, 0xff, 0xff, FALSE}

Definition at line 37 of file s_color.c.

#define WHITE   {0xff, 0xff, 0xff, 0xff, TRUE}

Definition at line 38 of file s_color.c.

#define GRAY   {0x88, 0x88, 0x88, 0xff, TRUE}

Definition at line 39 of file s_color.c.

#define BLACK   {0x00, 0x00, 0x00, 0xff, TRUE}

Definition at line 40 of file s_color.c.

#define ENDMAP   {0x00, 0x00, 0x00, 0x00, FALSE}

Definition at line 41 of file s_color.c.


Function Documentation

void s_color_init ( void  )
Function Description
At the moment, just initialises the print color map.

Definition at line 76 of file s_color.c.

Here is the call graph for this function:

void s_color_map_defaults ( COLOR map)
Function Description
Initialises a color map to a simple default: black features on a white background, with "special" colors as gray.
Warning:
map must be have length of at least MAX_COLORS.
Parameters:
mapColor map to initialise.

Definition at line 91 of file s_color.c.

gboolean s_color_rgba_decode ( const gchar *  rgba,
guint8 *  r,
guint8 *  g,
guint8 *  b,
guint8 *  a 
)

Definition at line 136 of file s_color.c.

gchar* s_color_rgba_encode ( guint8  r,
guint8  g,
guint8  b,
guint8  a 
)

Definition at line 187 of file s_color.c.

gchar* s_color_ps_string ( gint  color)
Todo:
Finish function documentation!!!
Function Description

Definition at line 202 of file s_color.c.

SCM s_color_map_to_scm ( const COLOR map)

Definition at line 224 of file s_color.c.

Here is the call graph for this function:

void s_color_map_from_scm ( COLOR map,
SCM  lst,
const char *  scheme_proc_name 
)
Warning:
This function should ONLY be called from Scheme procedures.

Definition at line 245 of file s_color.c.

Here is the call graph for this function:


Variable Documentation

COLOR print_colors[MAX_COLORS]

Definition at line 35 of file s_color.c.

COLOR default_colors[] [static]
Initial value:
 {
   {0xff, 0xff, 0xff, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x88, 0x88, 0x88, 0xff, TRUE} ,            
   {0x88, 0x88, 0x88, 0xff, TRUE} ,            
   {0x88, 0x88, 0x88, 0xff, TRUE} ,            
   {0x88, 0x88, 0x88, 0xff, TRUE} ,            
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0x00, 0x00, 0x00, 0xff, TRUE} ,           
   {0x88, 0x88, 0x88, 0xff, TRUE} ,            
   {0xff, 0xff, 0xff, 0xff, FALSE} ,         
   {0x00, 0x00, 0x00, 0x00, FALSE} 
}

Definition at line 43 of file s_color.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines