CicmWrapper
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Data Structures | Macros | Enumerations | Functions
The Graphics Part

The t_elayer part. More...

Data Structures

struct  t_pt
 A point structure. More...
 
struct  t_rect
 A rectangle structure. More...
 
struct  t_matrix
 A matrix structure. More...
 
struct  t_rgb
 A rgb color structure. More...
 
struct  t_rgba
 A rgba color structure. More...
 
struct  t_hsl
 A hsl color structure. More...
 
struct  t_hsla
 A hsla color structure. More...
 
struct  t_efont
 The font structure. More...
 
struct  t_etext
 The text structure. More...
 
struct  t_egobj
 The drawing object. More...
 
struct  t_elayer
 The drawing layer. More...
 

Macros

#define EPD_PI   (3.141592653589793238462643383279502884f)
 Macros that define the a pi.
 
#define EPD_2PI   (6.283185307179586476925286766559005f)
 Macros that define the a 2pi.
 
#define EPD_PI2   (1.57079632679489661923132169163975144f)
 Macros that define the a pi over 2.
 
#define EPD_PI4   (0.785398163397448309615660845819875721f)
 Macros that define the a pi over 4.
 

Enumerations

enum  elayer_flags { EGRAPHICS_OPEN = 0, EGRAPHICS_CLOSE = -1, EGRAPHICS_INVALID = -2, EGRAPHICS_TODRAW = -3 }
 The flags that defines the status of a layer. More...
 
enum  etextanchor_flags {
  ETEXT_UP = 0, ETEXT_UP_LEFT = 1, ETEXT_UP_RIGHT = 2, ETEXT_DOWN = 3,
  ETEXT_DOWN_LEFT = 4, ETEXT_DOWN_RIGHT = 5, ETEXT_LEFT = 6, ETEXT_RIGHT = 7,
  ETEXT_CENTER = 8
}
 The flags that defines the text anchor. More...
 
enum  etextwrap_flags { ETEXT_NOWRAP = 0, ETEXT_WRAP = 1 }
 The flags that defines if the text should be wrapped. More...
 
enum  etextjustify_flags { ETEXT_JLEFT = 0, ETEXT_JRIGHT = 1, ETEXT_JCENTER = 2 }
 The flags that define the text justification. More...
 
enum  egraphics_types {
  E_GOBJ_INVALID = 0, E_GOBJ_PATH, E_GOBJ_RECT, E_GOBJ_ARC,
  E_GOBJ_OVAL, E_GOBJ_TEXT, E_GOBJ_IMAG
}
 The types of graphical object. More...
 
enum  epath_types { E_PATH_MOVE = 0, E_PATH_CURVE = 1 }
 The types of path. More...
 

Functions

void egraphics_fill (t_elayer *g)
 
void egraphics_fill_preserve (t_elayer *g)
 
void egraphics_stroke (t_elayer *g)
 
void egraphics_stroke_preserve (t_elayer *g)
 
void etext_layout_draw (t_etext *textlayout, t_elayer *g)
 
void egraphics_set_line_splinestep (t_elayer *g, float smooth)
 
void egraphics_set_line_width (t_elayer *g, float width)
 
void egraphics_set_color_rgba (t_elayer *g, t_rgba *rgba)
 
void egraphics_set_color_rgb (t_elayer *g, t_rgb *rgb)
 
void egraphics_set_color_hex (t_elayer *g, t_symbol *hex)
 
void egraphics_set_color_hsla (t_elayer *g, t_hsla *hsla)
 
void egraphics_set_color_hsl (t_elayer *g, t_hsl *hsl)
 
void egraphics_rotate (t_elayer *g, float angle)
 
void egraphics_matrix_init (t_matrix *x, float xx, float yx, float xy, float yy, float x0, float y0)
 
void egraphics_set_matrix (t_elayer *g, const t_matrix *matrix)
 
void egraphics_apply_matrix (t_elayer *g, t_egobj *gobj)
 
void egraphics_line_to (t_elayer *g, float x, float y)
 
void egraphics_move_to (t_elayer *g, float x, float y)
 
void egraphics_curve_to (t_elayer *g, float ctrl1x, float ctrl1y, float ctrl2x, float ctrl2y, float endx, float endy)
 
void egraphics_arc_to (t_elayer *g, float cx, float cy, float extend)
 
void egraphics_arc_oval_to (t_elayer *g, float cx, float cy, float radius, float extend)
 
void egraphics_line (t_elayer *g, float x0, float y0, float x1, float y1)
 
void egraphics_curve (t_elayer *g, float startx, float starty, float ctrl1x, float ctrl1y, float ctrl2x, float ctrl2y, float endx, float endy)
 
void egraphics_line_fast (t_elayer *g, float x0, float y0, float x1, float y1)
 
void egraphics_close_path (t_elayer *g)
 
void egraphics_rectangle (t_elayer *g, float x, float y, float width, float height)
 
void egraphics_rectangle_rounded (t_elayer *g, float x, float y, float width, float height, float roundness)
 
void egraphics_circle (t_elayer *g, float xc, float yc, float radius)
 
void egraphics_oval (t_elayer *g, float xc, float yc, float radiusx, float radiusy)
 
void egraphics_arc (t_elayer *g, float xc, float yc, float radius, float angle1, float angle2)
 
void egraphics_arc_oval (t_elayer *g, float xc, float yc, float radiusx, float radiusy, float angle1, float angle2)
 
t_etextetext_layout_create (void)
 
void etext_layout_destroy (t_etext *textlayout)
 
void etext_layout_set (t_etext *textlayout, const char *text, t_efont *jfont, float x, float y, float width, float height, etextanchor_flags anchor, etextjustify_flags justify, etextwrap_flags wrap)
 
void etext_layout_settextcolor (t_etext *textlayout, t_rgba *color)
 
t_efontefont_create (t_symbol *family, t_symbol *slant, t_symbol *weight, float size)
 
void efont_destroy (t_efont *font)
 
char * rgba_to_hex (t_rgba color)
 
char * rgb_to_hex (t_rgb color)
 
char * hsla_to_hex (t_hsla color)
 
char * hsl_to_hex (t_hsl color)
 
t_hsl rgb_to_hsl (t_rgb color)
 
t_hsla rgba_to_hsla (t_rgba color)
 
t_rgba hex_to_rgba (char *color)
 
t_rgb hex_to_rgb (char *color)
 
t_rgba hsla_to_rgba (t_hsla color)
 
t_rgb hsl_to_rgb (t_hsl color)
 
t_rgba rgba_addContrast (t_rgba color, float contrast)
 
t_rgb rgb_addContrast (t_rgb color, float contrast)
 
void rgba_set (t_rgba *color, float red, float green, float blue, float alpha)
 
void rgb_set (t_rgb *color, float red, float green, float blue)
 
void hsla_set (t_hsla *color, float hue, float saturation, float luminosity, float alpha)
 
void hsl_set (t_hsl *color, float hue, float saturation, float luminosity)
 
float pd_clip_min (float aValue, float aMinimum)
 
float pd_clip_max (float aValue, float aMaximum)
 
float pd_clip_minmax (float aValue, float aMinimum, float aMaximum)
 
float pd_ordinate (float radius, float angle)
 
float pd_abscissa (float radius, float angle)
 
float pd_radius (float x, float y)
 
float pd_angle (float x, float y)
 
 __attribute__ ((used)) static t_rgba rgba_black = {0.3f, 0.3f, 0.3f, 1.f}
 

Detailed Description

The t_elayer part.

This part refers to the methods and structures used to paint.


Data Structure Documentation

struct t_pt

A point structure.

It contains the members x and y for abscissa and ordinate.

Data Fields
float x

The abscissa coordiante.

float y

The ordiante coordiante.

struct t_rect

A rectangle structure.

It contains the members x, y, width and height for abscissa and ordinate and size.

Data Fields
float x

The abscissa coordiante.

float y

The ordiante coordiante.

float width

The width of the rectangle

float height

The height of the rectangle

struct t_matrix

A matrix structure.

It contains the members xx, yx, xy, yy, x0 and y0

Data Fields
float xx

The abscissa-abscissa translation of the matrix

float yx

The abscissa-ordiante translation of the matrix

float xy

The ordiante-abscissa translation of the matrix

float yy

The ordiante-ordiante translation of the matrix

float x0

The abscissa origin of the matrix

float y0

The ordiante origin of the matrix

struct t_rgb

A rgb color structure.

It contains the members red, green and blue.

Data Fields
float red

The red value.

float green

The green value.

float blue

The blue value.

struct t_rgba

A rgba color structure.

It contains the members red, green, blue and alpha.

Data Fields
float red

The red value.

float green

The green value.

float blue

The blue value.

float alpha

The alpha value.

struct t_hsl

A hsl color structure.

It contains the members hue, saturation and lightness.

Data Fields
float hue

The hue value.

float saturation

The saturation value.

float lightness

The lightness value.

struct t_hsla

A hsla color structure.

It contains the members hue, saturation, lightness and alpha.

Data Fields
float hue

The hue value.

float saturation

The saturation value.

float lightness

The lightness value.

float alpha

The alpha value.

struct t_efont

The font structure.

It contains the informations of a font.

Data Fields
float c_size

The size of the font.

long c_sizereal

The plateform's size of the font.

t_symbol * c_family

The family of the font (times, helvetica, ect.).

t_symbol * c_slant

The slant of the font (regular, italic, etc.).

t_symbol * c_weight

The weight of the font (normal, bold).

struct t_etext

The text structure.

It contains the all the informations to be drawn.

Data Fields
t_symbol * c_text

The text.

t_rgba c_color

The color of the text.

t_efont c_font

The font of the text.

t_rect c_rect

The rectangle of the text.

t_symbol * c_anchor

The anchor of the text.

t_symbol * c_justify

The justification of the text.

struct t_egobj

The drawing object.

It contains the all the informations to be drawn.

Data Fields
egraphics_types e_type

The type of the graphical object.

int e_filled

The filled state of the graphical object.

t_symbol * e_color

The color of the graphical object.

float e_width

The line width of the graphical object.

t_pt * e_points

The points of the graphical object.

long e_npoints

The number of points of the graphical object.

float e_roundness

The roundness of the graphical object.

t_efont e_font

The font of the graphical object.

t_symbol * e_anchor

The anchor of the graphical object.

t_symbol * e_justify

The justification of the graphical object.

t_symbol * e_text

The text of the graphical object.

struct t_elayer

The drawing layer.

It contains the all the informations and the graphical objects to be drawn.

Data Fields
t_object * e_owner

The layer owner.

t_symbol * e_name

The layer name.

t_symbol * e_id

The layer canvas ID.

int e_state

The layer state.

t_rect e_rect

The layer size.

t_symbol * e_color

The layer color.

int e_line_width

The layer line width.

t_matrix e_matrix

The layer matrix.

t_egobj e_new_objects

The layer new object.

t_egobj * e_objects

The layer objects.

long e_number_objects

The number of layer objects.

Enumeration Type Documentation

The flags that defines the status of a layer.

It define all possible the status of a layer.

Enumerator
EGRAPHICS_OPEN 

Open.

EGRAPHICS_CLOSE 

Closed.

EGRAPHICS_INVALID 

Invalid.

EGRAPHICS_TODRAW 

To be drawn.

The flags that defines the text anchor.

It define all text anchor.

Enumerator
ETEXT_UP 

Up and center.

ETEXT_UP_LEFT 

Up anfd left.

ETEXT_UP_RIGHT 

Up anfd right.

ETEXT_DOWN 

Down and center.

ETEXT_DOWN_LEFT 

Down anfd left.

ETEXT_DOWN_RIGHT 

Down anfd right.

ETEXT_LEFT 

Left.

ETEXT_RIGHT 

right.

ETEXT_CENTER 

Center.

The flags that defines if the text should be wrapped.

It define true or false.

Enumerator
ETEXT_NOWRAP 

False.

ETEXT_WRAP 

True.

The flags that define the text justification.

It define all text justification.

Enumerator
ETEXT_JLEFT 

Left.

ETEXT_JRIGHT 

Right.

ETEXT_JCENTER 

Center.

The types of graphical object.

It define all the graphical type.

Enumerator
E_GOBJ_INVALID 

This type is invalid.

E_GOBJ_PATH 

This is a path.

E_GOBJ_RECT 

This is a rect.

E_GOBJ_ARC 

This is an arc.

E_GOBJ_OVAL 

This is an oval.

E_GOBJ_TEXT 

This is a text.

E_GOBJ_IMAG 

This is an image.

The types of path.

It define all the path type.

Enumerator
E_PATH_MOVE 

This type is move.

E_PATH_CURVE 

This type is curve.