pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "global.h"
#include "data.h"
#include "hid.h"
#include "hid_draw.h"
#include "../hidint.h"
#include "hid/common/draw_helpers.h"
Go to the source code of this file.
Data Structures | |
struct | hid_gc_struct |
Defines | |
#define | PEX(x, w) |
#define | PEY(y, w) |
Typedefs | |
typedef struct hid_gc_struct | hid_gc_struct |
Functions | |
static int | extents_set_layer (const char *name, int group, int empty) |
static hidGC | extents_make_gc (void) |
static void | extents_destroy_gc (hidGC gc) |
static void | extents_use_mask (enum mask_mode mode) |
static void | extents_set_color (hidGC gc, const char *name) |
static void | extents_set_line_cap (hidGC gc, EndCapStyle style) |
static void | extents_set_line_width (hidGC gc, Coord width) |
static void | extents_set_draw_xor (hidGC gc, int xor_) |
static void | extents_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
static void | extents_draw_arc (hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) |
static void | extents_draw_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
static void | extents_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius) |
static void | extents_fill_polygon (hidGC gc, int n_coords, Coord *x, Coord *y) |
static void | extents_fill_rect (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
void | hid_extents_init (void) |
BoxType * | hid_get_extents (void *item) |
Convenience function that calls the expose callback for the item, and returns the extents of what was drawn. | |
Variables | |
static BoxType | box |
static HID | extents_hid |
static HID_DRAW | extents_graphics |
#define PEX | ( | x, | |
w | |||
) |
Definition at line 96 of file extents.c.
Referenced by extents_draw_arc(), extents_draw_line(), extents_draw_rect(), extents_fill_circle(), extents_fill_polygon(), and extents_fill_rect().
#define PEY | ( | y, | |
w | |||
) |
Definition at line 98 of file extents.c.
Referenced by extents_draw_arc(), extents_draw_line(), extents_draw_rect(), extents_fill_circle(), extents_fill_polygon(), and extents_fill_rect().
typedef struct hid_gc_struct hid_gc_struct |
static void extents_destroy_gc | ( | hidGC | gc | ) | [static] |
Definition at line 65 of file extents.c.
Referenced by hid_extents_init().
static void extents_draw_arc | ( | hidGC | gc, |
Coord | cx, | ||
Coord | cy, | ||
Coord | width, | ||
Coord | height, | ||
Angle | start_angle, | ||
Angle | end_angle | ||
) | [static] |
Definition at line 111 of file extents.c.
References PEX, PEY, and hid_gc_struct::width.
Referenced by hid_extents_init().
Definition at line 102 of file extents.c.
References PEX, PEY, and hid_gc_struct::width.
Referenced by hid_extents_init().
Definition at line 120 of file extents.c.
References PEX, PEY, and hid_gc_struct::width.
Referenced by hid_extents_init().
Definition at line 129 of file extents.c.
Referenced by hid_extents_init().
Definition at line 136 of file extents.c.
Referenced by hid_extents_init().
Definition at line 147 of file extents.c.
Referenced by hid_extents_init().
static hidGC extents_make_gc | ( | void | ) | [static] |
Definition at line 57 of file extents.c.
References malloc().
Referenced by hid_extents_init().
static void extents_set_color | ( | hidGC | gc, |
const char * | name | ||
) | [static] |
Definition at line 76 of file extents.c.
Referenced by hid_extents_init().
static void extents_set_draw_xor | ( | hidGC | gc, |
int | xor_ | ||
) | [static] |
Definition at line 92 of file extents.c.
Referenced by hid_extents_init().
static int extents_set_layer | ( | const char * | name, |
int | group, | ||
int | empty | ||
) | [static] |
Definition at line 30 of file extents.c.
References LayerGroupType::Entries, PCBType::LayerGroups, max_copper_layer, max_group, PCB, SILK_LAYER, SL_ASSY, SL_INVISIBLE, SL_MASK, SL_PDRILL, SL_SILK, SL_TYPE, and SL_UDRILL.
Referenced by hid_extents_init().
static void extents_set_line_cap | ( | hidGC | gc, |
EndCapStyle | style | ||
) | [static] |
Definition at line 81 of file extents.c.
Referenced by hid_extents_init().
Definition at line 86 of file extents.c.
References hid_gc_struct::width.
Referenced by hid_extents_init().
static void extents_use_mask | ( | enum mask_mode | mode | ) | [static] |
Definition at line 71 of file extents.c.
Referenced by hid_extents_init().
void hid_extents_init | ( | void | ) |
Definition at line 159 of file extents.c.
References common_draw_helpers_init(), hid_st::description, hid_draw_st::destroy_gc, hid_draw_st::draw_arc, hid_draw_st::draw_line, hid_draw_st::draw_rect, extents_destroy_gc(), extents_draw_arc(), extents_draw_line(), extents_draw_rect(), extents_fill_circle(), extents_fill_polygon(), extents_fill_rect(), extents_graphics, extents_make_gc(), extents_set_color(), extents_set_draw_xor(), extents_set_layer(), extents_set_line_cap(), extents_set_line_width(), extents_use_mask(), hid_draw_st::fill_circle, hid_draw_st::fill_polygon, hid_draw_st::fill_rect, hid_st::graphics, hid_draw_st::make_gc, hid_st::name, hid_st::poly_before, hid_draw_st::set_color, hid_draw_st::set_draw_xor, hid_st::set_layer, hid_draw_st::set_line_cap, hid_draw_st::set_line_width, hid_st::struct_size, and hid_draw_st::use_mask.
Referenced by hid_get_extents().
BoxType* hid_get_extents | ( | void * | item | ) |
Convenience function that calls the expose callback for the item, and returns the extents of what was drawn.
Definition at line 199 of file extents.c.
References box, hid_expose_callback(), hid_extents_init(), region, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by lesstif_show_item().
Definition at line 22 of file extents.c.
Referenced by __r_find_neighbor_rect_in_reg(), _draw_pv_name(), ActionSelect(), ActionUnselect(), AddPart(), all_candidates_on_edge(), ArcArcIntersect(), bad_boy(), click_cb(), cluster_find(), cluster_vertices(), ComputeCost(), constraint_netlist(), contour_bounds_touch(), crosshair_update_range(), draw_pad_name(), Expand(), find_pairs(), flow_from_edge_to_edge(), GatherPadName(), GatherPVName(), GetArcEnds(), GetBoxMemory(), GetDataBoundingBox(), GetGridLockCoordinates(), hid_get_extents(), import_clusters(), insert_constraint_edge(), insert_vertex(), LineArcIntersect(), M_POLYAREA_update_primary(), maybe_pull_1(), moveable_edge(), mts_remove_one(), mtspace_create_box(), mtspace_remove(), print_cluster(), r_find_neighbor(), r_search_pt(), ReleaseMode(), ReportDialog(), ripout_livedraw_obj_cb(), rubber_callback(), SearchObjectByLocation(), SetBufferBoundingBox(), SetElementBoundingBox(), shrink_box(), toporouter_bbox_locate(), triangle_candidate_points_from_edge(), triangle_candidate_points_from_vertex(), vertex_net_keepaway(), vertex_net_thickness(), vertex_netlist(), XORDrawBuffer(), and XORDrawMoveOrCopyObject().
HID_DRAW extents_graphics [static] |
Definition at line 156 of file extents.c.
Referenced by hid_extents_init().
HID extents_hid [static] |