58 |
|
|
59 |
static GC depth_one_gc; |
static GC depth_one_gc; |
60 |
|
|
|
static Pixmap stipple_pm; |
|
|
|
|
|
if(!stipple_pm){ |
|
|
|
|
|
stipple_pm=XCreatePixmap |
|
|
(display,root_window,2,2,1); |
|
|
|
|
|
depth_one_gc=XCreateGC(display,stipple_pm,0,0); |
|
|
|
|
|
XSetForeground(display,depth_one_gc,BlackPixelOfScreen(screen_ptr)); |
|
|
XFillRectangle(display,stipple_pm,depth_one_gc,0,0,2,2); |
|
|
|
|
|
XSetForeground(display,depth_one_gc,WhitePixelOfScreen(screen_ptr)); |
|
|
XDrawPoint(display,stipple_pm,depth_one_gc,1,1); |
|
|
XDrawPoint(display,stipple_pm,depth_one_gc,2,2); |
|
|
|
|
|
XSetStipple(display,gc,stipple_pm); |
|
|
} |
|
|
|
|
61 |
radius = get_atom_radius(si); |
radius = get_atom_radius(si); |
62 |
|
|
63 |
gcv.foreground=atoms[si].pixel; |
gcv.foreground=atoms[si].pixel; |
87 |
0, |
0, |
88 |
360*64); |
360*64); |
89 |
|
|
90 |
if((atoms[si].sel == 1)) |
if(atoms[si].sel == 1) |
91 |
{ |
{ |
|
/* stipple */ |
|
|
gcv.foreground = BlackPixelOfScreen(screen_ptr); |
|
|
gcv.fill_style = FillStippled; |
|
|
|
|
|
XChangeGC(display, |
|
|
gc, |
|
|
GCForeground | GCFillStyle, |
|
|
&gcv); |
|
|
|
|
|
XFillArc (display, |
|
|
canvas_pm, |
|
|
gc, |
|
|
(int) (canvas_coord[0] - radius), |
|
|
(int) (canvas_coord[1] - radius), |
|
|
(int) (2.0 * radius), |
|
|
(int) (2.0 * radius), |
|
|
0, |
|
|
360*64); |
|
|
|
|
|
gcv.fill_style = FillSolid; |
|
|
|
|
|
XChangeGC(display, |
|
|
gc, |
|
|
GCFillStyle, |
|
|
&gcv); |
|
|
|
|
92 |
} |
} |
93 |
} |
} |
94 |
|
|
95 |
gcv.fill_style=FillSolid; |
if (atoms[si].sel == 1) |
96 |
gcv.foreground=BlackPixelOfScreen(screen_ptr); |
{ |
97 |
|
gcv.foreground = sel_color.pixel; |
98 |
|
} |
99 |
|
else |
100 |
|
{ |
101 |
|
gcv.foreground = BlackPixelOfScreen (screen_ptr); |
102 |
|
} |
103 |
|
|
104 |
XChangeGC(display,gc,GCFillStyle|GCForeground,&gcv); |
XChangeGC (display, gc, GCForeground, &gcv); |
105 |
|
|
106 |
XDrawArc |
XDrawArc |
107 |
(display, |
(display, |
179 |
gcv.foreground=BlackPixelOfScreen(screen_ptr); |
gcv.foreground=BlackPixelOfScreen(screen_ptr); |
180 |
XChangeGC(display,gc,GCForeground,&gcv); |
XChangeGC(display,gc,GCForeground,&gcv); |
181 |
|
|
|
if(atoms[si].sel){ /* Add stippled overlay */ |
|
|
gcv.fill_style=FillStippled; |
|
|
XChangeGC(display,gc,GCFillStyle,&gcv); |
|
|
|
|
|
XFillPolygon(display, |
|
|
canvas_pm, |
|
|
gc, |
|
|
bond_points, |
|
|
4, |
|
|
Complex, |
|
|
CoordModeOrigin); |
|
|
|
|
|
gcv.fill_style=FillSolid; |
|
|
XChangeGC(display,gc,GCFillStyle,&gcv); |
|
|
} |
|
|
|
|
182 |
gcv.foreground=atoms[sj].pixel; |
gcv.foreground=atoms[sj].pixel; |
183 |
XChangeGC(display,gc,GCForeground,&gcv); |
XChangeGC(display,gc,GCForeground,&gcv); |
184 |
|
|
207 |
gcv.foreground=BlackPixelOfScreen(screen_ptr); |
gcv.foreground=BlackPixelOfScreen(screen_ptr); |
208 |
XChangeGC(display,gc,GCForeground,&gcv); |
XChangeGC(display,gc,GCForeground,&gcv); |
209 |
|
|
|
if(atoms[sj].sel){ /* Add stippled overlay */ |
|
|
gcv.fill_style=FillStippled; |
|
|
XChangeGC(display,gc,GCFillStyle,&gcv); |
|
|
|
|
|
XFillPolygon(display, |
|
|
canvas_pm, |
|
|
gc, |
|
|
bond_points, |
|
|
4, |
|
|
Complex, |
|
|
CoordModeOrigin); |
|
|
|
|
|
gcv.fill_style=FillSolid; |
|
|
XChangeGC(display,gc,GCFillStyle,&gcv); |
|
|
} |
|
|
|
|
210 |
/* Draw the lines 0-2-3-5-0 */ |
/* Draw the lines 0-2-3-5-0 */ |
211 |
|
|
212 |
bond_points[0].x = canvas_bond_points[0].x; |
bond_points[0].x = canvas_bond_points[0].x; |