fix shaped output (rgba dest rendering)

SVN revision: 13308
This commit is contained in:
Carsten Haitzler 2005-02-11 05:33:44 +00:00
parent 84c6a23611
commit 111aa2936a
7 changed files with 148 additions and 150 deletions

View File

@ -882,14 +882,12 @@ static void
evas_object_textblock_format_calc(Evas_Object *obj) evas_object_textblock_format_calc(Evas_Object *obj)
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Layout layout;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
evas_object_textblock_layout_fonts_hold(obj); evas_object_textblock_layout_fonts_hold(obj);
evas_object_textblock_layout_clean(obj); evas_object_textblock_layout_clean(obj);
evas_object_textblock_layout(obj); evas_object_textblock_layout(obj);
evas_object_textblock_layout_fonts_hold_clean(obj); evas_object_textblock_layout_fonts_hold_clean(obj);
o->changed = 0;
} }
static void static void
@ -1210,10 +1208,7 @@ evas_object_textblock_cursor_line_get(Evas_Object *obj)
return 0; return 0;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps); lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps);
if (lnode) return lnode->line; if (lnode) return lnode->line;
return 0; return 0;
@ -1249,10 +1244,7 @@ evas_object_textblock_line_start_pos_get(Evas_Object *obj)
return -1; return -1;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps); lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps);
if (lnode) if (lnode)
{ {
@ -1283,10 +1275,7 @@ evas_object_textblock_line_end_pos_get(Evas_Object *obj)
return -1; return -1;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps); lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps);
if (lnode) if (lnode)
{ {
@ -1322,10 +1311,7 @@ evas_object_textblock_line_get(Evas_Object *obj, int line, Evas_Coord *lx, Evas_
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps); lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps);
if (lnode) if (lnode)
{ {
@ -1369,10 +1355,7 @@ evas_object_textblock_char_pos_get(Evas_Object *obj, int pos, Evas_Coord *cx, Ev
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps); lnode = evas_object_textblock_layout_node_pos_get(obj, o->pos, &ps);
if (lnode) if (lnode)
{ {
@ -1411,10 +1394,7 @@ evas_object_textblock_char_coords_get(Evas_Object *obj, Evas_Coord x, Evas_Coord
return -1; return -1;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
for (l = (Evas_Object_List *)o->layout_nodes; l; l = l->next) for (l = (Evas_Object_List *)o->layout_nodes; l; l = l->next)
{ {
lnode = (Layout_Node *)l; lnode = (Layout_Node *)l;
@ -1564,6 +1544,7 @@ evas_object_textblock_text_get(Evas_Object *obj, int len)
if (o->pos > o->len) return NULL; if (o->pos > o->len) return NULL;
if (len > (o->len - o->pos)) my_len = o->len - o->pos; if (len > (o->len - o->pos)) my_len = o->len - o->pos;
/* CHECK */
ret = malloc(sizeof(char) * (my_len + 1)); ret = malloc(sizeof(char) * (my_len + 1));
if (ret) if (ret)
{ {
@ -1582,12 +1563,13 @@ evas_object_textblock_text_get(Evas_Object *obj, int len)
memcpy(ret, node->text + (o->pos - ps), node->text_len - (o->pos - ps)); memcpy(ret, node->text + (o->pos - ps), node->text_len - (o->pos - ps));
while(remaining > 0) while (remaining > 0)
{ {
node = evas_object_textblock_node_pos_get(obj, o->pos + count, &ps); node = evas_object_textblock_node_pos_get(obj, o->pos + count, &ps);
if (node) if (node)
{ {
int amt = 0; int amt = 0;
if (node->text_len >= remaining) if (node->text_len >= remaining)
amt = remaining; amt = remaining;
else else
@ -1605,7 +1587,7 @@ evas_object_textblock_text_get(Evas_Object *obj, int len)
} }
} }
} }
ret[my_len] = '\0'; ret[my_len] = 0;
} }
return ret; return ret;
} }
@ -1630,10 +1612,6 @@ evas_object_textblock_text_del(Evas_Object *obj, int len)
MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK);
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
o->native.dirty = 1;
o->format.dirty = 1;
o->changed = 1;
evas_object_change(obj);
if (len <= 0) return; if (len <= 0) return;
if (o->pos >= o->len) return; if (o->pos >= o->len) return;
@ -1656,27 +1634,28 @@ evas_object_textblock_text_del(Evas_Object *obj, int len)
char *tmp; char *tmp;
remaining = my_len; remaining = my_len;
if (remaining <= (node->text_len - (o->pos - ps))) if (remaining <= (node->text_len - (o->pos - ps)))
{ {
printf("CASE 1\n");
tmp = node->text; tmp = node->text;
node->text = malloc(sizeof(char) * (node->text_len - my_len + 1)); node->text = malloc(sizeof(char) * (node->text_len - my_len + 1));
/* any begining text */ /* any begining text */
if ((o->pos - ps) > 0) if ((o->pos - ps) > 0)
strncpy(node->text, tmp, o->pos - ps); strncpy(node->text, tmp, o->pos - ps);
node->text[o->pos - ps] = 0;
/* any ending text */ /* any ending text */
if (((o->pos - ps) + remaining) < node->text_len) if (((o->pos - ps) + remaining) < node->text_len)
strncpy(node->text + (o->pos - ps), tmp + remaining + (o->pos - ps), strcpy(node->text + (o->pos - ps),
node->text_len - remaining - (o->pos - ps)); tmp + remaining + (o->pos - ps));
free(tmp); free(tmp);
node->text_len -= remaining; node->text_len -= remaining;
o->len -= remaining; o->len -= remaining;
/* is the node now empty? */ /* is the node now empty? */
if (node->text_len == 0) if (node->text_len <= 0)
{ {
o->nodes = evas_object_list_remove(o->nodes, node); o->nodes = evas_object_list_remove(o->nodes, node);
if (node->format) free(node->format); if (node->format) free(node->format);
@ -1686,54 +1665,71 @@ evas_object_textblock_text_del(Evas_Object *obj, int len)
} }
else else
{ {
Evas_List *freenodes = NULL;
Node *node_start = NULL, *node_end = NULL;
printf("CASE 2\n");
node_start = node_end = node;
tmp = node->text; tmp = node->text;
node->text = malloc(sizeof(char) * (o->pos - ps + 1)); node->text = malloc(sizeof(char) * (o->pos - ps + 1));
/* save the start part */ /* save the start part */
strncpy(node->text, tmp, o->pos - ps); strncpy(node->text, tmp, o->pos - ps);
node->text[o->pos - ps] = 0;
o->len -= node->text_len - (o->pos - ps); o->len -= node->text_len - (o->pos - ps);
remaining -= node->text_len - (o->pos - ps); remaining -= node->text_len - (o->pos - ps);
node->text_len = o->pos - ps; node->text_len = o->pos - ps;
node->text[node->text_len] = '\0';
free(tmp); free(tmp);
ps += node->text_len; ps += node->text_len;
while(remaining > 0)
if (node->text_len <= 0)
freenodes = evas_list_append(freenodes, node);
while (remaining > 0)
{ {
node = evas_object_textblock_node_pos_get(obj, ps, &ps); /* find next text node */
if (!node) node = (Node *)(((Evas_Object_List *)node)->next);
{ while ((node) && (!node->text))
/* ran out of nodes ... */ node = (Node *)(((Evas_Object_List *)node)->next);
break; if (!node) break;
}
if (remaining < node->text_len) if (remaining < node->text_len)
{ {
tmp = node->text; tmp = node->text;
node->text = malloc(sizeof(char) * (node->text_len - remaining + 1)); node->text = malloc(sizeof(char) * (node->text_len - remaining + 1));
strncpy(node->text, tmp + remaining, node->text_len - remaining); strcpy(node->text, tmp + remaining);
node->text_len -= remaining; node->text_len -= remaining;
node->text[node->text_len] = '\0';
free(tmp); free(tmp);
o->len -= remaining; o->len -= remaining;
remaining -= remaining; remaining -= remaining;
node_end = node;
} }
else else
{ {
o->nodes = evas_object_list_remove(o->nodes, node); node_end = node;
o->len -= node->text_len; freenodes = evas_list_append(freenodes, node);
remaining -= node->text_len;
if (node->format) free(node->format);
if (node->text) free(node->text);
free(node);
} }
} }
/* FIXME: fix up format nodes inbetween node_start and node_end */
while (freenodes)
{
node = freenodes->data;
o->len -= node->text_len;
freenodes = evas_list_remove_list(freenodes, freenodes);
o->nodes = evas_object_list_remove(o->nodes, node);
if (node->format) free(node->format);
if (node->text) free(node->text);
free(node);
}
} }
} }
o->native.dirty = 1;
o->format.dirty = 1;
o->changed = 1;
evas_object_change(obj);
} }
void void
@ -1924,10 +1920,7 @@ evas_object_textblock_format_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coor
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (o->format.dirty) if (o->format.dirty)
{ evas_object_textblock_format_calc(obj);
evas_object_textblock_format_calc(obj);
o->format.dirty = 0;
}
if (w) *w = o->format.w; if (w) *w = o->format.w;
if (h) *h = o->format.h; if (h) *h = o->format.h;
} }
@ -2022,10 +2015,8 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
context); context);
if (o->changed) if (o->changed)
{ {
evas_object_textblock_layout_fonts_hold(obj); if (o->format.dirty)
evas_object_textblock_layout_clean(obj); evas_object_textblock_format_calc(obj);
evas_object_textblock_layout(obj);
evas_object_textblock_layout_fonts_hold_clean(obj);
o->changed = 0; o->changed = 0;
} }
#if 0 #if 0

View File

@ -159,20 +159,21 @@ evas_common_blend_alpha_color_rgba_to_rgba_c (DATA8 *src, DATA32 *dst, int len,
*dst_ptr = col; *dst_ptr = col;
break; break;
default: default:
BLEND_ADST_ALPHA_SETUP(aa, tmp);
a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)];
BLEND_COLOR(aa, A_VAL(dst_ptr), BLEND_ADST_COLOR(aa, A_VAL(dst_ptr),
255, A_VAL(dst_ptr), 255, A_VAL(dst_ptr),
tmp); tmp);
BLEND_ALPHA_SETUP(a, tmp); BLEND_ADST_ALPHA_SETUP(a, tmp);
BLEND_COLOR(a, R_VAL(dst_ptr), BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
R_VAL(&col), R_VAL(dst_ptr), R_VAL(&col), R_VAL(dst_ptr),
tmp); tmp);
BLEND_COLOR(a, G_VAL(dst_ptr), BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
G_VAL(&col), G_VAL(dst_ptr), G_VAL(&col), G_VAL(dst_ptr),
tmp); tmp);
BLEND_COLOR(a, B_VAL(dst_ptr), BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
B_VAL(&col), B_VAL(dst_ptr), B_VAL(&col), B_VAL(dst_ptr),
tmp); tmp);
break; break;
} }
src_ptr++; src_ptr++;

View File

@ -95,21 +95,21 @@ evas_common_blend_color_rgba_to_rgba_c(DATA32 src, DATA32 *dst, int len)
DATA32 tmp; DATA32 tmp;
DATA8 a; DATA8 a;
BLEND_ADST_ALPHA_SETUP(A_VAL(&src), tmp);
a = _evas_pow_lut[(A_VAL(&src) << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(A_VAL(&src) << 8) | A_VAL(dst_ptr)];
BLEND_ADST_COLOR(A_VAL(&src), A_VAL(dst_ptr),
BLEND_COLOR(A_VAL(&src), A_VAL(dst_ptr), 255, A_VAL(dst_ptr),
255, A_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_ALPHA_SETUP(a, tmp);
BLEND_ALPHA_SETUP(a, tmp); BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
BLEND_COLOR(a, R_VAL(dst_ptr), R_VAL(&src), R_VAL(dst_ptr),
R_VAL(&src), R_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
BLEND_COLOR(a, G_VAL(dst_ptr), G_VAL(&src), G_VAL(dst_ptr),
G_VAL(&src), G_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
BLEND_COLOR(a, B_VAL(dst_ptr), B_VAL(&src), B_VAL(dst_ptr),
B_VAL(&src), B_VAL(dst_ptr), tmp);
tmp);
dst_ptr++; dst_ptr++;
} }

View File

@ -78,19 +78,21 @@ evas_common_blend_pixels_cmod_rgba_to_rgba_c(DATA32 *src, DATA32 *dst, int len,
B_VAL(dst_ptr) = bmod[B_VAL(src_ptr)]; B_VAL(dst_ptr) = bmod[B_VAL(src_ptr)];
break; break;
default: default:
BLEND_ADST_ALPHA_SETUP(aa, tmp);
a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)];
BLEND_COLOR(aa,A_VAL(dst_ptr), BLEND_ADST_COLOR(aa, A_VAL(dst_ptr),
255,A_VAL(dst_ptr),tmp); 255, A_VAL(dst_ptr),
BLEND_ALPHA_SETUP(a, tmp); tmp);
BLEND_COLOR(a, R_VAL(dst_ptr), BLEND_ADST_ALPHA_SETUP(a, tmp);
rmod[R_VAL(src_ptr)], R_VAL(dst_ptr), BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
tmp); rmod[R_VAL(src_ptr)], R_VAL(dst_ptr),
BLEND_COLOR(a, G_VAL(dst_ptr), tmp);
gmod[G_VAL(src_ptr)], G_VAL(dst_ptr), BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
tmp); gmod[G_VAL(src_ptr)], G_VAL(dst_ptr),
BLEND_COLOR(a, B_VAL(dst_ptr), tmp);
bmod[B_VAL(src_ptr)], B_VAL(dst_ptr), BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
tmp); bmod[B_VAL(src_ptr)], B_VAL(dst_ptr),
tmp);
break; break;
} }
src_ptr++; src_ptr++;

View File

@ -202,21 +202,21 @@ evas_common_blend_pixels_mul_color_rgba_to_rgba_c(DATA32 *src, DATA32 *dst, int
*dst_ptr = *src_ptr; *dst_ptr = *src_ptr;
break; break;
default: default:
BLEND_ADST_ALPHA_SETUP(aa, tmp);
a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)];
BLEND_ADST_COLOR(aa, A_VAL(dst_ptr),
BLEND_COLOR(aa, A_VAL(dst_ptr), 255, A_VAL(dst_ptr),
255, A_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_ALPHA_SETUP(a, tmp);
BLEND_ALPHA_SETUP(a, tmp); BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
BLEND_COLOR(a, R_VAL(dst_ptr), R_VAL(src_ptr), R_VAL(dst_ptr),
R_VAL(src_ptr), R_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
BLEND_COLOR(a, G_VAL(dst_ptr), G_VAL(src_ptr), G_VAL(dst_ptr),
G_VAL(src_ptr), G_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
BLEND_COLOR(a, B_VAL(dst_ptr), B_VAL(src_ptr), B_VAL(dst_ptr),
B_VAL(src_ptr), B_VAL(dst_ptr), tmp);
tmp);
break; break;
} }
src_ptr++; src_ptr++;
@ -242,21 +242,21 @@ evas_common_blend_pixels_mul_color_rgba_to_rgba_c(DATA32 *src, DATA32 *dst, int
B_VAL(dst_ptr) = ((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8); B_VAL(dst_ptr) = ((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8);
break; break;
default: default:
BLEND_ADST_ALPHA_SETUP(aa, tmp);
a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)];
BLEND_ADST_COLOR(aa, A_VAL(dst_ptr),
BLEND_COLOR(aa, A_VAL(dst_ptr), 255, A_VAL(dst_ptr),
255, A_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_ALPHA_SETUP(a, tmp);
BLEND_ALPHA_SETUP(a, tmp); BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
BLEND_COLOR(a, R_VAL(dst_ptr), ((R_VAL(src_ptr) * (R_VAL(&mul_color) + 1)) >> 8), R_VAL(dst_ptr),
((R_VAL(src_ptr) * (R_VAL(&mul_color) + 1)) >> 8), R_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
BLEND_COLOR(a, G_VAL(dst_ptr), ((G_VAL(src_ptr) * (G_VAL(&mul_color) + 1)) >> 8), G_VAL(dst_ptr),
((G_VAL(src_ptr) * (G_VAL(&mul_color) + 1)) >> 8), G_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
BLEND_COLOR(a, B_VAL(dst_ptr), ((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8), B_VAL(dst_ptr),
((B_VAL(src_ptr) * (B_VAL(&mul_color) + 1)) >> 8), B_VAL(dst_ptr), tmp);
tmp);
break; break;
} }
src_ptr++; src_ptr++;

View File

@ -128,21 +128,21 @@ evas_common_blend_pixels_rgba_to_rgba_c(DATA32 *src, DATA32 *dst, int len)
*dst_ptr = *src_ptr; *dst_ptr = *src_ptr;
break; break;
default: default:
BLEND_ADST_ALPHA_SETUP(aa, tmp);
a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)]; a = _evas_pow_lut[(aa << 8) | A_VAL(dst_ptr)];
BLEND_ADST_COLOR(aa, A_VAL(dst_ptr),
BLEND_COLOR(aa, A_VAL(dst_ptr), 255, A_VAL(dst_ptr),
255, A_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_ALPHA_SETUP(a, tmp);
BLEND_ALPHA_SETUP(a, tmp); BLEND_ADST_COLOR(a, R_VAL(dst_ptr),
BLEND_COLOR(a, R_VAL(dst_ptr), R_VAL(src_ptr), R_VAL(dst_ptr),
R_VAL(src_ptr), R_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, G_VAL(dst_ptr),
BLEND_COLOR(a, G_VAL(dst_ptr), G_VAL(src_ptr), G_VAL(dst_ptr),
G_VAL(src_ptr), G_VAL(dst_ptr), tmp);
tmp); BLEND_ADST_COLOR(a, B_VAL(dst_ptr),
BLEND_COLOR(a, B_VAL(dst_ptr), B_VAL(src_ptr), B_VAL(dst_ptr),
B_VAL(src_ptr), B_VAL(dst_ptr), tmp);
tmp);
} }
src_ptr++; src_ptr++;
dst_ptr++; dst_ptr++;

View File

@ -576,14 +576,15 @@ x++;
* C: 0.716 * C: 0.716
*/ */
#if 0 /* old blender */ /*
#define BLEND_ALPHA_SETUP(a, tmp) #define BLEND_ADST_ALPHA_SETUP(a, tmp)
#define BLEND_COLOR(a, nc, c, cc, tmp) \ #define BLEND_ADST_COLOR(a, nc, c, cc, tmp) \
{ \ { \
(tmp) = ((c) - (cc)) * (a); \ (tmp) = ((c) - (cc)) * (a); \
(nc) = (cc) + (((tmp) + ((tmp) >> 8) + 0x80) >> 8); \ (nc) = (cc) + (((tmp) + ((tmp) >> 8) + 0x80) >> 8); \
} }
#else /* new blender - faster! */ */
#define BLEND_ALPHA_SETUP(a, tmp) \ #define BLEND_ALPHA_SETUP(a, tmp) \
{ \ { \
(tmp) = ((a) + ((a) >> 7)); \ (tmp) = ((a) + ((a) >> 7)); \
@ -592,7 +593,10 @@ x++;
{ \ { \
(nc) = ((((tmp) * ((c) - (cc))) >> 8) + (cc)); \ (nc) = ((((tmp) * ((c) - (cc))) >> 8) + (cc)); \
} }
#endif
#define BLEND_ADST_ALPHA_SETUP BLEND_ALPHA_SETUP
#define BLEND_ADST_COLOR BLEND_COLOR
#define PIXEL_SOLID_ALPHA 0xff000000 #define PIXEL_SOLID_ALPHA 0xff000000