• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

修訂15f1da327264eafbf98dfee4c820ddcccc07ad93 (tree)
時間2009-10-06 05:08:30
作者Hans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

Bug #591525 - better pattern to emulate color.alpha

Change Summary

差異

--- a/lib/diagdkrenderer.c
+++ b/lib/diagdkrenderer.c
@@ -284,15 +284,15 @@ renderer_color_convert(DiaGdkRenderer *renderer,
284284 static gchar bits[9][4] = {
285285 { 0x00, 0x00, 0x00, 0x00 }, /* 0% */
286286 { 0x20, 0x02, 0x20, 0x02 },
287- { 0x42, 0x24, 0x42, 0x24 }, /* 25% */
287+ { 0x22, 0x88, 0x22, 0x88 }, /* 25% */
288288 { 0x4A, 0xA4, 0x4A, 0xA4 },
289289 { 0x5A, 0xA5, 0x5A, 0xA5 }, /* 50% */
290- { 0xAB, 0xBA, 0xAB, 0xBA },
290+ { 0x57, 0xBA, 0x57, 0xBA },
291291 { 0xBE, 0xEB, 0xBE, 0xEB }, /* 75% */
292292 { 0xEF, 0xFE, 0xEF, 0xFE },
293293 { 0xFF, 0xFF, 0xFF, 0xFF }, /* 100% */
294294 };
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);
296296 gdk_gc_set_stipple (renderer->gc, stipple);
297297 g_object_unref (stipple);
298298 gdk_gc_set_fill(renderer->gc, GDK_STIPPLED);