pcb 4.1.1
An interactive printed circuit board layout editor.
|
Low level drawing API Drawing Functions. More...
#include <hid_draw.h>
Data Fields | |
hidGC(* | make_gc )(void) |
void(* | destroy_gc )(hidGC gc) |
void(* | use_mask )(enum mask_mode mode) |
void(* | set_color )(hidGC gc, const char *name) |
void(* | set_line_cap )(hidGC gc, EndCapStyle style) |
void(* | set_line_width )(hidGC gc, Coord width) |
void(* | set_draw_xor )(hidGC gc, int xor_) |
void(* | set_draw_faded )(hidGC gc, int faded) |
void(* | draw_line )(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
void(* | draw_arc )(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) |
void(* | draw_rect )(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
void(* | fill_circle )(hidGC gc, Coord cx, Coord cy, Coord radius) |
void(* | fill_polygon )(hidGC gc, int n_coords, Coord *x, Coord *y) |
void(* | fill_rect )(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) |
void(* | draw_grid )(BoxType *box) |
void(* | draw_pcb_line )(hidGC gc, LineType *line) |
void(* | draw_pcb_arc )(hidGC gc, ArcType *arc) |
void(* | draw_pcb_text )(hidGC gc, TextType *, Coord) |
void(* | draw_pcb_polygon )(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
void(* | fill_pcb_polygon )(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
void(* | thindraw_pcb_polygon )(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
void(* | fill_pcb_pad )(hidGC gc, PadType *pad, bool clip, bool mask) |
void(* | thindraw_pcb_pad )(hidGC gc, PadType *pad, bool clip, bool mask) |
void(* | fill_pcb_pv )(hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask) |
void(* | thindraw_pcb_pv )(hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask) |
Low level drawing API Drawing Functions.
Coordinates and distances are ALWAYS in PCB's default coordinates (1 nm at the time this comment was written).
Angles are always in degrees, with 0 being "right" (positive X) and 90 being "up" (positive Y).
Definition at line 52 of file hid_draw.h.
void(* hid_draw_st::destroy_gc)(hidGC gc) |
Definition at line 55 of file hid_draw.h.
Referenced by AutoRoute(), common_nogui_graphics_init(), gerber_set_layer(), ghid_shutdown_renderer(), hid_batch_init(), hid_eps_init(), hid_expose_callback(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().
void(* hid_draw_st::draw_arc)(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) |
Definition at line 86 of file hid_draw.h.
Referenced by _draw_pv(), common_draw_pcb_arc(), common_fill_pcb_pv(), common_nogui_graphics_init(), common_thindraw_pcb_pad(), common_thindraw_pcb_pv(), DrawAttached(), fab_circle(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), hole_callback(), PrintFab(), ps_ps_graphics_init(), rat_callback(), REGISTER_FLAGS(), thindraw_contour(), XORDrawAttachedArc(), XORDrawAttachedLine(), XORDrawBuffer(), XORDrawElement(), and XORDrawMoveOrCopyObject().
void(* hid_draw_st::draw_grid)(BoxType *box) |
Definition at line 93 of file hid_draw.h.
Referenced by ghid_drawing_area_expose_cb(), hid_lesstif_init(), idle_proc(), redraw_region(), and REGISTER_FLAGS().
Definition at line 85 of file hid_draw.h.
Referenced by common_draw_pcb_line(), common_fill_pcb_pad(), common_nogui_graphics_init(), common_thindraw_pcb_pad(), common_thindraw_pcb_pv(), draw_dashed_line(), draw_octagon_poly(), DrawAttached(), DrawEMark(), DrawMark(), fab_line(), gerber_set_layer(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), PrintFab(), ps_ps_graphics_init(), REGISTER_FLAGS(), thindraw_contour(), XORDrawAttachedLine(), XORDrawBuffer(), XORDrawElement(), XORDrawInsertPointObject(), XORDrawMoveOrCopyObject(), and XORPolygon().
void(* hid_draw_st::draw_pcb_arc)(hidGC gc, ArcType *arc) |
Definition at line 98 of file hid_draw.h.
Referenced by arc_callback(), common_draw_helpers_init(), draw_element_package(), and hid_gsvit_init().
void(* hid_draw_st::draw_pcb_line)(hidGC gc, LineType *line) |
Definition at line 97 of file hid_draw.h.
Referenced by common_draw_helpers_init(), common_draw_pcb_text(), draw_element_package(), hid_gsvit_init(), line_callback(), and rat_callback().
void(* hid_draw_st::draw_pcb_polygon)(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
Definition at line 100 of file hid_draw.h.
Referenced by common_draw_helpers_init(), common_nogui_graphics_init(), hid_gsvit_init(), hid_lesstif_init(), poly_callback(), ps_ps_graphics_init(), and REGISTER_FLAGS().
void(* hid_draw_st::draw_pcb_text)(hidGC gc, TextType *, Coord) |
Definition at line 99 of file hid_draw.h.
Referenced by _draw_pv_name(), common_draw_helpers_init(), draw_element_name(), draw_pad_name(), PrintFab(), text_at(), and text_callback().
Definition at line 87 of file hid_draw.h.
Referenced by common_nogui_graphics_init(), DrawAttached(), DrawLayer(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), REGISTER_FLAGS(), XORDrawBuffer(), and XORDrawMoveOrCopyObject().
Definition at line 88 of file hid_draw.h.
Referenced by common_fill_pcb_pad(), common_fill_pcb_pv(), common_nogui_graphics_init(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), hole_callback(), ps_ps_graphics_init(), and REGISTER_FLAGS().
void(* hid_draw_st::fill_pcb_pad)(hidGC gc, PadType *pad, bool clip, bool mask) |
Definition at line 104 of file hid_draw.h.
Referenced by _draw_pad(), common_draw_helpers_init(), common_nogui_graphics_init(), and hid_gsvit_init().
void(* hid_draw_st::fill_pcb_polygon)(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
Definition at line 102 of file hid_draw.h.
Referenced by common_draw_helpers_init(), common_gui_draw_pcb_polygon(), ghid_drawing_area_expose_cb(), ghid_init_renderer(), ghid_thindraw_pcb_polygon(), and hid_gsvit_init().
void(* hid_draw_st::fill_pcb_pv)(hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask) |
Definition at line 106 of file hid_draw.h.
Referenced by _draw_pv(), clearPin_callback(), common_draw_helpers_init(), common_nogui_graphics_init(), and hid_gsvit_init().
Definition at line 89 of file hid_draw.h.
Referenced by common_fill_pcb_pad(), common_nogui_graphics_init(), draw_octagon_poly(), fill_contour(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().
Definition at line 90 of file hid_draw.h.
Referenced by common_draw_pcb_text(), common_fill_pcb_pad(), common_fill_pcb_pv(), common_nogui_graphics_init(), DrawMaskBoardArea(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().
hidGC(* hid_draw_st::make_gc)(void) |
Make an empty graphics context.
Definition at line 54 of file hid_draw.h.
Referenced by AutoRoute(), common_nogui_graphics_init(), gerber_set_layer(), ghid_init_renderer(), hid_batch_init(), hid_eps_init(), hid_expose_callback(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().
void(* hid_draw_st::set_color)(hidGC gc, const char *name) |
Set a color. Names can be like "red" or "#rrggbb" or special names like "erase". *Always* use the "erase" color for removing ink (like polygon reliefs or thermals), as you cannot rely on knowing the background color or special needs of the HID. Always use the "drill" color to draw holes. You may assume this is cheap enough to call inside the redraw callback, but not cheap enough to call for each item drawn.
Definition at line 58 of file hid_draw.h.
Referenced by _draw_pv(), _draw_pv_name(), common_nogui_graphics_init(), draw_element_name(), draw_element_package(), draw_pad(), draw_pad_name(), draw_pin(), draw_via(), DrawAttached(), DrawEMark(), DrawLayer(), DrawMark(), DrawMask(), DrawMaskBoardArea(), DrawPaste(), hid_batch_init(), hid_eps_init(), hid_expose_callback(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), PrintFab(), ps_ps_graphics_init(), REGISTER_FLAGS(), set_object_color(), and text_callback().
void(* hid_draw_st::set_draw_faded)(hidGC gc, int faded) |
Blends 20% or so color with 80% background. Only used for assembly drawings so far.
Definition at line 77 of file hid_draw.h.
Referenced by common_nogui_graphics_init(), hid_gcode_init(), hid_gsvit_init(), hid_nelma_init(), PrintAssembly(), and ps_ps_graphics_init().
void(* hid_draw_st::set_draw_xor)(hidGC gc, int xor_) |
Definition at line 75 of file hid_draw.h.
Referenced by common_nogui_graphics_init(), DrawAttached(), DrawMark(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().
void(* hid_draw_st::set_line_cap)(hidGC gc, EndCapStyle style) |
Set the line style. While calling this is cheap, calling it with different values each time may be expensive, so grouping items by line style is helpful.
Definition at line 69 of file hid_draw.h.
Referenced by _draw_pv(), AutoRoute(), common_draw_pcb_arc(), common_draw_pcb_line(), common_fill_pcb_pad(), common_fill_pcb_pv(), common_nogui_graphics_init(), common_thindraw_pcb_pad(), common_thindraw_pcb_pv(), draw_octagon_poly(), DrawAttached(), DrawEMark(), DrawMark(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), hole_callback(), ps_ps_graphics_init(), REGISTER_FLAGS(), and thindraw_contour().
void(* hid_draw_st::set_line_width)(hidGC gc, Coord width) |
Definition at line 74 of file hid_draw.h.
Referenced by _draw_pv(), common_draw_pcb_arc(), common_draw_pcb_line(), common_fill_pcb_pad(), common_fill_pcb_pv(), common_nogui_graphics_init(), common_thindraw_pcb_pad(), common_thindraw_pcb_pv(), draw_octagon_poly(), DrawAttached(), DrawEMark(), DrawLayer(), DrawMark(), gerber_set_layer(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), hole_callback(), PrintFab(), ps_ps_graphics_init(), rat_callback(), REGISTER_FLAGS(), and thindraw_contour().
void(* hid_draw_st::thindraw_pcb_pad)(hidGC gc, PadType *pad, bool clip, bool mask) |
Definition at line 105 of file hid_draw.h.
Referenced by _draw_pad(), common_draw_helpers_init(), common_nogui_graphics_init(), and XORDrawElement().
void(* hid_draw_st::thindraw_pcb_polygon)(hidGC gc, PolygonType *poly, const BoxType *clip_box) |
Definition at line 103 of file hid_draw.h.
Referenced by common_draw_helpers_init(), common_gui_draw_pcb_polygon(), and ghid_init_renderer().
void(* hid_draw_st::thindraw_pcb_pv)(hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask) |
Definition at line 107 of file hid_draw.h.
Referenced by _draw_pv(), clearPin_callback(), common_draw_helpers_init(), common_nogui_graphics_init(), DrawAttached(), and thindraw_moved_pv().
void(* hid_draw_st::use_mask)(enum mask_mode mode) |
Definition at line 56 of file hid_draw.h.
Referenced by common_nogui_graphics_init(), DrawMask(), DrawMaskBoardArea(), DrawRats(), DrawSilk(), hid_batch_init(), hid_eps_init(), hid_extents_init(), hid_gcode_init(), hid_gerber_init(), hid_gsvit_init(), hid_lesstif_init(), hid_nelma_init(), hid_png_init(), ps_ps_graphics_init(), and REGISTER_FLAGS().