CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Data Structures | Macros | Enumerations | Functions | Variables
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_set_line_width (t_elayer *g, float width)
 Sets the line width that will be used by the t_elayer. More...
 
void egraphics_set_color_rgba (t_elayer *g, const t_rgba *rgba)
 Sets the color in rgba that will be used by the t_elayer. More...
 
void egraphics_set_color_rgb (t_elayer *g, const t_rgb *rgb)
 Sets the color in rgb that will be used by the t_elayer. More...
 
void egraphics_set_color_hex (t_elayer *g, t_symbol *hex)
 Sets the color in hexadecimal that will be used by the t_elayer. More...
 
void egraphics_set_color_hsla (t_elayer *g, const t_hsla *hsla)
 Sets the color in hsla that will be used by the t_elayer. More...
 
void egraphics_set_color_hsl (t_elayer *g, const t_hsl *hsl)
 Sets the color in hsl that will be used by the t_elayer. More...
 
void egraphics_matrix_init (t_matrix *x, float xx, float yx, float xy, float yy, float x0, float y0)
 Initializes a matrix. More...
 
void egraphics_set_matrix (t_elayer *g, const t_matrix *matrix)
 Initializes the t_matrix of a t_elayer. More...
 
void egraphics_rotate (t_elayer *g, float angle)
 Adds a rotation to the t_matrix of a t_elayer. More...
 
void egraphics_move_to (t_elayer *g, float x, float y)
 Starts a new path in a t_elayer. More...
 
void egraphics_line_to (t_elayer *g, float x, float y)
 Adds a line in the current path of a t_elayer. More...
 
void egraphics_curve_to (t_elayer *g, float ctrl1x, float ctrl1y, float ctrl2x, float ctrl2y, float endx, float endy)
 Adds a bezier curve in the current path of a t_elayer. More...
 
void egraphics_arc_to (t_elayer *g, float cx, float cy, float extend)
 Adds an arc to the current path of a t_elayer. More...
 
void egraphics_arc_oval_to (t_elayer *g, float cx, float cy, float radius, float extend)
 Adds an oval arc to the current path of a t_elayer. More...
 
void egraphics_line (t_elayer *g, float x0, float y0, float x1, float y1)
 Adds a new path at specific point and link it linearly to another. More...
 
void egraphics_curve (t_elayer *g, float startx, float starty, float ctrl1x, float ctrl1y, float ctrl2x, float ctrl2y, float endx, float endy)
 Adds a new path at specific point and continue the path with a curve. More...
 
void egraphics_line_fast (t_elayer *g, float x0, float y0, float x1, float y1)
 Adds a new path at specific point and link it linearly to another then draw directly the line. More...
 
void egraphics_close_path (t_elayer *g)
 Marks the current path as closed. More...
 
void egraphics_rectangle (t_elayer *g, float x, float y, float width, float height)
 Adds a rectangle in the t_elayer. More...
 
void egraphics_rectangle_rounded (t_elayer *g, float x, float y, float width, float height, float roundness)
 Adds a rounded rectangle in the t_elayer. More...
 
void egraphics_circle (t_elayer *g, float xc, float yc, float radius)
 Adds a circle in the t_elayer. More...
 
void egraphics_oval (t_elayer *g, float xc, float yc, float radiusx, float radiusy)
 Adds a oval in the t_elayer. More...
 
void egraphics_arc (t_elayer *g, float xc, float yc, float radius, float angle1, float angle2)
 Adds an arc in the t_elayer. More...
 
void egraphics_arc_oval (t_elayer *g, float xc, float yc, float radiusx, float radiusy, float angle1, float angle2)
 Adds an oval arc in the t_elayer. More...
 
t_etextetext_layout_create (void)
 Allocates a new t_etext layout. More...
 
void etext_layout_destroy (t_etext *textlayout)
 Frees a t_etext layout. More...
 
void etext_layout_set (t_etext *textlayout, const char *text, t_efont *font, float x, float y, float width, float height, etextanchor_flags anchor, etextjustify_flags justify, etextwrap_flags wrap)
 Initializes a t_etext. More...
 
void etext_layout_settextcolor (t_etext *textlayout, t_rgba *color)
 Sets the color of a t_etext layout. More...
 
t_efontefont_create (t_symbol *family, t_symbol *slant, t_symbol *weight, float size)
 Allocates a new t_efont. More...
 
void efont_destroy (t_efont *font)
 Frees a t_efont. More...
 
void egraphics_fill (t_elayer *g)
 Fills the t_elayer with the current path. More...
 
void egraphics_fill_preserve (t_elayer *g)
 Fills the t_elayer with the current path and preserves the current path. More...
 
void egraphics_stroke (t_elayer *g)
 Strokes the t_elayer with the current path. More...
 
void egraphics_stroke_preserve (t_elayer *g)
 Strokes the t_elayer with the current path and preserves the current path. More...
 
void etext_layout_draw (t_etext *textlayout, t_elayer *g)
 Draws the t_etext in a t_elayer. More...
 
void rgba_set (t_rgba *color, float red, float green, float blue, float alpha)
 Intialize a t_rgba color. More...
 
void rgb_set (t_rgb *color, float red, float green, float blue)
 Intialize a t_rgb color. More...
 
void hsla_set (t_hsla *color, float hue, float saturation, float lightness, float alpha)
 Intialize a t_hsla color. More...
 
void hsl_set (t_hsl *color, float hue, float saturation, float lightness)
 Intialize a t_hsl color. More...
 
char * rgba_to_hex (t_rgba color)
 Converts a t_rgba color to an hexadecimal color. More...
 
char * rgb_to_hex (t_rgb color)
 Converts a t_rgb color to an hexadecimal color. More...
 
char * hsla_to_hex (t_hsla color)
 Converts a t_hsla color to an hexadecimal color. More...
 
char * hsl_to_hex (t_hsl color)
 Converts a t_hsl color to an hexadecimal color. More...
 
t_hsla rgba_to_hsla (t_rgba color)
 Converts a t_rgba color to a t_hsla color. More...
 
t_hsl rgb_to_hsl (t_rgb color)
 Converts a t_rgb color to a t_hsl color. More...
 
t_rgba hex_to_rgba (char *color)
 Converts an hexadecimal color to a t_rgba color. More...
 
t_rgb hex_to_rgb (char *color)
 Converts an hexadecimal color to a t_rgb color. More...
 
t_rgba hsla_to_rgba (t_hsla color)
 Converts a t_hsla color to a t_rgba color. More...
 
t_rgb hsl_to_rgb (t_hsl color)
 Converts a t_hsl color to a t_rgb color. More...
 
t_rgba rgba_addContrast (t_rgba color, float contrast)
 Adds some constrast to a t_rgba color. More...
 
t_rgb rgb_addContrast (t_rgb color, float contrast)
 Adds some constrast to a t_rgb color. More...
 

Variables

const t_rgba rgba_black
 The pre-defined black t_rgba.
 
const t_rgba rgba_greydark
 The pre-defined grey dark t_rgba.
 
const t_rgba rgba_grey
 The pre-defined grey t_rgba.
 
const t_rgba rgba_greylight
 The pre-defined grey light t_rgba.
 
const t_rgba rgba_white
 The pre-defined white t_rgba.
 
const t_rgba rgba_blue
 The pre-defined blue t_rgba.
 
const t_rgba rgba_green
 The pre-defined green t_rgba.
 
const t_rgba rgba_red
 The pre-defined red t_rgba.
 

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.

Examples:
c.bang.cpp.
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.

Examples:
c.bang.cpp.
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.

Examples:
c.bang.cpp.
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.

Examples:
c.bang.cpp.
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.

Function Documentation

void egraphics_set_line_width ( t_elayer g,
float  width 
)

Sets the line width that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
widthThe line width in pixel.
void egraphics_set_color_rgba ( t_elayer g,
const t_rgba rgba 
)

Sets the color in rgba that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
rgbaThe t_rgba color.
void egraphics_set_color_rgb ( t_elayer g,
const t_rgb rgb 
)

Sets the color in rgb that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
rgbThe t_rgb color.
void egraphics_set_color_hex ( t_elayer g,
t_symbol hex 
)

Sets the color in hexadecimal that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
hexThe hexadecimal color.
void egraphics_set_color_hsla ( t_elayer g,
const t_hsla hsla 
)

Sets the color in hsla that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
hslaThe hsla color.
void egraphics_set_color_hsl ( t_elayer g,
const t_hsl hsl 
)

Sets the color in hsl that will be used by the t_elayer.

Parameters
gThe t_elayer pointer.
hslThe hsla color.
void egraphics_matrix_init ( t_matrix x,
float  xx,
float  yx,
float  xy,
float  yy,
float  x0,
float  y0 
)

Initializes a matrix.

Parameters
xThe t_matrix pointer.
xxThe xx coefficient.
yxThe yx coefficient.
xyThe xy coefficient.
yyThe yy coefficient.
x0The abscissa offset.
y0The ordiante offset.
void egraphics_set_matrix ( t_elayer g,
const t_matrix matrix 
)

Initializes the t_matrix of a t_elayer.

Parameters
gThe t_elayer pointer.
matrixThe t_matrix pointer.
void egraphics_rotate ( t_elayer g,
float  angle 
)

Adds a rotation to the t_matrix of a t_elayer.

Parameters
gThe t_elayer pointer.
angleThe offset of rotation in radian.
void egraphics_move_to ( t_elayer g,
float  x,
float  y 
)

Starts a new path in a t_elayer.

All paths should start will the function.

Parameters
gThe t_elayer pointer.
xThe abscissa of the new path.
yThe ordiante of the new path.
void egraphics_line_to ( t_elayer g,
float  x,
float  y 
)

Adds a line in the current path of a t_elayer.

The start point is the previous point in the path.

Parameters
gThe t_elayer pointer.
xThe abscissa of the end point.
yThe ordiante of the end point.
void egraphics_curve_to ( t_elayer g,
float  ctrl1x,
float  ctrl1y,
float  ctrl2x,
float  ctrl2y,
float  endx,
float  endy 
)

Adds a bezier curve in the current path of a t_elayer.

The first point of the curve is the previous point in the path.

Parameters
gThe t_elayer pointer.
ctrl1xThe abscissa of the first control point.
ctrl1yThe ordiante of the first control point.
ctrl2xThe abscissa of the second control point.
ctrl2yThe ordiante of the second control point.
endxThe abscissa of the end point.
endyThe ordiante of the end point.
void egraphics_arc_to ( t_elayer g,
float  cx,
float  cy,
float  extend 
)

Adds an arc to the current path of a t_elayer.

The start point of the arc is the previous point in the path.

Parameters
gThe t_elayer pointer.
cxThe abscissa of the center of the arc.
cyThe ordiante of the center of the arc.
extendThe extend angle in radian.
void egraphics_arc_oval_to ( t_elayer g,
float  cx,
float  cy,
float  radius,
float  extend 
)

Adds an oval arc to the current path of a t_elayer.

The start point of the oval arc is the previous point in the path and the first radius of the oval is compute with the center of the oval arc.

Parameters
gThe t_elayer pointer.
cxThe abscissa of the center of the oval arc.
cyThe ordiante of the center of the oval arc.
radiusThe second radius of the oval arc.
extendThe extend angle in radian.
void egraphics_line ( t_elayer g,
float  x0,
float  y0,
float  x1,
float  y1 
)

Adds a new path at specific point and link it linearly to another.

This function just call egraphics_move_to and egraphics_line_to.

Parameters
gThe t_elayer pointer.
x0The abscissa of the first point.
y0The ordiante of the first point.
x1The abscissa of the second point.
y1The ordiante of the second point.
void egraphics_curve ( t_elayer g,
float  startx,
float  starty,
float  ctrl1x,
float  ctrl1y,
float  ctrl2x,
float  ctrl2y,
float  endx,
float  endy 
)

Adds a new path at specific point and continue the path with a curve.

This function just call egraphics_move_to and egraphics_curve_to.

Parameters
gThe t_elayer pointer.
startxThe abscissa of the first point.
startyThe ordiante of the first point.
ctrl1xThe abscissa of the first control point.
ctrl1yThe ordiante of the first control point.
ctrl2xThe abscissa of the second control point.
ctrl2yThe ordiante of the second control point.
endxThe abscissa of the end point.
endyThe ordiante of the end point.
void egraphics_line_fast ( t_elayer g,
float  x0,
float  y0,
float  x1,
float  y1 
)

Adds a new path at specific point and link it linearly to another then draw directly the line.

This function just call egraphics_move_to, egraphics_line_to and egraphics_stroke.

Parameters
gThe t_elayer pointer.
x0The abscissa of the first point.
y0The ordiante of the first point.
x1The abscissa of the second point.
y1The ordiante of the second point.
void egraphics_close_path ( t_elayer g)

Marks the current path as closed.

Parameters
gThe t_elayer pointer.
void egraphics_rectangle ( t_elayer g,
float  x,
float  y,
float  width,
float  height 
)

Adds a rectangle in the t_elayer.

Parameters
gThe t_elayer pointer.
xThe abscissa of the rectangle.
yThe ordiante of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
void egraphics_rectangle_rounded ( t_elayer g,
float  x,
float  y,
float  width,
float  height,
float  roundness 
)

Adds a rounded rectangle in the t_elayer.

Parameters
gThe t_elayer pointer.
xThe abscissa of the rectangle.
yThe ordiante of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
roundnessThe roundness of the angles in pixel.
void egraphics_circle ( t_elayer g,
float  xc,
float  yc,
float  radius 
)

Adds a circle in the t_elayer.

Parameters
gThe t_elayer pointer.
xcThe abscissa of the center of the circle.
ycThe ordiante of the center of the circle.
radiusThe radius of the circle.
void egraphics_oval ( t_elayer g,
float  xc,
float  yc,
float  radiusx,
float  radiusy 
)

Adds a oval in the t_elayer.

Parameters
gThe t_elayer pointer.
xcThe abscissa of the center of the oval.
ycThe ordiante of the center of the oval.
radiusxThe horizontal radius of the circle.
radiusyThe vertical radius of the circle.
void egraphics_arc ( t_elayer g,
float  xc,
float  yc,
float  radius,
float  angle1,
float  angle2 
)

Adds an arc in the t_elayer.

Parameters
gThe t_elayer pointer.
xcThe abscissa of the center of the arc.
ycThe ordiante of the center of the arc.
radiusThe radius of the arc.
angle1The first angle of the arc in radian.
angle2The second angle of the arc in radian.
void egraphics_arc_oval ( t_elayer g,
float  xc,
float  yc,
float  radiusx,
float  radiusy,
float  angle1,
float  angle2 
)

Adds an oval arc in the t_elayer.

Parameters
gThe t_elayer pointer.
xcThe abscissa of the center of the oval arc.
ycThe ordiante of the center of the oval arc.
radiusxThe horizontal radius of the oval arc.
radiusyThe vertical radius of the oval arc.
angle1The first angle of the oval arc in radian.
angle2The second angle of the oval arc in radian.
t_etext* etext_layout_create ( void  )

Allocates a new t_etext layout.

Returns
The new t_etext pointer.
void etext_layout_destroy ( t_etext textlayout)

Frees a t_etext layout.

Parameters
textlayoutThe t_etext pointer.
void etext_layout_set ( t_etext textlayout,
const char *  text,
t_efont font,
float  x,
float  y,
float  width,
float  height,
etextanchor_flags  anchor,
etextjustify_flags  justify,
etextwrap_flags  wrap 
)

Initializes a t_etext.

Parameters
textlayoutThe t_etext pointer.
textThe text to draw.
fontThe t_efont to use.
xThe absicssa position of the t_etext.
yThe ordinate position of the t_etext.
widthThe width of the t_etext.
heightThe height of the t_etext.
anchorThe anchor of the text.
justifyThe justification of the text.
wrapif the text should be wrap or not.
void etext_layout_settextcolor ( t_etext textlayout,
t_rgba color 
)

Sets the color of a t_etext layout.

Parameters
textlayoutThe t_etext pointer.
colorThe t_rgba color pointer.
t_efont* efont_create ( t_symbol family,
t_symbol slant,
t_symbol weight,
float  size 
)

Allocates a new t_efont.

Parameters
familyThe font family.
slantThe font slant.
weightThe font weight.
sizeThe font size.
Returns
The new t_efont pointer.
void efont_destroy ( t_efont font)

Frees a t_efont.

Parameters
fontThe t_efont pointer.
void egraphics_fill ( t_elayer g)

Fills the t_elayer with the current path.

Parameters
gThe t_elayer pointer.
void egraphics_fill_preserve ( t_elayer g)

Fills the t_elayer with the current path and preserves the current path.

Parameters
gThe t_elayer pointer.
void egraphics_stroke ( t_elayer g)

Strokes the t_elayer with the current path.

Parameters
gThe t_elayer pointer.
void egraphics_stroke_preserve ( t_elayer g)

Strokes the t_elayer with the current path and preserves the current path.

Parameters
gThe t_elayer pointer.
void etext_layout_draw ( t_etext textlayout,
t_elayer g 
)

Draws the t_etext in a t_elayer.

Parameters
textlayoutThe t_etext pointer.
gThe t_elayer pointer.
void rgba_set ( t_rgba color,
float  red,
float  green,
float  blue,
float  alpha 
)

Intialize a t_rgba color.

Parameters
colorThe t_rgba color.
redThe red component.
greenThe green component.
blueThe blue component.
alphaThe alpha component.
void rgb_set ( t_rgb color,
float  red,
float  green,
float  blue 
)

Intialize a t_rgb color.

Parameters
colorThe t_rgb color.
redThe red component.
greenThe green component.
blueThe blue component.
void hsla_set ( t_hsla color,
float  hue,
float  saturation,
float  lightness,
float  alpha 
)

Intialize a t_hsla color.

Parameters
colorThe t_hsla color.
hueThe hue component.
saturationThe saturation component.
lightnessThe luminosity component.
alphaThe alpha component.
void hsl_set ( t_hsl color,
float  hue,
float  saturation,
float  lightness 
)

Intialize a t_hsl color.

Parameters
colorThe t_hsl color.
hueThe hue component.
saturationThe saturation component.
lightnessThe luminosity component.
char* rgba_to_hex ( t_rgba  color)

Converts a t_rgba color to an hexadecimal color.

Parameters
colorThe t_rgba color.
Returns
The hexadecimal color.
char* rgb_to_hex ( t_rgb  color)

Converts a t_rgb color to an hexadecimal color.

Parameters
colorThe t_rgb color.
Returns
The hexadecimal color.
char* hsla_to_hex ( t_hsla  color)

Converts a t_hsla color to an hexadecimal color.

Parameters
colorThe t_hsla color.
Returns
The hexadecimal color.
char* hsl_to_hex ( t_hsl  color)

Converts a t_hsl color to an hexadecimal color.

Parameters
colorThe t_hsl color.
Returns
The hexadecimal color.
t_hsla rgba_to_hsla ( t_rgba  color)

Converts a t_rgba color to a t_hsla color.

Parameters
colorThe t_rgba color.
Returns
The t_hsla color.
t_hsl rgb_to_hsl ( t_rgb  color)

Converts a t_rgb color to a t_hsl color.

Parameters
colorThe t_rgb color.
Returns
The t_hsl color.
t_rgba hex_to_rgba ( char *  color)

Converts an hexadecimal color to a t_rgba color.

Parameters
colorThe hexadecimal color.
Returns
The t_rgba color.
t_rgb hex_to_rgb ( char *  color)

Converts an hexadecimal color to a t_rgb color.

Parameters
colorThe hexadecimal color.
Returns
The t_rgb color.
t_rgba hsla_to_rgba ( t_hsla  color)

Converts a t_hsla color to a t_rgba color.

Parameters
colorThe t_hsla color.
Returns
The t_rgba color.
t_rgb hsl_to_rgb ( t_hsl  color)

Converts a t_hsl color to a t_rgb color.

Parameters
colorThe t_hsl color.
Returns
The t_rgb color.
t_rgba rgba_addContrast ( t_rgba  color,
float  contrast 
)

Adds some constrast to a t_rgba color.

Adds the constrast value to all the component of the color.

Parameters
colorThe t_rgba color.
contrastThe contrast value.
Returns
The new t_rgba color.
t_rgb rgb_addContrast ( t_rgb  color,
float  contrast 
)

Adds some constrast to a t_rgb color.

Adds the constrast value to all the component of the color.

Parameters
colorThe t_rgb color.
contrastThe contrast value.
Returns
The new t_rgb color.