作図ソフト dia の改良版
Revision | 15f1da327264eafbf98dfee4c820ddcccc07ad93 (tree) |
---|---|
Zeit | 2009-10-06 05:08:30 |
Autor | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Bug #591525 - better pattern to emulate color.alpha
@@ -284,15 +284,15 @@ renderer_color_convert(DiaGdkRenderer *renderer, | ||
284 | 284 | static gchar bits[9][4] = { |
285 | 285 | { 0x00, 0x00, 0x00, 0x00 }, /* 0% */ |
286 | 286 | { 0x20, 0x02, 0x20, 0x02 }, |
287 | - { 0x42, 0x24, 0x42, 0x24 }, /* 25% */ | |
287 | + { 0x22, 0x88, 0x22, 0x88 }, /* 25% */ | |
288 | 288 | { 0x4A, 0xA4, 0x4A, 0xA4 }, |
289 | 289 | { 0x5A, 0xA5, 0x5A, 0xA5 }, /* 50% */ |
290 | - { 0xAB, 0xBA, 0xAB, 0xBA }, | |
290 | + { 0x57, 0xBA, 0x57, 0xBA }, | |
291 | 291 | { 0xBE, 0xEB, 0xBE, 0xEB }, /* 75% */ |
292 | 292 | { 0xEF, 0xFE, 0xEF, 0xFE }, |
293 | 293 | { 0xFF, 0xFF, 0xFF, 0xFF }, /* 100% */ |
294 | 294 | }; |
295 | - GdkBitmap *stipple = gdk_bitmap_create_from_data (NULL, bits[(int)(9*col->alpha)], 4, 4); | |
295 | + GdkBitmap *stipple = gdk_bitmap_create_from_data (NULL, bits[(int)(9*col->alpha+.49)], 4, 4); | |
296 | 296 | gdk_gc_set_stipple (renderer->gc, stipple); |
297 | 297 | g_object_unref (stipple); |
298 | 298 | gdk_gc_set_fill(renderer->gc, GDK_STIPPLED); |