51#define ANCHOR_WIDTH (2.0)
62 else if (graphics->
owndc)
109 ERR(
"Bad point type\n");
140 argb =
line->startcolor;
150 FIXME(
"unhandled brush type %d\n", brush->
bt);
169 hatch_palette[0] = back_color;
170 hatch_palette[1] =
blend_colors(back_color, fore_color, 0.25);
172 hatch_palette[3] = fore_color;
182 bmih.
biSize =
sizeof(bmih);
193 const unsigned char *hatch_data;
197 ARGB hatch_palette[4];
205 for (
y = 0;
y < 8;
y++)
207 const int hy = (
y + origin_y) & 7;
208 const int hx = origin_x & 7;
209 unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
211 for (
x = 0; x < 8; x++, row >>= 1)
226 for (
y = 0;
y < 64;
y++)
262 FIXME(
"unhandled brush type %d\n", brush->
bt);
299 INT save_state,
i, numdashes;
311 REAL scale_x, scale_y;
334 TRACE(
"dashes are: ");
335 for(
i = 0;
i < numdashes;
i++){
337 TRACE(
"%ld, ", dash_array[
i]);
339 TRACE(
"\n and the pen style is %x\n", pen->
style);
343 numdashes, dash_array);
386 INT technology, shadeblendcaps;
395 if ((technology ==
DT_RASPRINTER && shadeblendcaps == SB_NONE)
398 TRACE(
"alpha blending not supported by device, fallback to StretchBlt\n");
400 StretchBlt(dst_hdc, dst_x, dst_y, dst_width, dst_height,
401 hdc, src_x, src_y, src_width, src_height,
SRCCOPY);
413 hdc, src_x, src_y, src_width, src_height, bf);
467 for (
y=0;
y<src_height;
y++)
469 for (
x=0;
x<src_width;
x++)
471 ARGB dst_color, src_color;
472 src_color = ((
ARGB*)(
src + src_stride *
y))[
x];
476 if (!(src_color & 0xff000000))
483 if (!(src_color & 0xff000000))
521 (
void**)&temp_bits,
NULL, 0);
526 if ((graphics->
hdc &&
530 memcpy(temp_bits,
src, src_width * src_height * 4);
533 4 * src_width,
src, src_stride);
537 hdc, 0, 0, src_width, src_height);
558 HRGN
hrgn, visible_rgn;
596 &
src[(rects[
i].
left - dst_x) * 4 + (rects[
i].
top - dst_y) * src_stride],
609 ERR(
"This should not be used for metafiles; fix caller\n");
639 src_height, src_stride,
fmt);
659 INT start_a, end_a, final_a;
664 start_a = ((
start >> 24) & 0xff) * (
pos ^ 0xff);
665 end_a = ((
end >> 24) & 0xff) *
pos;
667 final_a = start_a + end_a;
669 if (final_a < 0xff)
return 0;
671 return (final_a / 0xff) << 24 |
672 ((((
start >> 16) & 0xff) * start_a + (((
end >> 16) & 0xff) * end_a)) / final_a) << 16 |
673 ((((
start >> 8) & 0xff) * start_a + (((
end >> 8) & 0xff) * end_a)) / final_a) << 8 |
674 (((
start & 0xff) * start_a + ((
end & 0xff) * end_a)) / final_a);
685 position =
fmodf(position, 1.0f);
686 if (position < 0.0f) position += 1.0f;
690 position =
fmodf(position, 2.0f);
691 if (position < 0.0f) position += 2.0f;
692 if (position > 1.0f) position = 2.0f - position;
700 REAL left_blendpos, left_blendfac, right_blendpos, right_blendfac;
712 range = right_blendpos - left_blendpos;
713 blendfac = (left_blendfac * (right_blendpos - position) +
714 right_blendfac * (position - left_blendpos)) /
range;
722 ARGB left_blendcolor, right_blendcolor;
723 REAL left_blendpos, right_blendpos;
734 blendfac = (blendfac - left_blendpos) / (right_blendpos - left_blendpos);
735 return blend_colors(left_blendcolor, right_blendcolor, blendfac);
760 unsigned char a,
r,
g,
b;
781 return (
a << 24) | (
r << 16) | (
g << 8) |
b;
786 unsigned char r,
g,
b;
792 return (
r ==
g) && (
g ==
b);
811 BYTE min_blue, min_green, min_red;
812 BYTE max_blue, max_green, max_red;
822 min_blue =
key->low&0xff;
823 min_green = (
key->low>>8)&0xff;
824 min_red = (
key->low>>16)&0xff;
826 max_blue =
key->high&0xff;
827 max_green = (
key->high>>8)&0xff;
828 max_red = (
key->high>>16)&0xff;
836 blue = *src_color&0xff;
837 green = (*src_color>>8)&0xff;
838 red = (*src_color>>16)&0xff;
839 if (
blue >= min_blue &&
green >= min_green &&
red >= min_red &&
840 blue <= max_blue &&
green <= max_green &&
red <= max_red)
841 *src_color = 0x00000000;
865 if (*src_color ==
table->colormap[
i].oldColor.Argb)
867 *src_color =
table->colormap[
i].newColor.Argb;
879 int gray_matrix[5][5];
938 blue = *src_color&0xff;
939 green = (*src_color>>8)&0xff;
940 red = (*src_color>>16)&0xff;
947 *src_color = (*src_color & 0xff000000) | (
red << 16) | (
green << 8) |
blue;
962 switch (interpolation)
1040 if ((
x /
width) % 2 == 0)
1059 if (x < src_rect->
X || y < src_rect->
Y ||
x >= src_rect->X + src_rect->Width ||
y >= src_rect->Y + src_rect->Height)
1061 ERR(
"out of range pixel requested\n");
1065 return ((
DWORD*)(
bits))[(
x - src_rect->X) + (
y - src_rect->Y) * src_rect->Width];
1074 switch (interpolation)
1078 FIXME(
"Unimplemented interpolation %i\n", interpolation);
1083 INT leftx, rightx, topy, bottomy;
1084 ARGB topleft, topright, bottomleft, bottomright;
1089 leftx = (
INT)leftxf;
1095 if (leftx == rightx && topy == bottomy)
1108 x_offset =
point->X - leftxf;
1117 switch (offset_mode)
1139 return (p1->
X - p2->
X) * (p2->
Y -
y) / (p2->
Y - p1->
Y) + p2->
X;
1160 return ((hatch->
forecol & 0xff000000) == 0xff000000) &&
1161 ((hatch->
backcol & 0xff000000) == 0xff000000);
1211 src_hdc, 0, 0, 1, 1);
1222 HBRUSH gdibrush, old_brush;
1270 argb_pixels[
x +
y*cdwStride] =
fill->color;
1277 const unsigned char *hatch_data;
1278 ARGB hatch_palette[4];
1286 for (
y = 0;
y < fill_area->
Height;
y++, argb_pixels += cdwStride)
1288 const int hy = ~(
y + fill_area->
Y - graphics->
origin_y) & 7;
1289 const int hx = graphics->
origin_x & 7;
1290 const unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
1292 for (
x = 0;
x < fill_area->
Width;
x++)
1294 const unsigned int srow =
row >> (~(
x + fill_area->
X) & 7);
1297 index = (srow & 1) ? 2 : (srow & 0x82) ? 1 : 0;
1299 index = (srow & 1) ? 3 : 0;
1301 argb_pixels[
x] = hatch_palette[
index];
1314 draw_points[0].
X = fill_area->
X;
1315 draw_points[0].
Y = fill_area->
Y;
1316 draw_points[1].
X = fill_area->
X+1;
1317 draw_points[1].
Y = fill_area->
Y;
1318 draw_points[2].
X = fill_area->
X;
1319 draw_points[2].
Y = fill_area->
Y+1;
1338 REAL x_delta = draw_points[1].
X - draw_points[0].
X;
1339 REAL y_delta = draw_points[2].
X - draw_points[0].
X;
1345 REAL pos = draw_points[0].
X +
x * x_delta +
y * y_delta;
1366 FIXME(
"metafile texture brushes not implemented\n");
1373 src_area.
X = src_area.
Y = 0;
1377 draw_points[0].
X = fill_area->
X;
1378 draw_points[0].
Y = fill_area->
Y;
1379 draw_points[1].
X = fill_area->
X+1;
1380 draw_points[1].
Y = fill_area->
Y;
1381 draw_points[2].
X = fill_area->
X;
1382 draw_points[2].
Y = fill_area->
Y+1;
1402 if (!
fill->bitmap_bits)
1409 lockeddata.
Stride = src_stride;
1434 REAL x_dx = draw_points[1].
X - draw_points[0].
X;
1435 REAL x_dy = draw_points[1].
Y - draw_points[0].
Y;
1436 REAL y_dx = draw_points[2].
X - draw_points[0].
X;
1437 REAL y_dy = draw_points[2].
Y - draw_points[0].
Y;
1444 point.X = draw_points[0].
X +
x * x_dx +
y * y_dx;
1445 point.Y = draw_points[0].
Y +
x * x_dy +
y * y_dy;
1463 int i, figure_start=0;
1464 GpPointF start_point, end_point, center_point;
1466 REAL min_yf, max_yf, line1_xf, line2_xf;
1467 INT min_y, max_y, min_x, max_x;
1470 static BOOL transform_fixme_once;
1472 if (
fill->focus.X != 0.0 ||
fill->focus.Y != 0.0)
1476 FIXME(
"path gradient focus not implemented\n");
1483 FIXME(
"path gradient gamma correction not implemented\n");
1486 if (
fill->blendcount)
1490 FIXME(
"path gradient blend not implemented\n");
1493 if (
fill->pblendcount)
1497 FIXME(
"path gradient preset blend not implemented\n");
1500 if (!transform_fixme_once)
1506 FIXME(
"path gradient transform not implemented\n");
1507 transform_fixme_once =
TRUE;
1524 center_point =
fill->center;
1540 int start_center_line=0, end_center_line=0;
1542 REAL center_distance;
1543 ARGB start_color, end_color;
1553 start_color =
fill->surroundcolors[
min(
i,
fill->surroundcolorcount-1)];
1558 end_color =
fill->surroundcolors[
min(figure_start,
fill->surroundcolorcount-1)];
1563 end_color =
fill->surroundcolors[
min(
i+1,
fill->surroundcolorcount-1)];
1568 outer_color = start_color;
1570 min_yf = center_point.
Y;
1571 if (min_yf > start_point.
Y) min_yf = start_point.
Y;
1572 if (min_yf > end_point.
Y) min_yf = end_point.
Y;
1574 if (min_yf < fill_area->
Y)
1575 min_y = fill_area->
Y;
1579 max_yf = center_point.
Y;
1580 if (max_yf < start_point.
Y) max_yf = start_point.
Y;
1581 if (max_yf < end_point.
Y) max_yf = end_point.
Y;
1583 if (max_yf > fill_area->
Y + fill_area->
Height)
1584 max_y = fill_area->
Y + fill_area->
Height;
1588 dy = end_point.
Y - start_point.
Y;
1589 dx = end_point.
X - start_point.
X;
1592 center_distance =
dy * (start_point.
X - center_point.
X) +
1593 dx * (center_point.
Y - start_point.
Y);
1595 for (
y=min_y;
y<max_y;
y++)
1599 if (!seen_start && yf >= start_point.
Y)
1602 start_center_line ^= 1;
1604 if (!seen_end && yf >= end_point.
Y)
1607 end_center_line ^= 1;
1609 if (!seen_center && yf >= center_point.
Y)
1612 start_center_line ^= 1;
1613 end_center_line ^= 1;
1616 if (start_center_line)
1621 if (end_center_line)
1626 if (line1_xf < line2_xf)
1637 if (min_x < fill_area->
X)
1638 min_x = fill_area->
X;
1639 if (max_x > fill_area->
X + fill_area->
Width)
1640 max_x = fill_area->
X + fill_area->
Width;
1642 for (
x=min_x;
x<max_x;
x++)
1647 if (start_color != end_color)
1649 REAL blend_amount, pdy, pdx;
1650 pdy = yf - center_point.
Y;
1651 pdx = xf - center_point.
X;
1653 if (
fabs(pdx) <= 0.001 &&
fabs(pdy) <= 0.001)
1656 outer_color = start_color;
1660 blend_amount = ( (center_point.
Y - start_point.
Y) * pdx + (start_point.
X - center_point.
X) * pdy ) / (
dy * pdx -
dx * pdy );
1661 outer_color =
blend_colors(start_color, end_color, blend_amount);
1665 distance = (end_point.
Y - start_point.
Y) * (start_point.
X - xf) +
1666 (end_point.
X - start_point.
X) * (yf - start_point.
Y);
1670 argb_pixels[(
x-fill_area->
X) + (
y-fill_area->
Y)*cdwStride] =
1693 HBRUSH brush =
NULL;
1698 REAL theta, dsmall, dbig,
dx,
dy = 0.0;
1739 ptf[0].
X =
x2 - dsmall;
1740 ptf[1].
X =
x2 + dbig;
1742 ptf[0].
Y =
y2 - dbig;
1743 ptf[3].
Y =
y2 + dsmall;
1745 ptf[1].
Y =
y2 - dsmall;
1746 ptf[2].
Y =
y2 + dbig;
1748 ptf[3].
X =
x2 - dbig;
1749 ptf[2].
X =
x2 + dsmall;
1861 if(!custptf || !custpt || !
tp)
1920 dx =
cos(theta) * dist;
1921 dy =
sin(theta) * dist;
1936 if(
dx == 0 &&
dy == 0)
1959 REAL percent = 0.00,
dx,
dy, origx, origy, diff = -1.0;
1960 INT i,
first = 0, second = 1, third = 2, fourth = 3;
1969 origx =
pt[fourth].X;
1970 origy =
pt[fourth].Y;
1984 dx =
pt[fourth].X - origx;
1985 dy =
pt[fourth].Y - origy;
1988 percent += 0.0005 * amt;
2007 if(!pti || !
tp || !ptcopy){
2016 ERR(
"Bad bezier points\n");
2058 ERR(
"Bad path last point\n");
2075 pt[
j - 1].X - (ptcopy[
j - 1].
X - ptcopy[
j].
X),
2076 pt[
j - 1].Y - (ptcopy[
j - 1].
Y - ptcopy[
j].
Y),
2077 pt[
j - 1].X,
pt[
j - 1].Y);
2083 &ptcopy[
j - 1].
X, &ptcopy[
j - 1].
Y,
2087 &ptcopy[
j - 1].
X, &ptcopy[
j - 1].
Y,
2096 ERR(
"Bad path points\n");
2178 (*container)->contid = graphics->contid + 1;
2179 (*container)->type =
type;
2181 (*container)->smoothing = graphics->smoothing;
2182 (*container)->compqual = graphics->compqual;
2183 (*container)->interpolation = graphics->interpolation;
2184 (*container)->compmode = graphics->compmode;
2185 (*container)->texthint = graphics->texthint;
2186 (*container)->scale = graphics->scale;
2187 (*container)->unit = graphics->unit;
2188 (*container)->textcontrast = graphics->textcontrast;
2189 (*container)->pixeloffset = graphics->pixeloffset;
2190 (*container)->origin_x = graphics->origin_x;
2191 (*container)->origin_y = graphics->origin_y;
2192 (*container)->worldtrans = graphics->worldtrans;
2216 if(sts !=
Ok)
return sts;
2221 graphics->
clip = newClip;
2246 if(graphics->
hwnd) {
2254 }
else if (graphics->
image){
2257 FIXME(
"need to convert from unit %i\n",
unit);
2303 min_point = max_point =
points[0];
2313 rect->X = min_point.
X;
2314 rect->Y = min_point.
Y;
2315 rect->Width = max_point.
X - min_point.
X;
2316 rect->Height = max_point.
Y - min_point.
Y;
2374 lf->
lfItalic =
font->otm.otmTextMetrics.tmItalic ? 1 : 0;
2390 REAL angle, rel_width, rel_height, font_height;
2392 HFONT unscaled_font;
2396 font_height =
font->emSize;
2404 font_height =
font->emSize * unit_scale;
2411 rel_width /= graphics->
scale;
2412 rel_height /= graphics->
scale;
2436 TRACE(
"(%p, %p)\n",
hdc, graphics);
2461 TRACE(
"(%p, %p, %p)\n",
hdc, hDevice, graphics);
2464 FIXME(
"Don't know how to handle parameter hDevice\n");
2469 if(graphics ==
NULL)
2486 (*graphics)->alpha_hdc = 1;
2489 (*graphics)->hdc =
hdc;
2491 (*graphics)->owndc =
FALSE;
2498 (*graphics)->scale = 1.0;
2501 (*graphics)->busy =
FALSE;
2502 (*graphics)->textcontrast = 4;
2504 (*graphics)->contid = 0;
2512 (*graphics)->gdi_clip =
NULL;
2515 TRACE(
"<-- %p\n", *graphics);
2535 (*graphics)->hdc =
NULL;
2536 (*graphics)->hwnd =
NULL;
2537 (*graphics)->owndc =
FALSE;
2538 (*graphics)->image =
image;
2541 (*graphics)->image_type =
image->type;
2548 (*graphics)->scale = 1.0;
2549 (*graphics)->xres =
image->xres;
2550 (*graphics)->yres =
image->yres;
2551 (*graphics)->busy =
FALSE;
2552 (*graphics)->textcontrast = 4;
2554 (*graphics)->contid = 0;
2556 TRACE(
"<-- %p\n", *graphics);
2576 (*graphics)->hwnd =
hwnd;
2577 (*graphics)->owndc =
TRUE;
2580 (*graphics)->hdc =
NULL;
2620 TRACE(
"(%p)\n", graphics);
2636 if (graphics->
owndc)
2669 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
2672 if(!graphics || !pen ||
width <= 0 ||
height <= 0)
2698 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n", graphics, pen,
x,
y,
2709 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x1,
y1,
2712 if(!graphics || !pen)
2732 TRACE(
"(%p, %p, %d, %d, %d, %d, %d, %d, %d, %d)\n", graphics, pen,
x1,
y1,
2908 if(!graphics || !pen)
2959 TRACE(
"(%p, %p, %p, %d, %d, %d, %.2f)\n", graphics, pen,
points,
count,
offset, numberOfSegments, tension);
2972 TRACE(
"(%p, %p, %p, %d, %d, %d, %.2f)\n", graphics, pen,
points,
count,
offset, numberOfSegments, tension);
2992 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
width,
height);
2994 if(!graphics || !pen)
3020 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x,
y,
width,
height);
3030 TRACE(
"(%p, %p, %.2f, %.2f)\n", graphics,
image,
x,
y);
3032 if(!graphics || !
image)
3050 TRACE(
"(%p, %p, %p, %p, %p, %p, %d)\n", graphics,
image, src_rect,
transform, effect, imageattr, src_unit);
3052 if (!graphics || !
image)
3056 FIXME(
"effect not implemented\n");
3064 if (src_rect_buf.
X != 0.0 || src_rect_buf.
Y != 0.0)
3070 src_rect = &src_rect_buf;
3082 src_rect->
X, src_rect->
Y,
3102 TRACE(
"(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics,
image,
x,
y, srcx, srcy, srcwidth, srcheight, srcUnit);
3107 scale_x *= graphics->
xres /
image->xres;
3109 scale_y *= graphics->
yres /
image->yres;
3110 width = srcwidth * scale_x;
3111 height = srcheight * scale_y;
3153 if (
count != 3 || !dstpoints)
3156 ptf[0].
X = (
REAL)dstpoints[0].
X;
3157 ptf[0].
Y = (
REAL)dstpoints[0].
Y;
3158 ptf[1].
X = (
REAL)dstpoints[1].
X;
3159 ptf[1].
Y = (
REAL)dstpoints[1].
Y;
3160 ptf[2].
X = (
REAL)dstpoints[2].
X;
3161 ptf[2].
Y = (
REAL)dstpoints[2].
Y;
3167 unsigned int dataSize,
const unsigned char *pStr,
void *userdata)
3182 TRACE(
"(%p, %p, %p, %d, %f, %f, %f, %f, %d, %p, %p, %p)\n", graphics,
image,
points,
3183 count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes,
callback,
3199 srcUnit, imageAttributes,
callback, callbackData);
3208 srcx = srcx + srcwidth;
3209 srcwidth = -srcwidth;
3210 ptf[2].
X = ptf[2].
X + ptf[1].
X - ptf[0].
X;
3211 ptf[2].
Y = ptf[2].
Y + ptf[1].
Y - ptf[0].
Y;
3219 srcy = srcy + srcheight;
3220 srcheight = -srcheight;
3221 ptf[1].
X = ptf[1].
X + ptf[2].
X - ptf[0].
X;
3222 ptf[1].
Y = ptf[1].
Y + ptf[2].
Y - ptf[0].
Y;
3227 ptf[3].
X = ptf[2].
X + ptf[1].
X - ptf[0].
X;
3228 ptf[3].
Y = ptf[2].
Y + ptf[1].
Y - ptf[0].
Y;
3229 if (!srcwidth || !srcheight || (ptf[3].
X == ptf[0].
X && ptf[3].
Y == ptf[0].
Y))
3241 TRACE(
"src pixels: %f,%f %fx%f\n", srcx, srcy, srcwidth, srcheight);
3249 TRACE(
"graphics: %.2fx%.2f dpi, fmt %#x, scale %f, image: %.2fx%.2f dpi, fmt %#x, color %08lx\n",
3253 imageAttributes ? imageAttributes->outside_color : 0);
3255 if (ptf[1].
Y != ptf[0].
Y || ptf[2].
X != ptf[0].
X ||
3256 ptf[1].
X - ptf[0].
X != srcwidth || ptf[2].
Y - ptf[0].
Y != srcheight ||
3257 srcx < 0 || srcy < 0 ||
3259 do_resampling =
TRUE;
3261 if (imageAttributes || graphics->
alpha_hdc || do_resampling ||
3263 use_software =
TRUE;
3270 int i,
x,
y, src_stride, dst_stride;
3271 LPBYTE src_data, dst_data, dst_dyn_data=
NULL;
3277 if (!imageAttributes)
3278 imageAttributes = &defaultImageAttributes;
3284 if (dst_area.
left > pti[
i].
x) dst_area.
left = pti[
i].
x;
3286 if (dst_area.
top > pti[
i].
y) dst_area.
top = pti[
i].
y;
3305 bitmap, srcx, srcy, srcwidth, srcheight, &src_area);
3310 src_area.
X = srcx + dst_area.
left - pti[0].
x;
3311 src_area.
Y = srcy + dst_area.
top - pti[0].
y;
3321 src_stride =
sizeof(
ARGB) * src_area.
Width;
3326 lockeddata.
Stride = src_stride;
3327 lockeddata.
Scan0 = src_data;
3353 REAL x_dx, x_dy, y_dx, y_dy;
3355 GpPointF src_pointf_row, src_pointf;
3357 m11 = (ptf[1].
X - ptf[0].
X) / srcwidth;
3358 m12 = (ptf[1].
Y - ptf[0].
Y) / srcwidth;
3359 m21 = (ptf[2].
X - ptf[0].
X) / srcheight;
3360 m22 = (ptf[2].
Y - ptf[0].
Y) / srcheight;
3361 mdx = ptf[0].
X -
m11 * srcx -
m21 * srcy;
3362 mdy = ptf[0].
Y -
m12 * srcx -
m22 * srcy;
3369 dst_stride =
sizeof(
ARGB) * (dst_area.
right - dst_area.
left);
3370 x_dx = dst_to_src.
matrix[0];
3371 x_dy = dst_to_src.
matrix[1];
3372 y_dx = dst_to_src.
matrix[2];
3373 y_dy = dst_to_src.
matrix[3];
3382 dst_color = (
ARGB*)(dst_data);
3386 src_pointf_row.
X = dst_to_src.
matrix[4] +
3387 dst_area.
left * x_dx + dst_area.
top * y_dx;
3388 src_pointf_row.
Y = dst_to_src.
matrix[5] +
3389 dst_area.
left * x_dy + dst_area.
top * y_dy;
3392 y++, src_pointf_row.
X += y_dx, src_pointf_row.
Y += y_dy)
3394 for (
x = dst_area.
left, src_pointf = src_pointf_row;
x < dst_area.
right;
3395 x++, src_pointf.
X += x_dx, src_pointf.
Y += x_dy)
3397 if (src_pointf.
X >= srcx && src_pointf.
X < srcx + srcwidth &&
3398 src_pointf.
Y >= srcy && src_pointf.
Y < srcy + srcheight)
3400 imageAttributes, interpolation, offset_mode);
3407 dst_data = src_data;
3408 dst_stride = src_stride;
3414 dst_data, dst_area.
right - dst_area.
left, dst_area.
bottom - dst_area.
top, dst_stride,
3427 HDC src_hdc, dst_hdc;
3459 (
void**)&temp_bits,
NULL, 0);
3472 save_state =
SaveDC(dst_hdc);
3487 src_hdc, srcx, srcy, srcwidth, srcheight);
3491 StretchBlt(dst_hdc, pti[0].
x, pti[0].
y, pti[1].
x-pti[0].
x, pti[2].
y-pti[0].
y,
3492 src_hdc, srcx, srcy, srcwidth, srcheight,
SRCCOPY);
3510 set_rect(&rc, srcx, srcy, srcwidth, srcheight);
3516 WARN(
"GpImage with nothing we can draw (metafile in wrong state?)\n");
3531 TRACE(
"(%p, %p, %p, %d, %d, %d, %d, %d, %d, %p, %p, %p)\n", graphics,
image,
points,
count,
3532 srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes,
callback,
3547 (
REAL)srcwidth, (
REAL)srcheight, srcUnit, imageAttributes,
3555 VOID * callbackData)
3559 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %d, %p, %p, %p)\n",
3560 graphics,
image, dstx, dsty, dstwidth, dstheight, srcx, srcy,
3561 srcwidth, srcheight, srcUnit, imageattr,
callback, callbackData);
3565 points[1].X = dstx + dstwidth;
3568 points[2].Y = dsty + dstheight;
3571 srcwidth, srcheight, srcUnit, imageattr,
callback, callbackData);
3578 VOID * callbackData)
3582 TRACE(
"(%p, %p, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p, %p, %p)\n",
3583 graphics,
image, dstx, dsty, dstwidth, dstheight, srcx, srcy,
3584 srcwidth, srcheight, srcUnit, imageAttributes,
callback, callbackData);
3588 points[1].X = dstx + dstwidth;
3591 points[2].Y = dsty + dstheight;
3594 srcwidth, srcheight, srcUnit, imageAttributes,
callback, callbackData);
3604 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics,
image,
x,
y,
width,
height);
3606 if(!graphics || !
image)
3621 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics,
image,
x,
y,
width,
height);
3631 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x1,
y1,
x2,
y2);
3649 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x1,
y1,
x2,
y2);
3662 if(!pen || !graphics || (
count < 2))
3740 GpPath *flat_path, *anchor_path;
3746 INT output_height, output_width;
3749 static const BYTE static_dash_pattern[] = {1,1,1,0,1,0,1,0};
3750 const BYTE *dash_pattern;
3751 INT dash_pattern_size;
3817 output_width = output_area.
right - output_area.
left + 1;
3818 output_height = output_area.
bottom - output_area.
top + 1;
3820 if (output_width <= 0 || output_height <= 0)
3827 gp_output_area.
X = output_area.
left;
3828 gp_output_area.
Y = output_area.
top;
3829 gp_output_area.
Width = output_width;
3830 gp_output_area.
Height = output_height;
3832 output_bits =
calloc(output_width * output_height,
sizeof(
DWORD));
3842 brush_bits =
calloc(output_width * output_height,
sizeof(
DWORD));
3847 &gp_output_area, output_width);
3860 dash_pattern_size = 0;
3865 if (dash_pattern_size != 0)
3867 dash_pattern = dyn_dash_pattern =
malloc(dash_pattern_size);
3869 if (dyn_dash_pattern)
3876 dyn_dash_pattern[
j++] = (
i&1)^1;
3888 dash_pattern = static_dash_pattern;
3889 dash_pattern_size = 1;
3892 dash_pattern = static_dash_pattern;
3893 dash_pattern_size = 4;
3896 dash_pattern = &static_dash_pattern[4];
3897 dash_pattern_size = 2;
3900 dash_pattern = static_dash_pattern;
3901 dash_pattern_size = 6;
3904 dash_pattern = static_dash_pattern;
3905 dash_pattern_size = 8;
3915 int dash_pos = dash_pattern_size - 1;
3921 GpPoint start_pointi, end_pointi;
3932 subpath_start = start_point;
3935 end_point = subpath_start;
3941 start_pointi.
X =
floorf(start_point.
X);
3942 start_pointi.
Y =
floorf(start_point.
Y);
3943 end_pointi.
X =
floorf(end_point.
X);
3944 end_pointi.
Y =
floorf(end_point.
Y);
3946 if(start_pointi.
X == end_pointi.
X && start_pointi.
Y == end_pointi.
Y)
3950 if (
abs(start_pointi.
Y - end_pointi.
Y) >
abs(start_pointi.
X - end_pointi.
X))
3954 if (start_pointi.
Y < end_pointi.
Y)
3970 (end_point.
X - start_point.
X) * (
y + output_area.
top - start_point.
Y) / (end_point.
Y - start_point.
Y) )
3973 if (
x == prev_x &&
y == prev_y)
3978 dash_pos = (dash_pos + 1 == dash_pattern_size) ? 0 : dash_pos + 1;
3980 if (!dash_pattern[dash_pos])
3983 if (x < 0 || x >= output_width || y < 0 || y >= output_height)
3987 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
3996 if (start_pointi.
X < end_pointi.
X)
4012 (end_point.
Y - start_point.
Y) * (
x + output_area.
left - start_point.
X) / (end_point.
X - start_point.
X) )
4015 if (
x == prev_x &&
y == prev_y)
4020 dash_pos = (dash_pos + 1 == dash_pattern_size) ? 0 : dash_pos + 1;
4022 if (!dash_pattern[dash_pos])
4025 if (x < 0 || x >= output_width || y < 0 || y >= output_height)
4029 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
4041 DWORD rgn_data_size;
4057 rgn_data =
malloc(rgn_data_size);
4077 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
4103 (
BYTE*)output_bits, output_width, output_height, output_width * 4,
4110 free(dyn_dash_pattern);
4130 if (pen->
width < 1.415)
4179 t.matrix[0] *
t.matrix[0] +
t.matrix[1] *
t.matrix[1],
4180 t.matrix[2] *
t.matrix[2] +
t.matrix[3] *
t.matrix[3]));
4211 TRACE(
"(%p, %p, %p)\n", graphics, pen,
path);
4213 if(!pen || !graphics)
4219 if (
path->pathdata.Count == 0)
4238 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
4241 if(!graphics || !pen)
4261 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n", graphics, pen,
x,
y,
4272 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
width,
height);
4281 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x,
y,
width,
height);
4292 TRACE(
"(%p, %p, %p, %d)\n", graphics, pen, rects,
count);
4294 if(!graphics || !pen || !rects ||
count < 1)
4321 TRACE(
"(%p, %p, %p, %d)\n", graphics, pen, rects,
count);
4323 if(!rects ||
count<=0)
4345 TRACE(
"(%p, %p, %p, %d, %.2f, %d)\n", graphics, brush,
points,
4348 if(!graphics || !brush || !
points)
4375 TRACE(
"(%p, %p, %p, %d, %.2f, %d)\n", graphics, brush,
points,
4423 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush,
x,
y,
width,
height);
4425 if(!graphics || !brush)
4455 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, brush,
x,
y,
width,
height);
4533 TRACE(
"(%p, %p, %p)\n", graphics, brush,
path);
4535 if(!brush || !graphics || !
path)
4541 if (!
path->pathdata.Count)
4555 FIXME(
"Not implemented for brushtype %i\n", brush->
bt);
4569 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n",
4570 graphics, brush,
x,
y,
width,
height, startAngle, sweepAngle);
4572 if(!graphics || !brush)
4602 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n",
4603 graphics, brush,
x,
y,
width,
height, startAngle, sweepAngle);
4687 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush,
x,
y,
width,
height);
4698 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, brush,
x,
y,
width,
height);
4710 TRACE(
"(%p, %p, %p, %d)\n", graphics, brush, rects,
count);
4712 if(!graphics || !brush || !rects ||
count <= 0)
4740 TRACE(
"(%p, %p, %p, %d)\n", graphics, brush, rects,
count);
4742 if(!rects ||
count <= 0)
4857 gp_bound_rect.
X = bound_rect.
left;
4858 gp_bound_rect.
Y = bound_rect.
top;
4862 pixel_data =
calloc(gp_bound_rect.
Width * gp_bound_rect.
Height,
sizeof(*pixel_data));
4869 &gp_bound_rect, gp_bound_rect.
Width);
4873 gp_bound_rect.
Y, (
BYTE*)pixel_data, gp_bound_rect.
Width,
4874 gp_bound_rect.
Height, gp_bound_rect.
Width * 4, hregion,
4896 TRACE(
"(%p, %p, %p)\n", graphics, brush, region);
4898 if (!(graphics && brush && region))
4917 FIXME(
"not implemented for brushtype %i\n", brush->
bt);
4926 TRACE(
"(%p,%u)\n", graphics, intention);
4998 if(!graphics || !
mode)
5032 if(!graphics || !
mode)
5046 TRACE(
"(%p, %p)\n", graphics, argb);
5048 if(!graphics || !argb)
5059 FIXME(
"(%p, %p): Passing color unmodified\n", graphics, argb);
5069 if(!graphics || !
scale)
5084 if(!graphics || !
unit)
5101 if(!graphics || !
mode)
5117 if(!graphics || !
mode)
5130 TRACE(
"(%p, %p)\n", graphics, contrast);
5132 if(!graphics || !contrast)
5146 if(!graphics || !
hint)
5165 if(!graphics || !
rect)
5201 if(!graphics || !
rect)
5268 TRACE(
"(%p, %p)\n", graphics,
res);
5270 if(!graphics || !
res)
5337 pts[1].
X -= pts[0].
X;
5338 pts[1].
Y -= pts[0].
Y;
5361 IMLangFontLink *iMLFL;
5363 HFONT map_hfont,
hfont, old_font;
5366 DWORD string_codepages;
5367 WORD *glyph_indices;
5371 info->font_link_info.base_font = base_font;
5373 glyph_indices =
calloc(
length,
sizeof(*glyph_indices));
5391 if (glyph_indices[
progress] != 0xffff)
5403 hr = IMLangFontLink_MapFont(iMLFL,
info->hdc, string_codepages,
hfont, &map_hfont);
5409 IMLangFontLink_ReleaseFont(iMLFL, map_hfont);
5422 IMLangFontLink_Release(iMLFL);
5423 free(glyph_indices);
5429 DWORD to_measure_length;
5430 HFONT
hfont, oldhfont;
5431 SIZE sizeaux = { 0 };
5432 int i =
index, fitaux = 0;
5453 max_ext -= sizeaux.
cx;
5459 i += to_measure_length;
5460 if ((
i -
index) >=
length || fitaux < to_measure_length)
break;
5484 int sum = 0,
height = 0, fit, fitcpy,
i,
j, lret, nwidth,
5485 nheight, lineend, lineno = 0;
5491 INT *hotkeyprefix_offsets=
NULL;
5492 INT hotkeyprefix_count=0;
5493 INT hotkeyprefix_pos=0, hotkeyprefix_end_pos=0;
5508 info.string = stringdup;
5515 nwidth = (
int)(
rect->Width + 0.005f);
5516 nheight = (
int)(
rect->Height + 0.005f);
5517 if (ignore_empty_clip)
5519 if (!nwidth) nwidth =
INT_MAX;
5520 if (!nheight) nheight =
INT_MAX;
5523 hkprefix =
format->hkprefix;
5529 if (
string[
i] ==
'&')
5530 hotkeyprefix_count++;
5534 if (hotkeyprefix_count)
5536 hotkeyprefix_offsets =
calloc(hotkeyprefix_count,
sizeof(
INT));
5537 if (!hotkeyprefix_offsets)
5544 hotkeyprefix_count = 0;
5549 if (
string[
i] ==
'\t')
5553 hotkeyprefix_offsets[hotkeyprefix_count++] =
j;
5560 seen_prefix =
FALSE;
5562 stringdup[
j] =
string[
i];
5579 for(lret = 0; lret < fit; lret++) {
5580 if(*(stringdup +
sum + lret) ==
'\n')
5582 unixstyle_newline =
TRUE;
5586 if(*(stringdup +
sum + lret) ==
'\r' && lret + 1 < fit
5587 && *(stringdup +
sum + lret + 1) ==
'\n')
5589 unixstyle_newline =
FALSE;
5596 lineend = fit = lret;
5598 if(*(stringdup +
sum + fit) ==
' ')
5599 while(*(stringdup +
sum + fit) ==
' ')
5602 while(*(stringdup +
sum + fit - 1) !=
' '){
5605 if(*(stringdup +
sum + fit) ==
'\t')
5614 while(*(stringdup +
sum + lineend - 1) ==
' ' ||
5615 *(stringdup +
sum + lineend - 1) ==
'\t')
5650 for (hotkeyprefix_end_pos=hotkeyprefix_pos; hotkeyprefix_end_pos<hotkeyprefix_count; hotkeyprefix_end_pos++)
5651 if (hotkeyprefix_offsets[hotkeyprefix_end_pos] >=
sum + lineend)
5655 info.length = lineend;
5657 info.underlined_indexes = &hotkeyprefix_offsets[hotkeyprefix_pos];
5658 info.underlined_index_count = hotkeyprefix_end_pos-hotkeyprefix_pos;
5666 if (unixstyle_newline)
5670 sum += fit + (lret < fitcpy ? 1 : 0);
5676 sum += fit + (lret < fitcpy ? 2 : 0);
5679 hotkeyprefix_pos = hotkeyprefix_end_pos;
5691 free(hotkeyprefix_offsets);
5699 GpPointF pt[3] = {{0.0f, 0.0f}, {1.0f, 0.0f}, {0.0f, 1.0f}};
5708 if (graphics_transform)
5731 for (
i=0;
i <
info->format->range_count;
i++)
5735 if (range_start < range_end)
5740 range_rect.
Y =
info->bounds->Y /
args->rel_height;
5744 range_rect.
X = (
info->bounds->X + range_size.
cx) /
args->rel_width;
5747 range_rect.
Width = (
info->bounds->X + range_size.
cx) /
args->rel_width - range_rect.
X;
5765 HFONT gdifont, oldfont;
5777 if (regionCount < stringFormat->range_count)
5799 scaled_rect.
X = (layoutRect->X + margin_x) *
args.rel_width;
5800 scaled_rect.
Y = layoutRect->Y *
args.rel_height;
5801 scaled_rect.
Width = layoutRect->Width *
args.rel_width;
5802 scaled_rect.
Height = layoutRect->Height *
args.rel_height;
5804 if (scaled_rect.
Width >= 1 << 23) scaled_rect.
Width = 1 << 23;
5805 if (scaled_rect.
Height >= 1 << 23) scaled_rect.
Height = 1 << 23;
5854 REAL new_width, new_height;
5856 new_width =
info->bounds->Width /
args->rel_width;
5865 if (
args->codepointsfitted)
5868 if (
args->linesfilled)
5869 (*
args->linesfilled)++;
5896 HFONT oldfont, gdifont;
5903 TRACE(
"(%p, %s, %i, %p, %s, %p, %p, %p, %p)\n", graphics,
5926 TRACE(
"may be ignoring some format flags: attr %x\n",
format->attr);
5929 margin_x = (
format &&
format->generic_typographic) ? 0.0 :
font->emSize / 6.0;
5932 scaled_rect.
X = (
rect->X + margin_x) *
args.rel_width;
5933 scaled_rect.
Y =
rect->Y *
args.rel_height;
5938 scaled_rect.
Width -= margin_x * 2.0 *
args.rel_width;
5939 if (scaled_rect.
Width < 0.5)
5943 if (scaled_rect.
Width >= 1 << 23) scaled_rect.
Width = 1 << 23;
5944 if (scaled_rect.
Height >= 1 << 23) scaled_rect.
Height = 1 << 23;
5952 args.codepointsfitted = &glyphs;
5991 DWORD to_draw_length;
6003 TRACE(
"index %d, todraw %ld, used %s\n",
i, to_draw_length,
section->font ==
info->font_link_info.base_font ?
"base font" :
"map");
6008 position.
X +=
size.cx /
args->rel_width;
6009 i += to_draw_length;
6013 if (
stat ==
Ok &&
info->underlined_index_count)
6016 REAL underline_y, underline_height;
6024 for (
i=0;
i<
info->underlined_index_count;
i++)
6052 REAL rel_width, rel_height, margin_x;
6053 INT save_state, format_flags = 0;
6060 TRACE(
"(%p, %s, %i, %p, %s, %p, %p)\n", graphics,
debugstr_wn(
string,
length),
6081 TRACE(
"may be ignoring some format flags: attr %x\n",
format->attr);
6083 format_flags =
format->attr;
6095 offsety = (
rect->Height - bounds.
Height) / 2;
6099 TRACE(
"line align %d, offsety %f\n",
format->line_align, offsety);
6105 rectcpy[3].
X = rectcpy[0].
X =
rect->X;
6106 rectcpy[1].
Y = rectcpy[0].
Y =
rect->Y;
6107 rectcpy[2].
X = rectcpy[1].
X =
rect->X +
rect->Width;
6108 rectcpy[3].
Y = rectcpy[2].
Y =
rect->Y +
rect->Height;
6112 margin_x = (
format &&
format->generic_typographic) ? 0.0 :
font->emSize / 6.0;
6116 scaled_rect.Y = 0.0;
6119 if (scaled_rect.Width >= 0.5)
6121 scaled_rect.Width -= margin_x * 2.0 *
rel_width;
6122 if (scaled_rect.Width < 0.5)
6126 if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23;
6127 if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23;
6130 scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23 &&
6131 rect->Width > 0.0 &&
rect->Height > 0.0)
6176 TRACE(
"(%p)\n", graphics);
6198 TRACE(
"(%p)\n", graphics);
6247 if(!graphics || !
state)
6286 REAL scale_x, scale_y;
6290 if(!graphics || !dstrect || !srcrect || unit < UnitPixel || unit >
UnitMillimeter || !
state)
6303 scaled_srcrect.
X = scale_x * srcrect->X;
6304 scaled_srcrect.
Y = scale_y * srcrect->Y;
6305 scaled_srcrect.
Width = scale_x * srcrect->Width;
6306 scaled_srcrect.
Height = scale_y * srcrect->Height;
6312 transform.matrix[4] = dstrect->X - scaled_srcrect.
X;
6313 transform.matrix[5] = dstrect->Y - scaled_srcrect.
Y;
6327 TRACE(
"(%p, %p, %p, %d, %p)\n", graphics, dstrect, srcrect,
unit,
state);
6329 if (!dstrect || !srcrect)
6332 dstrectf.
X = dstrect->X;
6333 dstrectf.
Y = dstrect->Y;
6334 dstrectf.
Width = dstrect->Width;
6335 dstrectf.
Height = dstrect->Height;
6337 srcrectf.
X = srcrect->X;
6338 srcrectf.
Y = srcrect->Y;
6339 srcrectf.
Width = srcrect->Width;
6340 srcrectf.
Height = srcrect->Height;
6347 FIXME(
"(%p, %d, %p): stub\n", graphics, sizeData,
data);
6411 TRACE(
"(%p, %.2f, %.2f, %d)\n", graphics, sx, sy,
order);
6432 TRACE(
"(%p, %p, %d)\n", graphics, srcgraphics,
mode);
6434 if(!graphics || !srcgraphics)
6620 TRACE(
"(%p,%i,%i)\n", graphics,
x,
y);
6643 TRACE(
"(%p,%p,%p)\n", graphics,
x,
y);
6645 if (!graphics || !
x || !
y)
6686 TRACE(
"(%p, %d)\n", graphics, contrast);
6850 TRACE(
"(%p, %.2f, %.2f, %.2f, %.2f, %d)\n", graphics,
x,
y,
width,
height,
mode);
6888 TRACE(
"(%p, %d, %d, %d, %d, %d)\n", graphics,
x,
y,
width,
height,
mode);
6905 TRACE(
"(%p, %p, %d)\n", graphics, region,
mode);
6907 if(!graphics || !region)
6946 if(!graphics || !pen ||
count<=0)
6990 TRACE(
"(%p, %p)\n", graphics,
dpi);
6992 if(!graphics || !
dpi)
7004 TRACE(
"(%p, %p)\n", graphics,
dpi);
7006 if(!graphics || !
dpi)
7054 TRACE(
"(%p, %p)\n", graphics,
hdc);
7056 if(!graphics || !
hdc)
7066 else if (graphics->
owndc)
7073 else if (!graphics->
hdc ||
7090 bmih.
biSize =
sizeof(bmih);
7145 TRACE(
"(%p, %p)\n", graphics,
hdc);
7147 if(!graphics || !
hdc || !graphics->
busy)
7154 else if (graphics->
owndc)
7184 else if (
hdc != graphics->
hdc)
7201 TRACE(
"(%p, %p)\n", graphics, region);
7203 if(!graphics || !region)
7254 ERR(
"called without matching gdi_transform_acquire\n");
7270 REAL scale_x, scale_y;
7274 if (dst_space != src_space)
7287 if (dst_space < src_space)
7290 switch ((
int)src_space)
7321 switch ((
int)src_space)
7366 TRACE(
"(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space,
points,
count);
7368 if (src_space == dst_space)
return Ok;
7380 TRACE(
"(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space,
points,
count);
7425 TRACE(
"(%p, %.2f, %.2f)\n", graphics,
dx,
dy);
7448 TRACE(
"(%p, %d, %d)\n", graphics,
dx,
dy);
7463 REAL min_x, min_y, max_x, max_y,
x,
y;
7466 const WORD *glyph_indices;
7473 if (!graphics || !
text || !
font || !positions || !boundingBox)
7480 set_rect(boundingBox, 0.0f, 0.0f, 0.0f, 0.0f);
7482 if (
flags & unsupported_flags)
7483 FIXME(
"Ignoring flags %x\n",
flags & unsupported_flags);
7520 glyph_indices =
text;
7522 min_x = max_x =
x = positions[0].X;
7523 min_y = max_y =
y = positions[0].Y;
7543 if (max_y <
y + descent) max_y =
y + descent;
7544 if (min_x >
x) min_x =
x;
7548 if (max_x <
x) max_x =
x;
7551 free(dynamic_glyph_indices);
7555 boundingBox->
X = min_x;
7556 boundingBox->
Y = min_y;
7557 boundingBox->
Width = max_x - min_x;
7558 boundingBox->
Height = max_y - min_y;
7579 eto_flags |= ETO_GLYPH_INDEX;
7583 real_positions =
malloc(
sizeof(*real_positions) *
length);
7584 eto_positions =
malloc(
sizeof(*eto_positions) * 2 * (
length - 1));
7585 if (!real_positions || !eto_positions)
7587 free(real_positions);
7588 free(eto_positions);
7596 free(real_positions);
7597 free(eto_positions);
7654 free(real_positions);
7655 free(eto_positions);
7669 PointF *real_positions, real_position;
7674 DWORD max_glyphsize=0;
7676 static const MAT2 identity = {{0,1}, {0,0}, {0,0}, {0,1}};
7679 int text_mask_stride;
7681 int pixel_data_stride;
7691 if (
flags & unsupported_flags)
7692 FIXME(
"Ignoring flags %x\n",
flags & unsupported_flags);
7700 real_position = positions[0];
7708 if (!real_positions)
7719 free(real_positions);
7738 ERR(
"GetGlyphOutlineW failed\n");
7745 if (glyphsize > max_glyphsize)
7746 max_glyphsize = glyphsize;
7756 if (
top < min_y) min_y =
top;
7768 if (max_glyphsize == 0)
7777 glyph_mask =
calloc(1, max_glyphsize);
7778 text_mask =
calloc(1, (max_x - min_x) * (max_y - min_y));
7779 text_mask_stride = max_x - min_x;
7781 if (!(glyph_mask && text_mask))
7798 &glyphmetrics, max_glyphsize, glyph_mask, &
identity);
7810 BYTE *text_val = text_mask + (
left - min_x) + (
top - min_y +
y) * text_mask_stride;
7813 *text_val =
min(64, *text_val + *glyph_val);
7826 pixel_data =
calloc((max_x - min_x) * (max_y - min_y), 4);
7833 pixel_area.
X = min_x;
7834 pixel_area.
Y = min_y;
7835 pixel_area.
Width = max_x - min_x;
7836 pixel_area.
Height = max_y - min_y;
7837 pixel_data_stride = pixel_area.
Width * 4;
7850 BYTE *text_val = text_mask + text_mask_stride *
y;
7851 BYTE *pixel_val = pixel_data + pixel_data_stride *
y + 3;
7854 *pixel_val = (*pixel_val) * (*text_val) / 64;
7925 TRACE(
"(%p, %p)\n", graphics,
res);
7944 TRACE(
"(%p)\n", graphics);
7959 graphics->
scale = 1.0;
7967 TRACE(
"(%p, %p)\n", graphics, pabort);
7973 FIXME(
"Abort callback is not supported.\n");
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
_STLP_MOVE_TO_STD_NAMESPACE void fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val)
static const char * wine_dbgstr_point(const POINT *ppt)
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR stringFormat[]
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static GLboolean is_identity(const GLfloat m[16])
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush)
GpStatus get_hatch_data(GpHatchStyle hatchstyle, const unsigned char **result)
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
GpStatus WINGDIPAPI GdipDeleteFont(GpFont *font)
GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
static GpStatus brush_fill_path(GpGraphics *graphics, GpBrush *brush)
GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipDrawImageFX(GpGraphics *graphics, GpImage *image, GpRectF *src_rect, GpMatrix *transform, CGpEffect *effect, GpImageAttributes *imageattr, GpUnit src_unit)
GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image, REAL dstx, REAL dsty, REAL dstwidth, REAL dstheight, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageattr, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipDrawClosedCurve(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count)
static ARGB sample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT width, UINT height, INT x, INT y, GDIPCONST GpImageAttributes *attributes)
static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *image, GDIPCONST GpPoint *points, INT count, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipFillClosedCurve(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipSetClipGraphics(GpGraphics *graphics, GpGraphics *srcgraphics, CombineMode mode)
static GpStatus free_gdi_logbrush(LOGBRUSH *lb)
HPALETTE WINGDIPAPI GdipCreateHalftonePalette(void)
GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y)
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects, INT count)
GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
GpStatus WINGDIPAPI GdipComment(GpGraphics *graphics, UINT sizeData, GDIPCONST BYTE *data)
GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPoint *points, INT count)
static GpStatus create_gdi_logbrush(const GpBrush *brush, LOGBRUSH *lb, INT origin_x, INT origin_y)
static GpStatus SOFTWARE_GdipFillRegion(GpGraphics *graphics, GpBrush *brush, GpRegion *region)
GpStatus WINGDIPAPI GdipBeginContainer(GpGraphics *graphics, GDIPCONST GpRectF *dstrect, GDIPCONST GpRectF *srcrect, GpUnit unit, GraphicsContainer *state)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR *filename, UINT access, IStream **stream)
GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, INT width, INT height)
GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipGetTextRenderingHint(GpGraphics *graphics, TextRenderingHint *hint)
GpStatus WINGDIPAPI GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x, INT y, INT width, INT height)
static GpStatus GDI32_GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
GpStatus WINGDIPAPI GdipDrawImagePoints(GpGraphics *graphics, GpImage *image, GDIPCONST GpPointF *dstpoints, INT count)
GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, INT x, INT y, INT width, INT height)
static BOOL CALLBACK play_metafile_proc(EmfPlusRecordType record_type, unsigned int flags, unsigned int dataSize, const unsigned char *pStr, void *userdata)
GpStatus WINGDIPAPI GdipDrawCurve3(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count, INT offset, INT numberOfSegments, REAL tension)
GpStatus WINGDIPAPI GdipFillRegion(GpGraphics *graphics, GpBrush *brush, GpRegion *region)
GpStatus WINGDIPAPI GdipFillPolygonI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPoint *points, INT count, GpFillMode fillMode)
GpStatus WINGDIPAPI GdipGraphicsSetAbort(GpGraphics *graphics, GdiplusAbort *pabort)
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL *dpi)
static void font_link_get_text_extent_point(struct gdip_format_string_info *info, INT index, int length, int max_ext, LPINT fit, SIZE *size)
GpStatus WINGDIPAPI GdipBeginContainerI(GpGraphics *graphics, GDIPCONST GpRect *dstrect, GDIPCONST GpRect *srcrect, GpUnit unit, GraphicsContainer *state)
GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB *argb)
GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, REAL x2, REAL y2)
GpStatus WINGDIPAPI GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics *graphics, HRGN hrgn, CombineMode mode)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
void gdi_dc_release(GpGraphics *graphics, HDC hdc)
static GpStatus SOFTWARE_GdipDrawThinPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention)
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRect *rects, INT count)
GpStatus WINGDIPAPI GdipTranslateClip(GpGraphics *graphics, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipResetPageTransform(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy, GpMatrixOrder order)
static void delete_container(GraphicsContainerItem *container)
static const COLORREF DC_BACKGROUND_KEY
static GpStatus measure_ranges_callback(struct gdip_format_string_info *info)
static GpStatus begin_container(GpGraphics *graphics, GraphicsContainerType type, GraphicsContainer *state)
static GpStatus alpha_blend_hdc_pixels(GpGraphics *graphics, INT dst_x, INT dst_y, const BYTE *src, INT src_width, INT src_height, INT src_stride, PixelFormat fmt)
GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPoint *points, INT count, REAL tension, GpFillMode fill)
GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics *graphics, REAL angle, GpMatrixOrder order)
void transform_properties(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, BOOL graphics_transform, REAL *rel_width, REAL *rel_height, REAL *angle)
GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, REAL width, REAL height)
static void release_font_link_info(struct gdip_font_link_info *font_link_info)
GpStatus WINGDIPAPI GdipGetClip(GpGraphics *graphics, GpRegion *region)
GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy, GpMatrixOrder order)
static GpStatus GDI32_GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics *graphics, CompositingMode mode)
GpStatus gdip_transform_points(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipTranslateClipI(GpGraphics *graphics, INT dx, INT dy)
GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPointF *points, INT count, REAL tension, GpFillMode fill)
GpStatus WINGDIPAPI GdipDrawPolygonI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDrawPie(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipDrawPolygon(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count)
static HBITMAP create_hatch_bitmap(const GpHatch *hatch, INT origin_x, INT origin_y)
static GpStatus measure_string_callback(struct gdip_format_string_info *info)
GpStatus WINGDIPAPI GdipResetClip(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mode)
static ARGB blend_line_gradient(GpLineGradient *brush, REAL position)
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode *mode)
GpStatus WINGDIPAPI GdipDrawLines(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count)
GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipGetTextContrast(GpGraphics *graphics, UINT *contrast)
GpStatus WINGDIPAPI GdipGetDC(GpGraphics *graphics, HDC *hdc)
static BOOL brush_can_fill_path(GpBrush *brush, BOOL is_fill)
static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics *graphics, REAL *scale)
GpStatus gdi_dc_acquire(GpGraphics *graphics, HDC *hdc)
GpStatus WINGDIPAPI GdipGraphicsClear(GpGraphics *graphics, ARGB color)
static GpStatus get_visible_clip_region(GpGraphics *graphics, GpRegion *rgn)
GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics *graphics, INT x, INT y, INT width, INT height, CombineMode mode)
static GpStatus draw_string_callback(struct gdip_format_string_info *info)
static ARGB transform_color(ARGB color, int matrix[5][5])
static BOOL color_is_gray(ARGB color)
GpStatus WINGDIPAPI GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRectF *rects, INT count)
GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
static GpStatus SOFTWARE_GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint hint)
GpStatus WINGDIPAPI GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf)
GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, REAL x, REAL y, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit)
static void get_bitmap_sample_size(InterpolationMode interpolation, WrapMode wrap, GpBitmap *bitmap, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpRect *rect)
GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, RectF *bounds, INT *codepointsfitted, INT *linesfilled)
GpStatus WINGDIPAPI GdipGetClipBounds(GpGraphics *graphics, GpRectF *rect)
GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics *graphics, CompositingMode *mode)
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipDrawClosedCurveI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
GpStatus WINGDIPAPI GdipGetCompositingQuality(GpGraphics *graphics, CompositingQuality *quality)
GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRect *rects, INT count)
static BOOL is_metafile_graphics(const GpGraphics *graphics)
GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, INT dstx, INT dsty, INT dstwidth, INT dstheight, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipFillPolygon2(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipGetVisibleClipBoundsI(GpGraphics *graphics, GpRect *rect)
static void init_hatch_palette(ARGB *hatch_palette, ARGB fore_color, ARGB back_color)
GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics *graphics, GpRegion *region, CombineMode mode)
static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT width, UINT height, GpPointF *point, GDIPCONST GpImageAttributes *attributes, InterpolationMode interpolation, PixelOffsetMode offset_mode)
GpStatus WINGDIPAPI GdipIsVisiblePoint(GpGraphics *graphics, REAL x, REAL y, BOOL *result)
GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipFillClosedCurveI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPoint *points, INT count)
static void restore_dc(GpGraphics *graphics, HDC hdc, INT state)
GpStatus gdi_transform_acquire(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipGetRenderingOrigin(GpGraphics *graphics, INT *x, INT *y)
static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, DWORD *argb_pixels, GpRect *fill_area, UINT cdwStride)
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
static GpStatus get_graphics_bounds(GpGraphics *graphics, GpRectF *rect)
static void shorten_bezier_amt(GpPointF *pt, REAL amt, BOOL rev)
GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics *graphics, GpRectF *rect)
static GpStatus draw_poly(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *pt, GDIPCONST BYTE *types, INT count, BOOL caps)
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1, INT x2, INT y2)
GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count)
static INT prepare_dc(GpGraphics *graphics, HDC hdc, GpPen *pen)
GpStatus WINGDIPAPI GdipIsVisiblePointI(GpGraphics *graphics, INT x, INT y, BOOL *result)
GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix, RectF *boundingBox)
static GpStatus alpha_blend_bmp_pixels(GpGraphics *graphics, INT dst_x, INT dst_y, const BYTE *src, INT src_width, INT src_height, INT src_stride, const PixelFormat fmt)
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics *graphics, GraphicsState *state)
static GpStatus GDI32_GdipFillRegion(GpGraphics *graphics, GpBrush *brush, GpRegion *region)
GpStatus WINGDIPAPI GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
static GpStatus GDI32_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
static GpStatus init_container(GraphicsContainerItem **container, GDIPCONST GpGraphics *graphics, GraphicsContainerType type)
static void round_points(POINT *pti, GpPointF *ptf, INT count)
GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsContainer state)
static BOOL round_color_matrix(const ColorMatrix *matrix, int values[5][5])
static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL size, const GpCustomLineCap *custom, REAL x1, REAL y1, REAL x2, REAL y2)
GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics *graphics, BOOL *res)
GpStatus gdi_transform_release(GpGraphics *graphics)
GpStatus trace_path(GpGraphics *graphics, GpPath *path)
static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst_y, const BYTE *src, INT src_width, INT src_height, INT src_stride, HRGN hregion, PixelFormat fmt)
GpStatus gdip_format_string(GpGraphics *graphics, HDC hdc, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, int ignore_empty_clip, gdip_format_string_callback callback, void *user_data)
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics *graphics, CompositingQuality quality)
static void shorten_line_percent(REAL x1, REAL y1, REAL *x2, REAL *y2, REAL percent)
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics, InterpolationMode mode)
static BYTE convert_path_point_type(BYTE type)
GpStatus WINGDIPAPI GdipIsVisibleRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, BOOL *result)
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image, GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipIsVisibleClipEmpty(GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipDrawEllipse(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height)
static GpStatus SOFTWARE_GdipDrawPath(GpGraphics *graphics, GpPen *pen, GpPath *path)
GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics, InterpolationMode *mode)
GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height)
static ARGB blend_colors(ARGB start, ARGB end, REAL position)
GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *path)
static COLORREF get_gdi_brush_color(const GpBrush *brush)
GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, REAL width, REAL height)
static GpStatus get_clip_hrgn(GpGraphics *graphics, HRGN *hrgn)
GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpPointF *points, INT count, GpFillMode fillMode)
GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *layoutRect, GDIPCONST GpStringFormat *stringFormat, INT regionCount, GpRegion **regions)
GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, HFONT *hfont, LOGFONTW *lfw_return, GDIPCONST GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsVisibleRectI(GpGraphics *graphics, INT x, INT y, INT width, INT height, BOOL *result)
static REAL intersect_line_scanline(const GpPointF *p1, const GpPointF *p2, REAL y)
GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDrawClosedCurve2(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics *graphics, HDC hdc)
struct _GraphicsContainerItem GraphicsContainerItem
GpStatus WINGDIPAPI GdipSetRenderingOrigin(GpGraphics *graphics, INT x, INT y)
GpStatus WINGDIPAPI GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipDrawImagePointsI(GpGraphics *graphics, GpImage *image, GDIPCONST GpPoint *dstpoints, INT count)
GpStatus WINGDIPAPI GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
static void gdi_alpha_blend(GpGraphics *graphics, INT dst_x, INT dst_y, INT dst_width, INT dst_height, HDC hdc, INT src_x, INT src_y, INT src_width, INT src_height)
GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipDrawImagePointRectI(GpGraphics *graphics, GpImage *image, INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit)
static GpStatus restore_container(GpGraphics *graphics, GDIPCONST GraphicsContainerItem *container)
GpStatus WINGDIPAPI GdipGetClipBoundsI(GpGraphics *graphics, GpRect *rect)
GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode mode)
GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics *graphics, GpImage *image, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush)
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state)
static GpStatus alpha_blend_pixels(GpGraphics *graphics, INT dst_x, INT dst_y, const BYTE *src, INT src_width, INT src_height, INT src_stride, PixelFormat fmt)
PixelFormat apply_image_attributes(const GpImageAttributes *attributes, LPBYTE data, UINT width, UINT height, INT stride, ColorAdjustType type, PixelFormat fmt)
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics *graphics, GpUnit unit)
GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y, INT width, INT height)
static HBRUSH create_gdi_brush(const GpBrush *brush, INT origin_x, INT origin_y)
GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics *graphics, GpUnit *unit)
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
static GpStatus get_graphics_device_bounds(GpGraphics *graphics, GpRectF *rect)
static void get_gdi_transform(HDC hdc, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics *graphics, GpBrush *brush, INT x, INT y, INT width, INT height)
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
static BOOL brush_can_fill_pixels(GpBrush *brush)
static void shorten_line_amt(REAL x1, REAL y1, REAL *x2, REAL *y2, REAL amt)
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode mode)
GpStatus WINGDIPAPI GdipSetTextContrast(GpGraphics *graphics, UINT contrast)
GpStatus WINGDIPAPI GdipDrawImage(GpGraphics *graphics, GpImage *image, REAL x, REAL y)
GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipDrawClosedCurve2I(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics *graphics, REAL scale)
GpStatus WINGDIPAPI GdipDrawCurve3I(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points, INT count, INT offset, INT numberOfSegments, REAL tension)
static void generate_font_link_info(struct gdip_format_string_info *info, DWORD length, GDIPCONST GpFont *base_font)
static GpStatus end_container(GpGraphics *graphics, GraphicsContainerType type, GraphicsContainer state)
GpStatus WINGDIPAPI GdipBeginContainer2(GpGraphics *graphics, GraphicsContainer *state)
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipClonePath(GpPath *path, GpPath **clone)
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
GpStatus WINGDIPAPI GdipAddPathPolygonI(GpPath *path, GDIPCONST GpPoint *points, INT count)
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap *bitmap, GDIPCONST GpRect *rect, UINT flags, PixelFormat format, BitmapData *lockeddata)
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap *bitmap, INT x, INT y, ARGB *color)
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap *bitmap, INT x, INT y, ARGB color)
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap *bitmap, BitmapData *lockeddata)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpMatrixOrder order)
GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsVisibleRegionRect(GpRegion *region, REAL x, REAL y, REAL w, REAL h, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode mode)
GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *region)
GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *region)
GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hrgn)
GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *region, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF *rect, GpRegion **region)
GpStatus WINGDIPAPI GdipIsVisibleRegionPoint(GpRegion *region, REAL x, REAL y, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipCombineRegionRectI(GpRegion *region, GDIPCONST GpRect *rect, CombineMode mode)
GpStatus WINGDIPAPI GdipCreateRegion(GpRegion **region)
GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region, GDIPCONST GpRectF *rect, CombineMode mode)
GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region)
GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1, GpRegion *region2, CombineMode mode)
GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, GpRectF *rect)
GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath *path, GpRegion **region)
GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *region)
GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *region, GpRegion **clone)
static void cleanup(void)
HRESULT WINAPI GetGlobalFontLinkObject(IMLangFontLink **obj)
_ACRTIMP float __cdecl powf(float, float)
_ACRTIMP double __cdecl sqrt(double)
_ACRTIMP double __cdecl fabs(double)
static float hypotf(float x, float y)
_ACRTIMP double __cdecl sin(double)
_ACRTIMP double __cdecl ceil(double)
_ACRTIMP double __cdecl fmax(double, double)
_ACRTIMP double __cdecl cos(double)
_ACRTIMP float __cdecl fmodf(float, float)
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
#define wrap(journal, var)
GpStatus hresult_to_status(HRESULT res)
void delete_element(region_element *element)
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride)
const char * debugstr_rectf(const RectF *rc)
REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi, BOOL printer_display)
const char * debugstr_pointf(const PointF *pt)
COLORREF ARGB2COLORREF(ARGB color)
REAL gdiplus_atan2(REAL dy, REAL dx)
HBITMAP ARGB2BMP(ARGB color)
REAL units_scale(GpUnit from, GpUnit to, REAL dpi, BOOL printer_display)
const char * debugstr_matrix(const GpMatrix *matrix)
GpStatus METAFILE_RotateWorldTransform(GpMetafile *metafile, REAL angle, MatrixOrder order)
#define PIXELFORMATBPP(x)
GpStatus METAFILE_GraphicsClear(GpMetafile *metafile, ARGB color)
GpStatus METAFILE_TranslateWorldTransform(GpMetafile *metafile, REAL dx, REAL dy, MatrixOrder order)
GpStatus METAFILE_OffsetClip(GpMetafile *metafile, REAL dx, REAL dy)
static ARGB color_over(ARGB bg, ARGB fg)
GpStatus METAFILE_ScaleWorldTransform(GpMetafile *metafile, REAL sx, REAL sy, MatrixOrder order)
static INT gdip_round(REAL x)
@ IMAGEATTR_NOOP_UNDEFINED
GpStatus METAFILE_FillEllipse(GpMetafile *metafile, GpBrush *brush, GpRectF *rect)
#define WineCoordinateSpaceGdiDevice
GpStatus METAFILE_AddSimpleProperty(GpMetafile *metafile, SHORT prop, SHORT val)
static void set_rect(GpRectF *rect, REAL x, REAL y, REAL width, REAL height)
GpStatus METAFILE_SetPageTransform(GpMetafile *metafile, GpUnit unit, REAL scale)
GpStatus METAFILE_ReleaseDC(GpMetafile *metafile, HDC hdc)
GpStatus METAFILE_SetClipRegion(GpMetafile *metafile, GpRegion *region, CombineMode mode)
GpStatus METAFILE_SetClipRect(GpMetafile *metafile, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
GpStatus METAFILE_GraphicsDeleted(GpMetafile *metafile)
GpStatus METAFILE_BeginContainerNoParams(GpMetafile *metafile, DWORD StackIndex)
GpStatus convert_pixels(INT width, INT height, INT dst_stride, BYTE *dst_bits, PixelFormat dst_format, ColorPalette *dst_palette, INT src_stride, const BYTE *src_bits, PixelFormat src_format, ColorPalette *src_palette)
GpStatus widen_flat_path_anchors(GpPath *flat_path, GpPen *pen, REAL pen_width, GpPath **anchors)
GpStatus METAFILE_GetDC(GpMetafile *metafile, HDC *hdc)
GpStatus METAFILE_FillPath(GpMetafile *metafile, GpBrush *brush, GpPath *path)
GpStatus METAFILE_DrawArc(GpMetafile *metafile, GpPen *pen, const GpRectF *rect, REAL startAngle, REAL sweepAngle)
GpStatus METAFILE_SetClipPath(GpMetafile *metafile, GpPath *path, CombineMode mode)
GpStatus METAFILE_DrawRectangles(GpMetafile *metafile, GpPen *pen, const GpRectF *rects, INT count)
GpStatus METAFILE_SetRenderingOrigin(GpMetafile *metafile, INT x, INT y)
GpStatus METAFILE_RestoreGraphics(GpMetafile *metafile, DWORD StackIndex)
GpStatus METAFILE_MultiplyWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *matrix, MatrixOrder order)
GpStatus METAFILE_SetWorldTransform(GpMetafile *metafile, GDIPCONST GpMatrix *transform)
GpStatus METAFILE_ResetWorldTransform(GpMetafile *metafile)
static BOOL has_gdi_dc(GpGraphics *graphics)
GpStatus METAFILE_DrawImagePointsRect(GpMetafile *metafile, GpImage *image, GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
const struct GpStringFormat default_drawstring_format
GpStatus METAFILE_DrawEllipse(GpMetafile *metafile, GpPen *pen, GpRectF *rect)
GpStatus METAFILE_BeginContainer(GpMetafile *metafile, GDIPCONST GpRectF *dstrect, GDIPCONST GpRectF *srcrect, GpUnit unit, DWORD StackIndex)
GpStatus(* gdip_format_string_callback)(struct gdip_format_string_info *info)
GpStatus METAFILE_FillPie(GpMetafile *metafile, GpBrush *brush, const GpRectF *rect, REAL startAngle, REAL sweepAngle)
static ARGB color_over_fgpremult(ARGB bg, ARGB fg)
GpStatus METAFILE_DrawDriverString(GpMetafile *metafile, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpStringFormat *format, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix)
GpStatus METAFILE_EndContainer(GpMetafile *metafile, DWORD StackIndex)
GpStatus METAFILE_DrawPath(GpMetafile *metafile, GpPen *pen, GpPath *path)
GpStatus METAFILE_SaveGraphics(GpMetafile *metafile, DWORD StackIndex)
GpStatus METAFILE_ResetClip(GpMetafile *metafile)
GpStatus METAFILE_FillRegion(GpMetafile *metafile, GpBrush *brush, GpRegion *region)
GpStatus METAFILE_FillRectangles(GpMetafile *metafile, GpBrush *brush, GDIPCONST GpRectF *rects, INT count)
@ ColorMatrixFlagsAltGray
@ ColorMatrixFlagsDefault
@ CompositingModeSourceOver
@ CompositingModeSourceCopy
@ EmfPlusRecordTypeSetCompositingQuality
@ EmfPlusRecordTypeSetPixelOffsetMode
@ EmfPlusRecordTypeSetCompositingMode
@ EmfPlusRecordTypeSetInterpolationMode
@ EmfPlusRecordTypeSetAntiAliasMode
@ EmfPlusRecordTypeSetTextRenderingHint
@ CustomLineCapTypeAdjustableArrow
@ PixelOffsetModeHighSpeed
@ PixelOffsetModeHighQuality
@ CompositingQualityDefault
@ TextRenderingHintClearTypeGridFit
@ StringFormatFlagsLineLimit
@ StringFormatFlagsNoWrap
@ StringFormatFlagsNoClip
@ DriverStringOptionsRealizedAdvance
@ DriverStringOptionsCmapLookup
@ PathPointTypePathTypeMask
@ PathPointTypeCloseSubpath
@ BrushTypeLinearGradient
@ InterpolationModeHighQualityBicubic
@ InterpolationModeBicubic
@ InterpolationModeHighQualityBilinear
@ InterpolationModeInvalid
@ InterpolationModeHighQuality
@ InterpolationModeDefault
@ InterpolationModeBilinear
@ InterpolationModeNearestNeighbor
@ InterpolationModeLowQuality
@ ImageLockModeUserInputBuf
ImageAbort DrawImageAbort
struct GdiplusAbort GdiplusAbort
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLuint GLenum GLenum transform
GLenum GLenum GLenum GLenum GLenum scale
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean b
GLsizei GLsizei GLfloat distance
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLboolean GLenum GLenum GLvoid * values
GLuint GLsizei GLsizei * length
GLuint GLint GLboolean GLint GLenum access
GLuint GLdouble GLdouble GLint GLint order
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
static IPrintDialogCallback callback
static const char * dst_format
static const RECT graphics_bounds[]
static float int float int float int x3
static float int float int float int float int x4
static float int float int float int float y3
static float int float int float int float int float y4
#define STGM_SHARE_DENY_WRITE
static HANDLE ACCESS_MASK ULONG attributes
png_const_structrp png_const_inforp int * unit
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static int sum(int x_, int y_)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
INT gdi_transform_acquire_count
PixelOffsetMode pixeloffset
InterpolationMode interpolation
CompositingQuality compqual
TextRenderingHint texthint
GpCustomLineCap * customend
GpCustomLineCap * customstart
WCHAR lfFaceName[LF_FACESIZE]
CompositingQuality compqual
TextRenderingHint texthint
PixelOffsetMode pixeloffset
GraphicsContainerType type
InterpolationMode interpolation
int otmsUnderscorePosition
GDIPCONST GpBrush * brush
GDIPCONST GpFont * base_font
static int processed(const type_t *type)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
int WINAPI SetMapMode(_In_ HDC, _In_ int)
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI Ellipse(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
DWORD WINAPI GetGlyphIndicesW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpstr, _In_ int c, _Out_writes_(c) LPWORD pgi, _In_ DWORD fl)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI SetGraphicsMode(_In_ HDC, _In_ int)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
HPEN WINAPI ExtCreatePen(_In_ DWORD iPenStyle, _In_ DWORD cWidth, _In_ const LOGBRUSH *plbrush, _In_ DWORD cStyle, _In_reads_opt_(cStyle) const DWORD *pstyle)
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT)
HRGN WINAPI CreatePolygonRgn(_In_reads_(cPoint) const POINT *pptl, _In_ int cPoint, _In_ int iMode)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI GdiFlush(void)
BOOL WINAPI SelectClipPath(_In_ HDC, _In_ int)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI FillPath(_In_ HDC)
BOOL WINAPI GetTransform(HDC, DWORD, XFORM *)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
#define OUT_DEFAULT_PRECIS
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI StrokeAndFillPath(_In_ HDC)
#define CLIP_DEFAULT_PRECIS
UINT WINAPI GetOutlineTextMetricsW(_In_ HDC hdc, _In_ UINT cjCopy, _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICW potm)
BOOL WINAPI GetTextExtentExPointW(_In_ HDC hdc, _In_reads_(cchString) LPCWSTR lpszString, _In_ int cchString, _In_ int nMaxExtent, _Out_opt_ LPINT lpnFit, _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, _Out_ LPSIZE lpSize)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
DWORD WINAPI GetRegionData(_In_ HRGN hrgn, _In_ DWORD nCount, _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI PolyDraw(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_reads_(cpt) const BYTE *aj, _In_ int cpt)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
BOOL WINAPI EndPath(_In_ HDC)
BOOL WINAPI BeginPath(_In_ HDC hdc)
DWORD WINAPI GetGlyphOutlineW(_In_ HDC hdc, _In_ UINT uChar, _In_ UINT fuFormat, _Out_ LPGLYPHMETRICS lpgm, _In_ DWORD cjBuffer, _Out_writes_bytes_opt_(cjBuffer) LPVOID pvBuffer, _In_ CONST MAT2 *lpmat2)
#define GGI_MARK_NONEXISTING_GLYPHS
int WINAPI SaveDC(_In_ HDC)
int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
BOOL WINAPI ModifyWorldTransform(_In_ HDC, _In_opt_ const XFORM *, _In_ DWORD)
BOOL WINAPI GetCharABCWidthsW(_In_ HDC hdc, _In_ UINT wFirst, _In_ UINT wLast, _Out_writes_(wLast - wFirst+1) LPABC lpABC)
BOOL WINAPI Pie(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI WindowFromDC(_In_ HDC hDC)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)