summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a120178)
raw | patch | inline | side by side (parent: a120178)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 24 Jun 2008 02:26:17 +0000 (02:26 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 24 Jun 2008 02:26:17 +0000 (02:26 +0000) |
index 78fe6f38bc4e2e7131169fed4b6e441305a477c2..2bfac655e39904d5e76e5a80642a091173352592 100644 (file)
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
- guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
a = NR_RGBA32_A (rgba);
y0 = MAX (buf->rect.y0, ys);
y1 = MIN (buf->rect.y1, ye + 1);
- p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
for (y = y0; y < y1; y++) {
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
index 2bc57784d7185023a8a7e6c44abecd4733061f48..81e017f12792a048eb4095bd7e7f32007bc5ace3 100644 (file)
a = NR_RGBA32_A (rgba);
x0 = MAX (buf->rect.x0, xs);
x1 = MIN (buf->rect.x1, xe + 1);
- p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 3;
+ p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 4;
for (x = x0; x < x1; x++) {
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
- p += 3;
+ p += 4;
}
}
}
a = NR_RGBA32_A (rgba);
y0 = MAX (buf->rect.y0, ys);
y1 = MIN (buf->rect.y1, ye + 1);
- p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
for (y = y0; y < y1; y++) {
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
- p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
index 3b279f72429e63c50d2735ec5c1d81adf6c669df..b1fc7501cbcdbc47ca7313b3bbf4902c483df0ca 100644 (file)
int p0 = buf->rect.y0;
int p1 = buf->rect.y1;
int step = buf->buf_rowstride;
- unsigned char *d = buf->buf + 3 * (position - buf->rect.x0);
+ unsigned char *d = buf->buf + 4 * (position - buf->rect.x0);
for (int p = p0; p < p1; p++) {
d[0] = NR_COMPOSEN11_1111(r, a, d[0]);
int p0 = buf->rect.x0;
int p1 = buf->rect.x1;
- int step = 3;
+ int step = 4;
unsigned char *d = buf->buf + (position - buf->rect.y0) * buf->buf_rowstride;
for (int p = p0; p < p1; p++) {
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
- guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ guchar * p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
index 0172cc8bb3899a963c1221e43e478550aff4d320..db199d3a51e2421a0d6a72fe1414689506f2420f 100644 (file)
bool colormode;
for (y = y0; y <= y1; y++) {
- p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 3;
+ p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 4;
q = ctrl->cache + ((y - ctrl->box.y0) * (ctrl->span*2+1) + (x0 - ctrl->box.x0)) * 4;
for (x = x0; x <= x1; x++) {
a = *(q + 3);
p[1] = COMPOSE_N (p[1], q[1], a);
p[2] = COMPOSE_N (p[2], q[2], a);
q += 4;
- p += 3;
+ p += 4;
} else if (ctrl->mode == SP_CTRL_MODE_XOR) {
p[0] = COMPOSE_X (p[0], q[0], a);
p[1] = COMPOSE_X (p[1], q[1], a);
p[2] = COMPOSE_X (p[2], q[2], a);
q += 4;
- p += 3;
+ p += 4;
}
}
}
index be3b8dc4537be37402111cad419b6ddeabb5498a..28c76e7045e1f869dc529b74c233b02f47b10a65 100644 (file)
@@ -100,14 +100,14 @@ static void sp_ctrlrect_hline(SPCanvasBuf *buf, gint y, gint xs, gint xe, guint3
guint const a = RGBA_A(rgba);
gint const x0 = MAX(buf->rect.x0, xs);
gint const x1 = MIN(buf->rect.x1, xe + 1);
- guchar *p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 3;
+ guchar *p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 4;
for (gint x = x0; x < x1; x++) {
if (!dashed || ((x / DASH_LENGTH) % 2)) {
p[0] = INK_COMPOSE(r, a, p[0]);
p[1] = INK_COMPOSE(g, a, p[1]);
p[2] = INK_COMPOSE(b, a, p[2]);
}
- p += 3;
+ p += 4;
}
}
}
@@ -121,7 +121,7 @@ static void sp_ctrlrect_vline(SPCanvasBuf *buf, gint x, gint ys, gint ye, guint3
guint const a = RGBA_A(rgba);
gint const y0 = MAX(buf->rect.y0, ys);
gint const y1 = MIN(buf->rect.y1, ye + 1);
- guchar *p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 3;
+ guchar *p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
for (gint y = y0; y < y1; y++) {
if (!dashed || ((y / DASH_LENGTH) % 2)) {
p[0] = INK_COMPOSE(r, a, p[0]);
@@ -145,12 +145,12 @@ static void sp_ctrlrect_area(SPCanvasBuf *buf, gint xs, gint ys, gint xe, gint y
gint const y0 = MAX(buf->rect.y0, ys);
gint const y1 = MIN(buf->rect.y1, ye + 1);
for (gint y = y0; y < y1; y++) {
- guchar *p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 3;
+ guchar *p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 4;
for (gint x = x0; x < x1; x++) {
p[0] = INK_COMPOSE(r, a, p[0]);
p[1] = INK_COMPOSE(g, a, p[1]);
p[2] = INK_COMPOSE(b, a, p[2]);
- p += 3;
+ p += 4;
}
}
}