pcb 4.1.1
An interactive printed circuit board layout editor.

draw_helpers.c File Reference

#include "global.h"
#include "hid.h"
#include "hid_draw.h"
#include "data.h"
#include "rotate.h"
#include "polygon.h"
#include "draw_helpers.h"
Include dependency graph for draw_helpers.c:

Go to the source code of this file.

Data Structures

struct  FloatPolyType

Defines

#define BOUNDS_INSIDE_CLIP_THRESHOLD   0.5

Functions

void common_draw_pcb_line (hidGC gc, LineType *line)
void common_draw_pcb_arc (hidGC gc, ArcType *arc)
static void common_draw_pcb_text (hidGC gc, TextType *Text, Coord min_line_width)
static void fill_contour (hidGC gc, PLINE *pl)
static void thindraw_contour (hidGC gc, PLINE *pl)
static void fill_contour_cb (PLINE *pl, void *user_data)
static void fill_clipped_contour (hidGC gc, PLINE *pl, const BoxType *clip_box)
static int should_compute_no_holes (PolygonType *poly, const BoxType *clip_box)
void common_gui_draw_pcb_polygon (hidGC gc, PolygonType *polygon, const BoxType *clip_box)
void common_fill_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
static int thindraw_hole_cb (PLINE *pl, void *user_data)
void common_thindraw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
void common_thindraw_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
static void common_get_pad_polygon (Coord x[4], Coord y[4], const PadType *l, int w)
void common_fill_pcb_pad (hidGC gc, PadType *pad, bool clear, bool mask)
static void draw_octagon_poly (hidGC gc, Coord X, Coord Y, Coord Thickness, bool thin_draw)
void common_fill_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask)
void common_thindraw_pcb_pv (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask)
void common_draw_helpers_init (HID_DRAW *graphics)

Define Documentation

#define BOUNDS_INSIDE_CLIP_THRESHOLD   0.5

Definition at line 226 of file draw_helpers.c.

Referenced by should_compute_no_holes().


Function Documentation

void common_draw_pcb_line ( hidGC  gc,
LineType line 
)
void common_fill_pcb_pad ( hidGC  gc,
PadType pad,
bool  clear,
bool  mask 
)
void common_fill_pcb_pv ( hidGC  fg_gc,
hidGC  bg_gc,
PinType pv,
bool  drawHole,
bool  mask 
)
static void common_get_pad_polygon ( Coord  x[4],
Coord  y[4],
const PadType l,
int  w 
) [static]

Definition at line 429 of file draw_helpers.c.

Referenced by common_fill_pcb_pad().

void common_gui_draw_pcb_polygon ( hidGC  gc,
PolygonType polygon,
const BoxType clip_box 
)
void common_thindraw_pcb_pad ( hidGC  gc,
PadType pad,
bool  clear,
bool  mask 
)
void common_thindraw_pcb_polygon ( hidGC  gc,
PolygonType poly,
const BoxType clip_box 
)

Definition at line 334 of file draw_helpers.c.

References polygon_st::Clipped, POLYAREA::contours, POLYAREA::f, poly, PolygonHoles(), TEST_FLAG, thindraw_contour(), and thindraw_hole_cb().

Referenced by common_draw_helpers_init(), and ghid_thindraw_pcb_polygon().

Here is the call graph for this function:

void common_thindraw_pcb_pv ( hidGC  fg_gc,
hidGC  bg_gc,
PinType pv,
bool  drawHole,
bool  mask 
)
static void draw_octagon_poly ( hidGC  gc,
Coord  X,
Coord  Y,
Coord  Thickness,
bool  thin_draw 
) [static]
static void fill_clipped_contour ( hidGC  gc,
PLINE pl,
const BoxType clip_box 
) [static]
static void fill_contour ( hidGC  gc,
PLINE pl 
) [static]

Definition at line 123 of file draw_helpers.c.

References PLINE::Count, hid_draw_st::fill_polygon, hid_st::graphics, gui, PLINE::head, malloc(), n, VNODE::point, x, and y.

Referenced by common_fill_pcb_polygon(), fill_clipped_contour(), and fill_contour_cb().

Here is the call graph for this function:

static void fill_contour_cb ( PLINE pl,
void *  user_data 
) [static]

Definition at line 184 of file draw_helpers.c.

References fill_contour(), and poly_FreeContours().

Referenced by common_fill_pcb_polygon().

Here is the call graph for this function:

static int should_compute_no_holes ( PolygonType poly,
const BoxType clip_box 
) [static]
static int thindraw_hole_cb ( PLINE pl,
void *  user_data 
) [static]

Definition at line 326 of file draw_helpers.c.

References thindraw_contour().

Referenced by common_thindraw_pcb_polygon().

Here is the call graph for this function: