gerbv  2.10.1-dev~93f1b5
draw.c File Reference

Go to the source code of this file.

Functions

void draw_cairo_line_to (cairo_t *cairoTarget, gdouble x, gdouble y, gboolean adjustByHalf, gboolean pixelOutput)
 
void draw_cairo_move_to (cairo_t *cairoTarget, gdouble x, gdouble y, gboolean oddWidth, gboolean pixelOutput)
 
void draw_cairo_translate_adjust (cairo_t *cairoTarget, gdouble x, gdouble y, gboolean pixelOutput)
 
static gboolean draw_net_is_in_selection_buffer_remove (gerbv_net_t *net, gerbv_selection_info_t *selectionInfo, gboolean remove)
 
static void gerbv_draw_circle (cairo_t *cairoTarget, gdouble diameter)
 
static void gerbv_draw_rectangle (cairo_t *cairoTarget, gdouble width, gdouble height, gboolean pixelOutput)
 
static void gerbv_draw_oblong (cairo_t *cairoTarget, gdouble width, gdouble height)
 
static void draw_cairo_cross (cairo_t *cairoTarget, gdouble xc, gdouble yc, gdouble r)
 

Detailed Description

Cairo rendering functions and the related selection calculating functions.

Definition in file draw.c.

Function Documentation

◆ draw_cairo_cross()

static void draw_cairo_cross ( cairo_t *  cairoTarget,
gdouble  xc,
gdouble  yc,
gdouble  r 
)
static

Draw Cairo cross.

Parameters
xcCross center x coordinate.
ycCross center y coordinate.
rCross half size.

Definition at line 709 of file draw.c.

◆ draw_cairo_line_to()

void draw_cairo_line_to ( cairo_t *  cairoTarget,
gdouble  x,
gdouble  y,
gboolean  adjustByHalf,
gboolean  pixelOutput 
)

Draw Cairo line from current coordinates.

Parameters
xEnd of line x coordinate.
yEnd of line y coordinate.
adjustByHalfIncrease x and y by 0.5.
pixelOutputRound x and y coordinates to pixels.

Definition at line 55 of file draw.c.

◆ draw_cairo_move_to()

void draw_cairo_move_to ( cairo_t *  cairoTarget,
gdouble  x,
gdouble  y,
gboolean  oddWidth,
gboolean  pixelOutput 
)

Move Cairo coordinates.

Parameters
xMove to x coordinate.
yMove to y coordinate.
oddWidthIncrease x and y by 0.5.
pixelOutputRound x and y coordinates to pixels.

Definition at line 76 of file draw.c.

◆ draw_cairo_translate_adjust()

void draw_cairo_translate_adjust ( cairo_t *  cairoTarget,
gdouble  x,
gdouble  y,
gboolean  pixelOutput 
)

Cairo translate user-space origin.

Parameters
xThe x coordinate.
yThe y coordinate.
pixelOutputRound x and y coordinates to pixels.

Definition at line 96 of file draw.c.

◆ draw_net_is_in_selection_buffer_remove()

static gboolean draw_net_is_in_selection_buffer_remove ( gerbv_net_t net,
gerbv_selection_info_t selectionInfo,
gboolean  remove 
)
static

Check if net is in selection buffer and possibly deselect it.

Returns
TRUE if net is selected, FALSE if not selected.
Parameters
netChecked net.
selectionInfoSelection buffer.
removeTRUE for deselect net.

Definition at line 114 of file draw.c.

◆ gerbv_draw_circle()

static void gerbv_draw_circle ( cairo_t *  cairoTarget,
gdouble  diameter 
)
static

Draw the circle centered at current Cairo coordinates.

Parameters
diameterCircle diameter.

Definition at line 215 of file draw.c.

Referenced by gerbv_draw_oblong().

◆ gerbv_draw_oblong()

static void gerbv_draw_oblong ( cairo_t *  cairoTarget,
gdouble  width,
gdouble  height 
)
static

Draw the oblong centered at current Cairo coordinates.

Parameters
widthWidth of the oblong.
heightHeight of the oblong.

Definition at line 245 of file draw.c.

References gerbv_draw_circle().

◆ gerbv_draw_rectangle()

static void gerbv_draw_rectangle ( cairo_t *  cairoTarget,
gdouble  width,
gdouble  height,
gboolean  pixelOutput 
)
static

Draw the rectangle centered at current Cairo coordinates.

Parameters
widthWidth of the rectangle.
heightHeight of the rectangle.
pixelOutputRound width and height to pixels.

Definition at line 227 of file draw.c.