This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via 4d23481d197e7e0187bff3b2e9002d76d96497bb (commit) from 01aaa35ef40df33f0153ec4431b683af7da56a2a (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/4d23481d197e7e0187bff3b2e9002d76d9649...
commit 4d23481d197e7e0187bff3b2e9002d76d96497bb Author: Cyril Hrubis metan@ucw.cz Date: Sun Aug 21 01:11:17 2011 +0200
Added 8-8-4 palette colors.
diff --git a/libs/core/GP_Color.c b/libs/core/GP_Color.c index 06a2791..672089e 100644 --- a/libs/core/GP_Color.c +++ b/libs/core/GP_Color.c @@ -58,11 +58,29 @@ static uint8_t rgb888_colors[][3] = { {0xff, 0xff, 0xff}, /* White */ };
+/* 8-8-4 RGB palette */ +static uint8_t p8_colors[] = { + 0x00, /* Black */ + 0xe0, /* Red */ + 0x1c, /* Green */ + 0x03, /* Blue */ + 0xfc, /* Yellow */ + 0x88, /* Brown */ + 0xf0, /* Orange */ + 0x49, /* DarkGray */ + 0x92, /* LightGray */ + 0x8a, /* Purple */ + 0xff, /* White */ +}; + GP_Pixel GP_ColorToPixel(GP_Context *context, GP_Color col) { GP_ASSERT(col < GP_COL_MAX); GP_ASSERT(col >= 0);
+ if (context->pixel_type == GP_PIXEL_P8) + return p8_colors[col]; + return GP_RGBToPixel(rgb888_colors[col][0], rgb888_colors[col][1], rgb888_colors[col][2], context->pixel_type);
-----------------------------------------------------------------------
Summary of changes: libs/core/GP_Color.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.