1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
|
2004-10-04 Keith Packard <keithp@keithp.com>
* twin_font.c: (twin_has_ucs4), (twin_path_ucs4):
Delete old glyph representation support code.
* twin_geom.c: (_twin_distance_to_line_squared):
Oops -- overflow not handled correctly in distance functions.
* twin_glyphs.c:
Replace new glyphs with versions using splines.
* xtwin.c: (main):
Whack around the default presentation a bit more
2004-10-04 Keith Packard <keithp@keithp.com>
* twin.h:
* twin_draw.c: (twin_composite):
Fix a clipping bug
* twinint.h:
* twin_font.c: (_snap), (_twin_g_base), (_twin_pen_size),
(twin_text_metrics_ucs4), (twin_add_snap), (twin_n_in_spline),
(twin_spline_fit), (_ucs4_string), (px), (py), (twin_dump_glyphs),
(twin_path_ucs4), (twin_text_metrics_utf8):
* twin_glyphs.c:
Change glyph representation to allow splines and include metrics.
* twin_matrix.c: (_twin_matrix_expand):
* twin_path.c: (twin_path_rmove), (twin_path_rdraw):
Add some new helper functions.
* twin_spline.c:
Expose _twin_path_scurve for glyphs
* twin_trig.c:
Increase sin table precision.
* twin_x11.c: (_twin_x11_put_span), (twin_x11_screen_damaged),
(twin_x11_damage):
Fix off-by-one error in y position.
Lock screen while adding expose damage
* xtwin.c: (twin_clock_face), (twin_clock), (main):
Change clock appearance. Use corrected glyph metrics
2004-10-01 Keith Packard <keithp@keithp.com>
* twin.h:
* twin_fixed.c:
* twin_font.c: (twin_text_metrics_ucs4), (twin_path_ucs4),
(twin_text_metrics_utf8):
* twin_screen.c: (twin_screen_create), (twin_screen_update):
* twin_x11.c: (_twin_x11_put_begin), (_twin_x11_put_span),
* twin_x11.h:
(twin_x11_create):
Add put_begin to screen structure so that the backend can batch
updates.
Add twin_int_to_fixed.
Inline twin_fixed_mul and twin_fixed_div using int64_t.
Add twin_text_metrics_utf8.
Hard-code the max number of vertices in a glyph.
Set various ICCCM properties to make X wms happy.
* twin_path.c: (_twin_matrix_max_radius), (twin_path_circle):
Use better approximation of ellipse major axis radius when
drawing circles.
* twin_poly.c: (_twin_edge_fill):
Compiler warning.
* twinint.h:
Delete duplicate twin_over definition
* xtwin.c: (twin_clock_hand), (twin_clock_face), (twin_clock),
(twin_app_thread), (twin_start_app), (twin_start_clock), (main):
Allow for multiple clocks, and add watermark. Note that
text metrics are quite broken currently.
2004-09-30 Keith Packard <keithp@keithp.com>
* Makefile.am:
* configure.ac:
* twin.h:
* twin_draw.c: (twin_composite), (twin_fill):
* twin_font.c: (_snap), (_twin_pen_size), (twin_text_metrics_ucs4),
(twin_path_ucs4), (twin_width_utf8):
Handle unhinted text.
* twin_path.c: (twin_path_close), (twin_path_bounds),
(twin_composite_path), (twin_paint_path), (twin_composite_stroke),
(twin_paint_stroke):
Add helper functions
* twin_pixmap.c: (twin_pixmap_create), (twin_pixmap_show),
(twin_pixmap_hide), (twin_pixmap_enable_update),
(twin_pixmap_disable_update), (twin_pixmap_lock),
(twin_pixmap_unlock):
Lock pixmaps during drawing
* twin_poly.c: (_twin_edge_build), (twin_fill_path):
* twin_screen.c: (twin_screen_create), (twin_screen_lock),
(twin_screen_unlock), (twin_screen_register_damaged),
(twin_screen_enable_update), (twin_screen_disable_update),
(twin_screen_damage), (twin_screen_update):
Disable screen updates while applications are busy
* twin_x11.c: (twin_x11_damage_thread), (twin_x11_event_thread),
(twin_x11_screen_damaged), (twin_x11_create), (twin_x11_destroy):
Add threads to manage events and redisplay
* twinint.h:
* xtwin.c: (twin_clock_hand), (twin_clock_minute_angle),
(twin_clock_face), (twin_clock), (main):
Paint a clock
2004-09-27 Keith Packard <keithp@keithp.com>
* twin.h:
* twin_fixed.c: (twin_fixed_div), (twin_fixed_sqrt),
(_twin_sfixed_sqrt):
Add some more fixed point functions
* twin_font.c: (_snap), (_add_snap), (_twin_pen_size),
(twin_text_metrics_ucs4), (twin_path_ucs4), (twin_width_ucs4):
Reimplement text snapping. Note that things are snapped to
user units, not pixels. Snapping to pixels requires some
thought about rotating transformations.
* twin_matrix.c: (_twin_matrix_len):
* twin_path.c: (twin_path_close), (twin_path_circle):
Oops. Closed paths don't necessarily need to join ends,
but circles do.
* twinint.h:
* xtwin.c: (main):
Random new tests.
2004-09-27 Keith Packard <keithp@keithp.com>
* Makefile.am:
* twin.h:
* twin_convolve.c: (_twin_path_leftpoint), (_around_order),
(_angle), (_twin_subpath_convolve):
* twin_fixed.c: (twin_fixed_mul):
* twin_font.c: (twin_path_ucs4), (twin_width_ucs4),
(twin_path_utf8):
* twin_geom.c: (_twin_distance_to_point_squared),
(_twin_distance_to_line_squared):
* twin_hull.c: (_twin_slope_init), (_twin_hull_create),
(_twin_hull_vertex_compare), (_twin_hull_eliminate_concave),
(_twin_hull_to_path):
* twin_matrix.c: (_twin_dump_matrix), (_twin_matrix_multiply),
(twin_matrix_identity), (twin_matrix_translate),
(twin_matrix_scale), (_twin_matrix_determinant),
(twin_matrix_rotate), (_twin_matrix_x), (_twin_matrix_y),
(_twin_matrix_dx), (_twin_matrix_dy):
* twin_path.c: (_twin_current_subpath_len),
(_twin_path_current_spoint), (_twin_path_subpath_first_spoint),
(_twin_path_smove), (_twin_path_sdraw), (twin_path_move),
(twin_path_draw), (twin_path_close), (twin_path_circle),
(twin_path_set_matrix), (twin_path_current_matrix),
(twin_path_identity), (twin_path_translate), (twin_path_scale),
(twin_path_rotate), (twin_path_set_font_size),
(twin_path_current_font_size), (twin_path_set_font_style),
(twin_path_current_font_style), (twin_path_append),
(twin_path_save), (twin_path_restore), (twin_path_create):
* twin_poly.c: (_edge_step_by), (_twin_sfixed_grid_ceil),
(_twin_edge_build), (_span_fill), (_twin_edge_fill),
(twin_fill_path):
* twin_spline.c: (_lerp_half), (_de_casteljau),
(_twin_spline_decompose), (_twin_path_scurve), (twin_path_curve):
* twin_trig.c: (twin_sin), (twin_cos), (twin_tan):
* twinint.h:
* xtwin.c: (main):
Add affine transformation support.
Fix convex hull to eliminate all points colinear with extreme.
Note that text snapping is currently broken.
2004-09-26 Keith Packard <keithp@keithp.com>
* twin_convolve.c: (_twin_subpath_convolve):
Eliminate special case for closed paths. Just draw caps at
both ends and accept that the resulting path isn't minimal
in all cases. This eliminates the weird results from said
attempted minimal path with large pens and small curves.
It also eliminated a lot of extra code from this function.
* twin_font.c: (twin_path_ucs4):
Fix font baseline value (should be 9). Take pen size
into account when computing positions so that glyphs rest
on the baseline instead of painting on top of it.
* xtwin.c: (main):
Show baseline in huge text sample
2004-09-26 Keith Packard <keithp@keithp.com>
* twin.h:
* twin_convolve.c: (_twin_path_leftpoint), (_twin_path_step),
(_twin_subpath_convolve):
Hmm. Not sure this is right, but I'm giving it a try.
Recognize closed paths and attempt to construct two
disjoint paths as their convolution with the pen. This
appears to break when the path has a radius of curvature smaller
than the radius of the pen. I'm committing it to CVS mostly
so I don't lose the code; I will shortly commit a patch which
eliminates the check for a closed path.
Oh, one correct change is to _twin_path_leftpoint which used
to try to be clever about point selection. Now that pens are
forced to be convex, the correct point to use is the one furthest
from the line.
* twin_path.c: (twin_path_fill), (twin_path_append):
Ignore subpaths containing a single point.
Add 'twin_path_append' to glue one path into another.
* twin_poly.c: (_twin_edge_build), (_twin_edge_fill):
Add debug output that shows vertices of polygons
* xtwin.c: (main):
Code to test convolution change mentioned above
2004-09-25 Keith Packard <keithp@keithp.com>
* twin_font.c:
Spurious ) in file
2004-09-25 Keith Packard <keithp@keithp.com>
* twin_font.c: (_snap), (twin_path_ucs4):
Reduce emboldening to +50% stroke thickness.
Clean up debug code.
Eliminate some dead code.
Try to adjust width computations a bit. Still not right.
* xtwin.c: (main):
draw in more colors
2004-09-24 Keith Packard <keithp@keithp.com>
* Makefile.am:
* twin.h:
Switch to just supporting stroke fonts
* twin_font.c: (twin_has_ucs4), (_twin_ucs4_base),
(_twin_ucs4_points), (twin_path_ucs4), (twin_ucs4_width),
(twin_path_string):
Finish needed stroke font API.
* twin_glyphs.c:
Elimiate all but ascii glyphs, use offset table to
eliminate table of pointers (which can't be const)
* twin_vera.c:
Remove twin_vera.c
* twinint.h:
Change glyph structures around for offsets and ascii only
* xtwin.c: (main):
Few more cases to show ascii text support
2004-09-24 Keith Packard <keithp@keithp.com>
* Makefile.am:
* twin_hull.c: (_twin_slope_init), (_twin_hull_create),
(_twin_slope_compare), (_twin_hull_vertex_compare),
(_twin_hull_prev_valid), (_twin_hull_next_valid),
(_twin_hull_eliminate_concave), (_twin_hull_to_path),
(twin_path_convex_hull):
Add convex hull algorithm from cairo sources. Used to
constrain pens to convex shapes so that the convolution
algorithm works correctly.
* twin.h:
Reduce default tolerance to 1/16 of a pixel
* twin_convolve.c: (_angle), (_twin_subpath_convolve),
(twin_path_convolve):
Use convex hull of pen.
* twin_font.c: (compare_snap), (_snap), (_add_snap),
(twin_path_glyph), (twin_glyph_width), (twin_path_string):
Snap horizontal and vertical elements of glyphs to
pixel boundaries. Snap stem widths to integer amounts.
Add slanting and emboldening
* twin_glyphs.c:
Add space and box
* twin_primitive.c:
Avoid using __inline as it increases size dramatically
* twin_spline.c: (_twin_spline_decompose):
Use <= tolerance_squared as that may be zero
* xtwin.c: (main):
Swizzle code to show off recent changes
2004-09-23 Keith Packard <keithp@keithp.com>
* Makefile.am:
* configure.ac:
* twin.h:
Fix twin_fixed_floor to work for negative values correctly
Add twin_path_cur_point
* twin_convolve.c: (_twin_path_step), (_around_order), (_angle),
(_twin_subpath_convolve), (twin_path_convolve):
fix twin_path_step to actually handle duplicate points.
Change 'clockwise' to 'around_order' so that all three possible
results are returned (clockwise, parallel and counterclockwise)
Handle disjoint strokes
* twin_font.c: (twin_has_glyph), (twin_path_glyph),
(twin_glyph_width), (twin_path_string), (twin_path_fglyph),
(twin_path_ucs4), (_twin_utf8_to_ucs4), (twin_path_utf8):
Add outline and stroke font support (pick one and remove the other)
* twin_glyphs.c:
Huge array of stroke fonts from Hershey. Pick appropriate subset
and remove extra glyphs (there are a lot here)
* twin_path.c: (_twin_cur_subpath_len), (twin_path_cur_point),
(twin_path_move), (twin_path_draw), (twin_path_close):
Eliminate repeated move and close, eliminate duplicate draw.
* twin_poly.c: (_twin_edge_build), (_span_fill), (_twin_edge_fill):
Add support for 1, 4, 16 and 64 samples. 16 appears to be the
magic sweet spot.
* twin_ttf/Makefile.am:
* twin_ttf/Vera.ttf:
* twin_ttf/twin_ttf.c: (pos), (command), (cpos), (ucs4_to_utf8),
(glyph), (outline_moveto), (outline_lineto), (outline_conicto),
(outline_cubicto), (ucs_page), (ucs_first_in_page), (sanitize),
(facename), (convert_font), (main):
Convert "real" outline fonts to twin built-ins
* twin_vera.c:
Converted version of Bitstream Vera Sans Roman
* twinint.h:
* xtwin.c: (main):
2004-09-21 Keith Packard <keithp@keithp.com>
* twin.h:
* twinint.h:
Add a few definitions
* twin_convolve.c: (_twin_path_leftpoint), (twin_path_convolve):
Find pen starting point as closest to the normal to the path.
Restructure convolve loop to be easier to understand
* twin_path.c: (twin_path_circle):
Round circle coordinates instead of truncating them
* twin_poly.c: (_twin_fixed_grid_ceil), (_twin_edge_build),
(_span_fill), (_twin_edge_fill):
Move sample grid by 1/2 sample step.
Clip polygons to mask pixmap.
Modest performance improvement in span filling.
Fix end case to remove edges before stepping.
* xtwin.c: (main):
Stroke a path.
2004-09-21 Keith Packard <keithp@keithp.com>
* Makefile.am:
* twin.h:
* twin_convolve.c: (_twin_path_leftmost), (_twin_path_step),
(_clockwise), (twin_path_convolve):
Add convolution. Pen starting position needs work.
* twin_geom.c: (_twin_distance_to_point_squared),
(_twin_distance_to_line_squared):
* twin_spline.c: (_twin_spline_error_squared), (twin_path_curve):
* twinint.h:
Move shared geometric functions to new file
* twin_path.c: (_sin), (_cos), (twin_path_circle),
(twin_path_fill):
Add twin_path_circle to generate pens.
Fix path edge generator to handle last subpath right.
* twin_poly.c: (_twin_edge_build):
Skip vertices which don't span a sample row
* xtwin.c: (main):
test convolutions
2004-09-20 Keith Packard <keithp@keithp.com>
* .cvsignore:
Add .cvsignore file
* architecture:
Mention path primitives
* Makefile.am:
* twin.h:
* twinint.h:
Add paths
* twin_draw.c: (twin_composite):
Eliminate some unused variables.
* twin_path.c: (twin_path_move), (twin_path_draw),
(twin_path_close), (twin_path_fill), (twin_path_empty),
(twin_path_create), (twin_path_destroy):
Simple path construction
* twin_poly.c: (_edge_compare_y), (_edge_step_by), (_dump_edge),
(_twin_edge_build), (_span_fill), (_twin_edge_fill),
(twin_polygon):
Anti-aliased polygon fill code
* twin_screen.c:
Change twin_bool to twin_bool_t
* twin_spline.c: (_lerp_half), (_de_casteljau),
(_distance_squared_to_point), (_distance_squared_to_segment),
(_twin_spline_error_squared), (_twin_spline_decompose),
(twin_path_curve):
Append cubic Bézier splines to paths
* xtwin.c: (main):
Test paths
|