pcb 4.1.1
An interactive printed circuit board layout editor.

hid_draw_st Struct Reference

Low level drawing API Drawing Functions. More...

#include <hid_draw.h>

Collaboration diagram for hid_draw_st:

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)

Detailed Description

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.


Field Documentation

void(* hid_draw_st::fill_pcb_pad)(hidGC gc, PadType *pad, bool clip, bool mask)
void(* hid_draw_st::fill_pcb_pv)(hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask)
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::thindraw_pcb_pad)(hidGC gc, PadType *pad, bool clip, bool mask)

The documentation for this struct was generated from the following file: