pcb 4.1.1
An interactive printed circuit board layout editor.

hid_draw.h

Go to the documentation of this file.
00001 
00034 enum mask_mode
00035 {
00036   HID_MASK_OFF    = 0, 
00037   HID_MASK_BEFORE = 1, 
00038   HID_MASK_CLEAR  = 2, 
00039   HID_MASK_AFTER  = 3, 
00040 };
00041 
00042 
00052 struct hid_draw_st
00053 {
00054   hidGC (*make_gc) (void); 
00055   void (*destroy_gc) (hidGC gc);
00056   void (*use_mask) (enum mask_mode mode);
00057 
00058   void (*set_color) (hidGC gc, const char *name);
00069   void (*set_line_cap) (hidGC gc, EndCapStyle style);
00074   void (*set_line_width) (hidGC gc, Coord width);
00075   void (*set_draw_xor) (hidGC gc, int xor_);
00076 
00077   void (*set_draw_faded) (hidGC gc, int faded);
00082   /* The usual drawing functions.  "draw" means to use segments of the
00083      given width, whereas "fill" means to fill to a zero-width
00084      outline.  */
00085   void (*draw_line)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
00086   void (*draw_arc)     (hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle);
00087   void (*draw_rect)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
00088   void (*fill_circle)  (hidGC gc, Coord cx, Coord cy, Coord radius);
00089   void (*fill_polygon) (hidGC gc, int n_coords, Coord *x, Coord *y);
00090   void (*fill_rect)    (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2);
00091 
00092   /* draw the grid in the specified region */
00093   void (*draw_grid)    (BoxType * box);
00094   
00095   /* The following APIs render using PCB data-structures, not immediate parameters */
00096 
00097   void (*draw_pcb_line) (hidGC gc, LineType *line);
00098   void (*draw_pcb_arc) (hidGC gc, ArcType *arc);
00099   void (*draw_pcb_text) (hidGC gc, TextType *, Coord);
00100   void (*draw_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
00101 
00102   void (*fill_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
00103   void (*thindraw_pcb_polygon) (hidGC gc, PolygonType *poly, const BoxType *clip_box);
00104   void (*fill_pcb_pad) (hidGC gc, PadType *pad, bool clip, bool mask);
00105   void (*thindraw_pcb_pad) (hidGC gc, PadType *pad, bool clip, bool mask);
00106   void (*fill_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
00107   void (*thindraw_pcb_pv) (hidGC fg_gc, hidGC bg_gc, PinType *pv, bool drawHole, bool mask);
00108 
00109 };