47#define ANCHOR_WIDTH (2.0)
58 else if (graphics->
owndc)
105 ERR(
"Bad point type\n");
136 argb =
line->startcolor;
146 FIXME(
"unhandled brush type %d\n", brush->
bt);
165 hatch_palette[0] = back_color;
166 hatch_palette[1] =
blend_colors(back_color, fore_color, 0.25);
168 hatch_palette[3] = fore_color;
178 bmih.
biSize =
sizeof(bmih);
189 const unsigned char *hatch_data;
193 ARGB hatch_palette[4];
201 for (
y = 0;
y < 8;
y++)
203 const int hy = (
y + origin_y) & 7;
204 const int hx = origin_x & 7;
205 unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
207 for (
x = 0; x < 8; x++, row >>= 1)
222 for (
y = 0;
y < 64;
y++)
258 FIXME(
"unhandled brush type %d\n", brush->
bt);
295 INT save_state,
i, numdashes;
307 REAL scale_x, scale_y;
330 TRACE(
"dashes are: ");
331 for(
i = 0;
i < numdashes;
i++){
333 TRACE(
"%ld, ", dash_array[
i]);
335 TRACE(
"\n and the pen style is %x\n", pen->
style);
339 numdashes, dash_array);
382 INT technology, shadeblendcaps;
391 if ((technology ==
DT_RASPRINTER && shadeblendcaps == SB_NONE)
394 TRACE(
"alpha blending not supported by device, fallback to StretchBlt\n");
396 StretchBlt(dst_hdc, dst_x, dst_y, dst_width, dst_height,
397 hdc, src_x, src_y, src_width, src_height,
SRCCOPY);
409 hdc, src_x, src_y, src_width, src_height, bf);
463 for (
y=0;
y<src_height;
y++)
465 for (
x=0;
x<src_width;
x++)
467 ARGB dst_color, src_color;
468 src_color = ((
ARGB*)(
src + src_stride *
y))[
x];
472 if (!(src_color & 0xff000000))
479 if (!(src_color & 0xff000000))
517 (
void**)&temp_bits,
NULL, 0);
522 if ((graphics->
hdc &&
526 memcpy(temp_bits,
src, src_width * src_height * 4);
529 4 * src_width,
src, src_stride);
533 hdc, 0, 0, src_width, src_height);
554 HRGN
hrgn, visible_rgn;
592 &
src[(rects[
i].
left - dst_x) * 4 + (rects[
i].
top - dst_y) * src_stride],
605 ERR(
"This should not be used for metafiles; fix caller\n");
635 src_height, src_stride,
fmt);
655 INT start_a, end_a, final_a;
660 start_a = ((
start >> 24) & 0xff) * (
pos ^ 0xff);
661 end_a = ((
end >> 24) & 0xff) *
pos;
663 final_a = start_a + end_a;
665 if (final_a < 0xff)
return 0;
667 return (final_a / 0xff) << 24 |
668 ((((
start >> 16) & 0xff) * start_a + (((
end >> 16) & 0xff) * end_a)) / final_a) << 16 |
669 ((((
start >> 8) & 0xff) * start_a + (((
end >> 8) & 0xff) * end_a)) / final_a) << 8 |
670 (((
start & 0xff) * start_a + ((
end & 0xff) * end_a)) / final_a);
681 position =
fmodf(position, 1.0f);
682 if (position < 0.0f) position += 1.0f;
686 position =
fmodf(position, 2.0f);
687 if (position < 0.0f) position += 2.0f;
688 if (position > 1.0f) position = 2.0f - position;
696 REAL left_blendpos, left_blendfac, right_blendpos, right_blendfac;
708 range = right_blendpos - left_blendpos;
709 blendfac = (left_blendfac * (right_blendpos - position) +
710 right_blendfac * (position - left_blendpos)) /
range;
718 ARGB left_blendcolor, right_blendcolor;
719 REAL left_blendpos, right_blendpos;
730 blendfac = (blendfac - left_blendpos) / (right_blendpos - left_blendpos);
731 return blend_colors(left_blendcolor, right_blendcolor, blendfac);
756 unsigned char a,
r,
g,
b;
777 return (
a << 24) | (
r << 16) | (
g << 8) |
b;
782 unsigned char r,
g,
b;
788 return (
r ==
g) && (
g ==
b);
807 BYTE min_blue, min_green, min_red;
808 BYTE max_blue, max_green, max_red;
818 min_blue =
key->low&0xff;
819 min_green = (
key->low>>8)&0xff;
820 min_red = (
key->low>>16)&0xff;
822 max_blue =
key->high&0xff;
823 max_green = (
key->high>>8)&0xff;
824 max_red = (
key->high>>16)&0xff;
832 blue = *src_color&0xff;
833 green = (*src_color>>8)&0xff;
834 red = (*src_color>>16)&0xff;
835 if (
blue >= min_blue &&
green >= min_green &&
red >= min_red &&
836 blue <= max_blue &&
green <= max_green &&
red <= max_red)
837 *src_color = 0x00000000;
861 if (*src_color ==
table->colormap[
i].oldColor.Argb)
863 *src_color =
table->colormap[
i].newColor.Argb;
875 int gray_matrix[5][5];
934 blue = *src_color&0xff;
935 green = (*src_color>>8)&0xff;
936 red = (*src_color>>16)&0xff;
943 *src_color = (*src_color & 0xff000000) | (
red << 16) | (
green << 8) |
blue;
958 switch (interpolation)
1036 if ((
x /
width) % 2 == 0)
1055 if (x < src_rect->
X || y < src_rect->
Y ||
x >= src_rect->X + src_rect->Width ||
y >= src_rect->Y + src_rect->Height)
1057 ERR(
"out of range pixel requested\n");
1061 return ((
DWORD*)(
bits))[(
x - src_rect->X) + (
y - src_rect->Y) * src_rect->Width];
1070 switch (interpolation)
1074 FIXME(
"Unimplemented interpolation %i\n", interpolation);
1079 INT leftx, rightx, topy, bottomy;
1080 ARGB topleft, topright, bottomleft, bottomright;
1085 leftx = (
INT)leftxf;
1091 if (leftx == rightx && topy == bottomy)
1104 x_offset =
point->X - leftxf;
1113 switch (offset_mode)
1135 return (p1->
X - p2->
X) * (p2->
Y -
y) / (p2->
Y - p1->
Y) + p2->
X;
1156 return ((hatch->
forecol & 0xff000000) == 0xff000000) &&
1157 ((hatch->
backcol & 0xff000000) == 0xff000000);
1207 src_hdc, 0, 0, 1, 1);
1218 HBRUSH gdibrush, old_brush;
1266 argb_pixels[
x +
y*cdwStride] =
fill->color;
1273 const unsigned char *hatch_data;
1274 ARGB hatch_palette[4];
1282 for (
y = 0;
y < fill_area->
Height;
y++, argb_pixels += cdwStride)
1284 const int hy = ~(
y + fill_area->
Y - graphics->
origin_y) & 7;
1285 const int hx = graphics->
origin_x & 7;
1286 const unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
1288 for (
x = 0;
x < fill_area->
Width;
x++)
1290 const unsigned int srow =
row >> (~(
x + fill_area->
X) & 7);
1293 index = (srow & 1) ? 2 : (srow & 0x82) ? 1 : 0;
1295 index = (srow & 1) ? 3 : 0;
1297 argb_pixels[
x] = hatch_palette[
index];
1310 draw_points[0].
X = fill_area->
X;
1311 draw_points[0].
Y = fill_area->
Y;
1312 draw_points[1].
X = fill_area->
X+1;
1313 draw_points[1].
Y = fill_area->
Y;
1314 draw_points[2].
X = fill_area->
X;
1315 draw_points[2].
Y = fill_area->
Y+1;
1334 REAL x_delta = draw_points[1].
X - draw_points[0].
X;
1335 REAL y_delta = draw_points[2].
X - draw_points[0].
X;
1341 REAL pos = draw_points[0].
X +
x * x_delta +
y * y_delta;
1362 FIXME(
"metafile texture brushes not implemented\n");
1369 src_area.
X = src_area.
Y = 0;
1373 draw_points[0].
X = fill_area->
X;
1374 draw_points[0].
Y = fill_area->
Y;
1375 draw_points[1].
X = fill_area->
X+1;
1376 draw_points[1].
Y = fill_area->
Y;
1377 draw_points[2].
X = fill_area->
X;
1378 draw_points[2].
Y = fill_area->
Y+1;
1398 if (!
fill->bitmap_bits)
1405 lockeddata.
Stride = src_stride;
1430 REAL x_dx = draw_points[1].
X - draw_points[0].
X;
1431 REAL x_dy = draw_points[1].
Y - draw_points[0].
Y;
1432 REAL y_dx = draw_points[2].
X - draw_points[0].
X;
1433 REAL y_dy = draw_points[2].
Y - draw_points[0].
Y;
1440 point.X = draw_points[0].
X +
x * x_dx +
y * y_dx;
1441 point.Y = draw_points[0].
Y +
x * x_dy +
y * y_dy;
1459 int i, figure_start=0;
1460 GpPointF start_point, end_point, center_point;
1462 REAL min_yf, max_yf, line1_xf, line2_xf;
1463 INT min_y, max_y, min_x, max_x;
1466 static BOOL transform_fixme_once;
1468 if (
fill->focus.X != 0.0 ||
fill->focus.Y != 0.0)
1472 FIXME(
"path gradient focus not implemented\n");
1479 FIXME(
"path gradient gamma correction not implemented\n");
1482 if (
fill->blendcount)
1486 FIXME(
"path gradient blend not implemented\n");
1489 if (
fill->pblendcount)
1493 FIXME(
"path gradient preset blend not implemented\n");
1496 if (!transform_fixme_once)
1502 FIXME(
"path gradient transform not implemented\n");
1503 transform_fixme_once =
TRUE;
1520 center_point =
fill->center;
1536 int start_center_line=0, end_center_line=0;
1538 REAL center_distance;
1539 ARGB start_color, end_color;
1549 start_color =
fill->surroundcolors[
min(
i,
fill->surroundcolorcount-1)];
1554 end_color =
fill->surroundcolors[
min(figure_start,
fill->surroundcolorcount-1)];
1559 end_color =
fill->surroundcolors[
min(
i+1,
fill->surroundcolorcount-1)];
1564 outer_color = start_color;
1566 min_yf = center_point.
Y;
1567 if (min_yf > start_point.
Y) min_yf = start_point.
Y;
1568 if (min_yf > end_point.
Y) min_yf = end_point.
Y;
1570 if (min_yf < fill_area->
Y)
1571 min_y = fill_area->
Y;
1575 max_yf = center_point.
Y;
1576 if (max_yf < start_point.
Y) max_yf = start_point.
Y;
1577 if (max_yf < end_point.
Y) max_yf = end_point.
Y;
1579 if (max_yf > fill_area->
Y + fill_area->
Height)
1580 max_y = fill_area->
Y + fill_area->
Height;
1584 dy = end_point.
Y - start_point.
Y;
1585 dx = end_point.
X - start_point.
X;
1588 center_distance =
dy * (start_point.
X - center_point.
X) +
1589 dx * (center_point.
Y - start_point.
Y);
1591 for (
y=min_y;
y<max_y;
y++)
1595 if (!seen_start && yf >= start_point.
Y)
1598 start_center_line ^= 1;
1600 if (!seen_end && yf >= end_point.
Y)
1603 end_center_line ^= 1;
1605 if (!seen_center && yf >= center_point.
Y)
1608 start_center_line ^= 1;
1609 end_center_line ^= 1;
1612 if (start_center_line)
1617 if (end_center_line)
1622 if (line1_xf < line2_xf)
1633 if (min_x < fill_area->
X)
1634 min_x = fill_area->
X;
1635 if (max_x > fill_area->
X + fill_area->
Width)
1636 max_x = fill_area->
X + fill_area->
Width;
1638 for (
x=min_x;
x<max_x;
x++)
1643 if (start_color != end_color)
1645 REAL blend_amount, pdy, pdx;
1646 pdy = yf - center_point.
Y;
1647 pdx = xf - center_point.
X;
1649 if (
fabs(pdx) <= 0.001 &&
fabs(pdy) <= 0.001)
1652 outer_color = start_color;
1656 blend_amount = ( (center_point.
Y - start_point.
Y) * pdx + (start_point.
X - center_point.
X) * pdy ) / (
dy * pdx -
dx * pdy );
1657 outer_color =
blend_colors(start_color, end_color, blend_amount);
1661 distance = (end_point.
Y - start_point.
Y) * (start_point.
X - xf) +
1662 (end_point.
X - start_point.
X) * (yf - start_point.
Y);
1666 argb_pixels[(
x-fill_area->
X) + (
y-fill_area->
Y)*cdwStride] =
1689 HBRUSH brush =
NULL;
1694 REAL theta, dsmall, dbig,
dx,
dy = 0.0;
1735 ptf[0].
X =
x2 - dsmall;
1736 ptf[1].
X =
x2 + dbig;
1738 ptf[0].
Y =
y2 - dbig;
1739 ptf[3].
Y =
y2 + dsmall;
1741 ptf[1].
Y =
y2 - dsmall;
1742 ptf[2].
Y =
y2 + dbig;
1744 ptf[3].
X =
x2 - dbig;
1745 ptf[2].
X =
x2 + dsmall;
1857 if(!custptf || !custpt || !
tp)
1916 dx =
cos(theta) * dist;
1917 dy =
sin(theta) * dist;
1932 if(
dx == 0 &&
dy == 0)
1955 REAL percent = 0.00,
dx,
dy, origx, origy, diff = -1.0;
1956 INT i,
first = 0, second = 1, third = 2, fourth = 3;
1965 origx =
pt[fourth].X;
1966 origy =
pt[fourth].Y;
1980 dx =
pt[fourth].X - origx;
1981 dy =
pt[fourth].Y - origy;
1984 percent += 0.0005 * amt;
2003 if(!pti || !
tp || !ptcopy){
2012 ERR(
"Bad bezier points\n");
2054 ERR(
"Bad path last point\n");
2071 pt[
j - 1].X - (ptcopy[
j - 1].
X - ptcopy[
j].
X),
2072 pt[
j - 1].Y - (ptcopy[
j - 1].
Y - ptcopy[
j].
Y),
2073 pt[
j - 1].X,
pt[
j - 1].Y);
2079 &ptcopy[
j - 1].
X, &ptcopy[
j - 1].
Y,
2083 &ptcopy[
j - 1].
X, &ptcopy[
j - 1].
Y,
2092 ERR(
"Bad path points\n");
2174 (*container)->contid = graphics->contid + 1;
2175 (*container)->type =
type;
2177 (*container)->smoothing = graphics->smoothing;
2178 (*container)->compqual = graphics->compqual;
2179 (*container)->interpolation = graphics->interpolation;
2180 (*container)->compmode = graphics->compmode;
2181 (*container)->texthint = graphics->texthint;
2182 (*container)->scale = graphics->scale;
2183 (*container)->unit = graphics->unit;
2184 (*container)->textcontrast = graphics->textcontrast;
2185 (*container)->pixeloffset = graphics->pixeloffset;
2186 (*container)->origin_x = graphics->origin_x;
2187 (*container)->origin_y = graphics->origin_y;
2188 (*container)->worldtrans = graphics->worldtrans;
2212 if(sts !=
Ok)
return sts;
2217 graphics->
clip = newClip;
2242 if(graphics->
hwnd) {
2250 }
else if (graphics->
image){
2253 FIXME(
"need to convert from unit %i\n",
unit);
2299 min_point = max_point =
points[0];
2309 rect->X = min_point.
X;
2310 rect->Y = min_point.
Y;
2311 rect->Width = max_point.
X - min_point.
X;
2312 rect->Height = max_point.
Y - min_point.
Y;
2370 lf->
lfItalic =
font->otm.otmTextMetrics.tmItalic ? 1 : 0;
2386 REAL angle, rel_width, rel_height, font_height;
2388 HFONT unscaled_font;
2392 font_height =
font->emSize;
2400 font_height =
font->emSize * unit_scale;
2407 rel_width /= graphics->
scale;
2408 rel_height /= graphics->
scale;
2432 TRACE(
"(%p, %p)\n",
hdc, graphics);
2457 TRACE(
"(%p, %p, %p)\n",
hdc, hDevice, graphics);
2460 FIXME(
"Don't know how to handle parameter hDevice\n");
2465 if(graphics ==
NULL)
2482 (*graphics)->alpha_hdc = 1;
2485 (*graphics)->hdc =
hdc;
2487 (*graphics)->owndc =
FALSE;
2494 (*graphics)->scale = 1.0;
2497 (*graphics)->busy =
FALSE;
2498 (*graphics)->textcontrast = 4;
2500 (*graphics)->contid = 0;
2508 (*graphics)->gdi_clip =
NULL;
2511 TRACE(
"<-- %p\n", *graphics);
2531 (*graphics)->hdc =
NULL;
2532 (*graphics)->hwnd =
NULL;
2533 (*graphics)->owndc =
FALSE;
2534 (*graphics)->image =
image;
2537 (*graphics)->image_type =
image->type;
2544 (*graphics)->scale = 1.0;
2545 (*graphics)->xres =
image->xres;
2546 (*graphics)->yres =
image->yres;
2547 (*graphics)->busy =
FALSE;
2548 (*graphics)->textcontrast = 4;
2550 (*graphics)->contid = 0;
2552 TRACE(
"<-- %p\n", *graphics);
2572 (*graphics)->hwnd =
hwnd;
2573 (*graphics)->owndc =
TRUE;
2576 (*graphics)->hdc =
NULL;
2616 TRACE(
"(%p)\n", graphics);
2632 if (graphics->
owndc)
2665 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
2668 if(!graphics || !pen ||
width <= 0 ||
height <= 0)
2694 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n", graphics, pen,
x,
y,
2705 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x1,
y1,
2708 if(!graphics || !pen)
2728 TRACE(
"(%p, %p, %d, %d, %d, %d, %d, %d, %d, %d)\n", graphics, pen,
x1,
y1,
2904 if(!graphics || !pen)
2955 TRACE(
"(%p, %p, %p, %d, %d, %d, %.2f)\n", graphics, pen,
points,
count,
offset, numberOfSegments, tension);
2968 TRACE(
"(%p, %p, %p, %d, %d, %d, %.2f)\n", graphics, pen,
points,
count,
offset, numberOfSegments, tension);
2988 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
width,
height);
2990 if(!graphics || !pen)
3016 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x,
y,
width,
height);
3026 TRACE(
"(%p, %p, %.2f, %.2f)\n", graphics,
image,
x,
y);
3028 if(!graphics || !
image)
3046 TRACE(
"(%p, %p, %p, %p, %p, %p, %d)\n", graphics,
image, src_rect,
transform, effect, imageattr, src_unit);
3048 if (!graphics || !
image)
3052 FIXME(
"effect not implemented\n");
3060 if (src_rect_buf.
X != 0.0 || src_rect_buf.
Y != 0.0)
3066 src_rect = &src_rect_buf;
3078 src_rect->
X, src_rect->
Y,
3098 TRACE(
"(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics,
image,
x,
y, srcx, srcy, srcwidth, srcheight, srcUnit);
3103 scale_x *= graphics->
xres /
image->xres;
3105 scale_y *= graphics->
yres /
image->yres;
3106 width = srcwidth * scale_x;
3107 height = srcheight * scale_y;
3149 if (
count != 3 || !dstpoints)
3152 ptf[0].
X = (
REAL)dstpoints[0].
X;
3153 ptf[0].
Y = (
REAL)dstpoints[0].
Y;
3154 ptf[1].
X = (
REAL)dstpoints[1].
X;
3155 ptf[1].
Y = (
REAL)dstpoints[1].
Y;
3156 ptf[2].
X = (
REAL)dstpoints[2].
X;
3157 ptf[2].
Y = (
REAL)dstpoints[2].
Y;
3163 unsigned int dataSize,
const unsigned char *pStr,
void *userdata)
3178 TRACE(
"(%p, %p, %p, %d, %f, %f, %f, %f, %d, %p, %p, %p)\n", graphics,
image,
points,
3179 count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes,
callback,
3195 srcUnit, imageAttributes,
callback, callbackData);
3204 srcx = srcx + srcwidth;
3205 srcwidth = -srcwidth;
3206 ptf[2].
X = ptf[2].
X + ptf[1].
X - ptf[0].
X;
3207 ptf[2].
Y = ptf[2].
Y + ptf[1].
Y - ptf[0].
Y;
3215 srcy = srcy + srcheight;
3216 srcheight = -srcheight;
3217 ptf[1].
X = ptf[1].
X + ptf[2].
X - ptf[0].
X;
3218 ptf[1].
Y = ptf[1].
Y + ptf[2].
Y - ptf[0].
Y;
3223 ptf[3].
X = ptf[2].
X + ptf[1].
X - ptf[0].
X;
3224 ptf[3].
Y = ptf[2].
Y + ptf[1].
Y - ptf[0].
Y;
3225 if (!srcwidth || !srcheight || (ptf[3].
X == ptf[0].
X && ptf[3].
Y == ptf[0].
Y))
3237 TRACE(
"src pixels: %f,%f %fx%f\n", srcx, srcy, srcwidth, srcheight);
3245 TRACE(
"graphics: %.2fx%.2f dpi, fmt %#x, scale %f, image: %.2fx%.2f dpi, fmt %#x, color %08lx\n",
3249 imageAttributes ? imageAttributes->outside_color : 0);
3251 if (ptf[1].
Y != ptf[0].
Y || ptf[2].
X != ptf[0].
X ||
3252 ptf[1].
X - ptf[0].
X != srcwidth || ptf[2].
Y - ptf[0].
Y != srcheight ||
3253 srcx < 0 || srcy < 0 ||
3255 do_resampling =
TRUE;
3257 if (imageAttributes || graphics->
alpha_hdc || do_resampling ||
3259 use_software =
TRUE;
3266 int i,
x,
y, src_stride, dst_stride;
3267 LPBYTE src_data, dst_data, dst_dyn_data=
NULL;
3273 if (!imageAttributes)
3274 imageAttributes = &defaultImageAttributes;
3280 if (dst_area.
left > pti[
i].
x) dst_area.
left = pti[
i].
x;
3282 if (dst_area.
top > pti[
i].
y) dst_area.
top = pti[
i].
y;
3301 bitmap, srcx, srcy, srcwidth, srcheight, &src_area);
3306 src_area.
X = srcx + dst_area.
left - pti[0].
x;
3307 src_area.
Y = srcy + dst_area.
top - pti[0].
y;
3317 src_stride =
sizeof(
ARGB) * src_area.
Width;
3322 lockeddata.
Stride = src_stride;
3323 lockeddata.
Scan0 = src_data;
3349 REAL x_dx, x_dy, y_dx, y_dy;
3351 GpPointF src_pointf_row, src_pointf;
3353 m11 = (ptf[1].
X - ptf[0].
X) / srcwidth;
3354 m12 = (ptf[1].
Y - ptf[0].
Y) / srcwidth;
3355 m21 = (ptf[2].
X - ptf[0].
X) / srcheight;
3356 m22 = (ptf[2].
Y - ptf[0].
Y) / srcheight;
3357 mdx = ptf[0].
X -
m11 * srcx -
m21 * srcy;
3358 mdy = ptf[0].
Y -
m12 * srcx -
m22 * srcy;
3365 dst_stride =
sizeof(
ARGB) * (dst_area.
right - dst_area.
left);
3366 x_dx = dst_to_src.
matrix[0];
3367 x_dy = dst_to_src.
matrix[1];
3368 y_dx = dst_to_src.
matrix[2];
3369 y_dy = dst_to_src.
matrix[3];
3378 dst_color = (
ARGB*)(dst_data);
3382 src_pointf_row.
X = dst_to_src.
matrix[4] +
3383 dst_area.
left * x_dx + dst_area.
top * y_dx;
3384 src_pointf_row.
Y = dst_to_src.
matrix[5] +
3385 dst_area.
left * x_dy + dst_area.
top * y_dy;
3388 y++, src_pointf_row.
X += y_dx, src_pointf_row.
Y += y_dy)
3390 for (
x = dst_area.
left, src_pointf = src_pointf_row;
x < dst_area.
right;
3391 x++, src_pointf.
X += x_dx, src_pointf.
Y += x_dy)
3393 if (src_pointf.
X >= srcx && src_pointf.
X < srcx + srcwidth &&
3394 src_pointf.
Y >= srcy && src_pointf.
Y < srcy + srcheight)
3396 imageAttributes, interpolation, offset_mode);
3403 dst_data = src_data;
3404 dst_stride = src_stride;
3410 dst_data, dst_area.
right - dst_area.
left, dst_area.
bottom - dst_area.
top, dst_stride,
3423 HDC src_hdc, dst_hdc;
3455 (
void**)&temp_bits,
NULL, 0);
3468 save_state =
SaveDC(dst_hdc);
3483 src_hdc, srcx, srcy, srcwidth, srcheight);
3487 StretchBlt(dst_hdc, pti[0].
x, pti[0].
y, pti[1].
x-pti[0].
x, pti[2].
y-pti[0].
y,
3488 src_hdc, srcx, srcy, srcwidth, srcheight,
SRCCOPY);
3506 set_rect(&rc, srcx, srcy, srcwidth, srcheight);
3512 WARN(
"GpImage with nothing we can draw (metafile in wrong state?)\n");
3527 TRACE(
"(%p, %p, %p, %d, %d, %d, %d, %d, %d, %p, %p, %p)\n", graphics,
image,
points,
count,
3528 srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes,
callback,
3543 (
REAL)srcwidth, (
REAL)srcheight, srcUnit, imageAttributes,
3551 VOID * callbackData)
3555 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, %d, %p, %p, %p)\n",
3556 graphics,
image, dstx, dsty, dstwidth, dstheight, srcx, srcy,
3557 srcwidth, srcheight, srcUnit, imageattr,
callback, callbackData);
3561 points[1].X = dstx + dstwidth;
3564 points[2].Y = dsty + dstheight;
3567 srcwidth, srcheight, srcUnit, imageattr,
callback, callbackData);
3574 VOID * callbackData)
3578 TRACE(
"(%p, %p, %d, %d, %d, %d, %d, %d, %d, %d, %d, %p, %p, %p)\n",
3579 graphics,
image, dstx, dsty, dstwidth, dstheight, srcx, srcy,
3580 srcwidth, srcheight, srcUnit, imageAttributes,
callback, callbackData);
3584 points[1].X = dstx + dstwidth;
3587 points[2].Y = dsty + dstheight;
3590 srcwidth, srcheight, srcUnit, imageAttributes,
callback, callbackData);
3600 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics,
image,
x,
y,
width,
height);
3602 if(!graphics || !
image)
3617 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics,
image,
x,
y,
width,
height);
3627 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x1,
y1,
x2,
y2);
3645 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x1,
y1,
x2,
y2);
3658 if(!pen || !graphics || (
count < 2))
3736 GpPath *flat_path, *anchor_path;
3742 INT output_height, output_width;
3745 static const BYTE static_dash_pattern[] = {1,1,1,0,1,0,1,0};
3746 const BYTE *dash_pattern;
3747 INT dash_pattern_size;
3813 output_width = output_area.
right - output_area.
left + 1;
3814 output_height = output_area.
bottom - output_area.
top + 1;
3816 if (output_width <= 0 || output_height <= 0)
3823 gp_output_area.
X = output_area.
left;
3824 gp_output_area.
Y = output_area.
top;
3825 gp_output_area.
Width = output_width;
3826 gp_output_area.
Height = output_height;
3828 output_bits =
calloc(output_width * output_height,
sizeof(
DWORD));
3838 brush_bits =
calloc(output_width * output_height,
sizeof(
DWORD));
3843 &gp_output_area, output_width);
3856 dash_pattern_size = 0;
3861 if (dash_pattern_size != 0)
3863 dash_pattern = dyn_dash_pattern =
malloc(dash_pattern_size);
3865 if (dyn_dash_pattern)
3872 dyn_dash_pattern[
j++] = (
i&1)^1;
3884 dash_pattern = static_dash_pattern;
3885 dash_pattern_size = 1;
3888 dash_pattern = static_dash_pattern;
3889 dash_pattern_size = 4;
3892 dash_pattern = &static_dash_pattern[4];
3893 dash_pattern_size = 2;
3896 dash_pattern = static_dash_pattern;
3897 dash_pattern_size = 6;
3900 dash_pattern = static_dash_pattern;
3901 dash_pattern_size = 8;
3911 int dash_pos = dash_pattern_size - 1;
3917 GpPoint start_pointi, end_pointi;
3928 subpath_start = start_point;
3931 end_point = subpath_start;
3937 start_pointi.
X =
floorf(start_point.
X);
3938 start_pointi.
Y =
floorf(start_point.
Y);
3939 end_pointi.
X =
floorf(end_point.
X);
3940 end_pointi.
Y =
floorf(end_point.
Y);
3942 if(start_pointi.
X == end_pointi.
X && start_pointi.
Y == end_pointi.
Y)
3946 if (
abs(start_pointi.
Y - end_pointi.
Y) >
abs(start_pointi.
X - end_pointi.
X))
3950 if (start_pointi.
Y < end_pointi.
Y)
3966 (end_point.
X - start_point.
X) * (
y + output_area.
top - start_point.
Y) / (end_point.
Y - start_point.
Y) )
3969 if (
x == prev_x &&
y == prev_y)
3974 dash_pos = (dash_pos + 1 == dash_pattern_size) ? 0 : dash_pos + 1;
3976 if (!dash_pattern[dash_pos])
3979 if (x < 0 || x >= output_width || y < 0 || y >= output_height)
3983 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
3992 if (start_pointi.
X < end_pointi.
X)
4008 (end_point.
Y - start_point.
Y) * (
x + output_area.
left - start_point.
X) / (end_point.
X - start_point.
X) )
4011 if (
x == prev_x &&
y == prev_y)
4016 dash_pos = (dash_pos + 1 == dash_pattern_size) ? 0 : dash_pos + 1;
4018 if (!dash_pattern[dash_pos])
4021 if (x < 0 || x >= output_width || y < 0 || y >= output_height)
4025 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
4037 DWORD rgn_data_size;
4053 rgn_data =
malloc(rgn_data_size);
4073 output_bits[
x +
y*output_width] = brush_bits[
x +
y*output_width];
4099 (
BYTE*)output_bits, output_width, output_height, output_width * 4,
4106 free(dyn_dash_pattern);
4126 if (pen->
width < 1.415)
4175 t.matrix[0] *
t.matrix[0] +
t.matrix[1] *
t.matrix[1],
4176 t.matrix[2] *
t.matrix[2] +
t.matrix[3] *
t.matrix[3]));
4207 TRACE(
"(%p, %p, %p)\n", graphics, pen,
path);
4209 if(!pen || !graphics)
4215 if (
path->pathdata.Count == 0)
4234 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
4237 if(!graphics || !pen)
4257 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n", graphics, pen,
x,
y,
4268 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen,
x,
y,
width,
height);
4277 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, pen,
x,
y,
width,
height);
4288 TRACE(
"(%p, %p, %p, %d)\n", graphics, pen, rects,
count);
4290 if(!graphics || !pen || !rects ||
count < 1)
4317 TRACE(
"(%p, %p, %p, %d)\n", graphics, pen, rects,
count);
4319 if(!rects ||
count<=0)
4341 TRACE(
"(%p, %p, %p, %d, %.2f, %d)\n", graphics, brush,
points,
4344 if(!graphics || !brush || !
points)
4371 TRACE(
"(%p, %p, %p, %d, %.2f, %d)\n", graphics, brush,
points,
4419 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush,
x,
y,
width,
height);
4421 if(!graphics || !brush)
4451 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, brush,
x,
y,
width,
height);
4529 TRACE(
"(%p, %p, %p)\n", graphics, brush,
path);
4531 if(!brush || !graphics || !
path)
4537 if (!
path->pathdata.Count)
4551 FIXME(
"Not implemented for brushtype %i\n", brush->
bt);
4565 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n",
4566 graphics, brush,
x,
y,
width,
height, startAngle, sweepAngle);
4568 if(!graphics || !brush)
4598 TRACE(
"(%p, %p, %d, %d, %d, %d, %.2f, %.2f)\n",
4599 graphics, brush,
x,
y,
width,
height, startAngle, sweepAngle);
4683 TRACE(
"(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush,
x,
y,
width,
height);
4694 TRACE(
"(%p, %p, %d, %d, %d, %d)\n", graphics, brush,
x,
y,
width,
height);
4706 TRACE(
"(%p, %p, %p, %d)\n", graphics, brush, rects,
count);
4708 if(!graphics || !brush || !rects ||
count <= 0)
4736 TRACE(
"(%p, %p, %p, %d)\n", graphics, brush, rects,
count);
4738 if(!rects ||
count <= 0)
4853 gp_bound_rect.
X = bound_rect.
left;
4854 gp_bound_rect.
Y = bound_rect.
top;
4858 pixel_data =
calloc(gp_bound_rect.
Width * gp_bound_rect.
Height,
sizeof(*pixel_data));
4865 &gp_bound_rect, gp_bound_rect.
Width);
4869 gp_bound_rect.
Y, (
BYTE*)pixel_data, gp_bound_rect.
Width,
4870 gp_bound_rect.
Height, gp_bound_rect.
Width * 4, hregion,
4894 if (!(graphics && brush &&
region))
4913 FIXME(
"not implemented for brushtype %i\n", brush->
bt);
4922 TRACE(
"(%p,%u)\n", graphics, intention);
4994 if(!graphics || !
mode)
5028 if(!graphics || !
mode)
5042 TRACE(
"(%p, %p)\n", graphics, argb);
5044 if(!graphics || !argb)
5055 FIXME(
"(%p, %p): Passing color unmodified\n", graphics, argb);
5065 if(!graphics || !
scale)
5080 if(!graphics || !
unit)
5097 if(!graphics || !
mode)
5113 if(!graphics || !
mode)
5126 TRACE(
"(%p, %p)\n", graphics, contrast);
5128 if(!graphics || !contrast)
5142 if(!graphics || !
hint)
5161 if(!graphics || !
rect)
5197 if(!graphics || !
rect)
5264 TRACE(
"(%p, %p)\n", graphics,
res);
5266 if(!graphics || !
res)
5333 pts[1].
X -= pts[0].
X;
5334 pts[1].
Y -= pts[0].
Y;
5357 IMLangFontLink *iMLFL;
5359 HFONT map_hfont,
hfont, old_font;
5362 DWORD string_codepages;
5363 WORD *glyph_indices;
5367 info->font_link_info.base_font = base_font;
5369 glyph_indices =
calloc(
length,
sizeof(*glyph_indices));
5387 if (glyph_indices[
progress] != 0xffff)
5399 hr = IMLangFontLink_MapFont(iMLFL,
info->hdc, string_codepages,
hfont, &map_hfont);
5405 IMLangFontLink_ReleaseFont(iMLFL, map_hfont);
5418 IMLangFontLink_Release(iMLFL);
5419 free(glyph_indices);
5425 DWORD to_measure_length;
5426 HFONT
hfont, oldhfont;
5427 SIZE sizeaux = { 0 };
5428 int i =
index, fitaux = 0;
5449 max_ext -= sizeaux.
cx;
5455 i += to_measure_length;
5456 if ((
i -
index) >=
length || fitaux < to_measure_length)
break;
5480 int sum = 0,
height = 0, fit, fitcpy,
i,
j, lret, nwidth,
5481 nheight, lineend, lineno = 0;
5487 INT *hotkeyprefix_offsets=
NULL;
5488 INT hotkeyprefix_count=0;
5489 INT hotkeyprefix_pos=0, hotkeyprefix_end_pos=0;
5504 info.string = stringdup;
5511 nwidth = (
int)(
rect->Width + 0.005f);
5512 nheight = (
int)(
rect->Height + 0.005f);
5513 if (ignore_empty_clip)
5515 if (!nwidth) nwidth =
INT_MAX;
5516 if (!nheight) nheight =
INT_MAX;
5519 hkprefix =
format->hkprefix;
5525 if (
string[
i] ==
'&')
5526 hotkeyprefix_count++;
5530 if (hotkeyprefix_count)
5532 hotkeyprefix_offsets =
calloc(hotkeyprefix_count,
sizeof(
INT));
5533 if (!hotkeyprefix_offsets)
5540 hotkeyprefix_count = 0;
5545 if (
string[
i] ==
'\t')
5549 hotkeyprefix_offsets[hotkeyprefix_count++] =
j;
5556 seen_prefix =
FALSE;
5558 stringdup[
j] =
string[
i];
5575 for(lret = 0; lret < fit; lret++) {
5576 if(*(stringdup +
sum + lret) ==
'\n')
5578 unixstyle_newline =
TRUE;
5582 if(*(stringdup +
sum + lret) ==
'\r' && lret + 1 < fit
5583 && *(stringdup +
sum + lret + 1) ==
'\n')
5585 unixstyle_newline =
FALSE;
5592 lineend = fit = lret;
5594 if(*(stringdup +
sum + fit) ==
' ')
5595 while(*(stringdup +
sum + fit) ==
' ')
5598 while(*(stringdup +
sum + fit - 1) !=
' '){
5601 if(*(stringdup +
sum + fit) ==
'\t')
5610 while(*(stringdup +
sum + lineend - 1) ==
' ' ||
5611 *(stringdup +
sum + lineend - 1) ==
'\t')
5646 for (hotkeyprefix_end_pos=hotkeyprefix_pos; hotkeyprefix_end_pos<hotkeyprefix_count; hotkeyprefix_end_pos++)
5647 if (hotkeyprefix_offsets[hotkeyprefix_end_pos] >=
sum + lineend)
5651 info.length = lineend;
5653 info.underlined_indexes = &hotkeyprefix_offsets[hotkeyprefix_pos];
5654 info.underlined_index_count = hotkeyprefix_end_pos-hotkeyprefix_pos;
5662 if (unixstyle_newline)
5666 sum += fit + (lret < fitcpy ? 1 : 0);
5672 sum += fit + (lret < fitcpy ? 2 : 0);
5675 hotkeyprefix_pos = hotkeyprefix_end_pos;
5687 free(hotkeyprefix_offsets);
5695 GpPointF pt[3] = {{0.0f, 0.0f}, {1.0f, 0.0f}, {0.0f, 1.0f}};
5704 if (graphics_transform)
5727 for (
i=0;
i <
info->format->range_count;
i++)
5731 if (range_start < range_end)
5736 range_rect.
Y =
info->bounds->Y /
args->rel_height;
5740 range_rect.
X = (
info->bounds->X + range_size.
cx) /
args->rel_width;
5743 range_rect.
Width = (
info->bounds->X + range_size.
cx) /
args->rel_width - range_rect.
X;
5761 HFONT gdifont, oldfont;
5773 if (regionCount < stringFormat->range_count)
5795 scaled_rect.
X = (layoutRect->X + margin_x) *
args.rel_width;
5796 scaled_rect.
Y = layoutRect->Y *
args.rel_height;
5797 scaled_rect.
Width = layoutRect->Width *
args.rel_width;
5798 scaled_rect.
Height = layoutRect->Height *
args.rel_height;
5800 if (scaled_rect.
Width >= 1 << 23) scaled_rect.
Width = 1 << 23;
5801 if (scaled_rect.
Height >= 1 << 23) scaled_rect.
Height = 1 << 23;
5850 REAL new_width, new_height;
5852 new_width =
info->bounds->Width /
args->rel_width;
5861 if (
args->codepointsfitted)
5864 if (
args->linesfilled)
5865 (*
args->linesfilled)++;
5892 HFONT oldfont, gdifont;
5899 TRACE(
"(%p, %s, %i, %p, %s, %p, %p, %p, %p)\n", graphics,
5922 TRACE(
"may be ignoring some format flags: attr %x\n",
format->attr);
5925 margin_x = (
format &&
format->generic_typographic) ? 0.0 :
font->emSize / 6.0;
5928 scaled_rect.
X = (
rect->X + margin_x) *
args.rel_width;
5929 scaled_rect.
Y =
rect->Y *
args.rel_height;
5934 scaled_rect.
Width -= margin_x * 2.0 *
args.rel_width;
5935 if (scaled_rect.
Width < 0.5)
5939 if (scaled_rect.
Width >= 1 << 23) scaled_rect.
Width = 1 << 23;
5940 if (scaled_rect.
Height >= 1 << 23) scaled_rect.
Height = 1 << 23;
5948 args.codepointsfitted = &glyphs;
5987 DWORD to_draw_length;
5999 TRACE(
"index %d, todraw %ld, used %s\n",
i, to_draw_length,
section->font ==
info->font_link_info.base_font ?
"base font" :
"map");
6004 position.
X +=
size.cx /
args->rel_width;
6005 i += to_draw_length;
6009 if (
stat ==
Ok &&
info->underlined_index_count)
6012 REAL underline_y, underline_height;
6020 for (
i=0;
i<
info->underlined_index_count;
i++)
6048 REAL rel_width, rel_height, margin_x;
6049 INT save_state, format_flags = 0;
6056 TRACE(
"(%p, %s, %i, %p, %s, %p, %p)\n", graphics,
debugstr_wn(
string,
length),
6077 TRACE(
"may be ignoring some format flags: attr %x\n",
format->attr);
6079 format_flags =
format->attr;
6091 offsety = (
rect->Height - bounds.
Height) / 2;
6095 TRACE(
"line align %d, offsety %f\n",
format->line_align, offsety);
6101 rectcpy[3].
X = rectcpy[0].
X =
rect->X;
6102 rectcpy[1].
Y = rectcpy[0].
Y =
rect->Y;
6103 rectcpy[2].
X = rectcpy[1].
X =
rect->X +
rect->Width;
6104 rectcpy[3].
Y = rectcpy[2].
Y =
rect->Y +
rect->Height;
6108 margin_x = (
format &&
format->generic_typographic) ? 0.0 :
font->emSize / 6.0;
6112 scaled_rect.Y = 0.0;
6115 if (scaled_rect.Width >= 0.5)
6117 scaled_rect.Width -= margin_x * 2.0 *
rel_width;
6118 if (scaled_rect.Width < 0.5)
6122 if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23;
6123 if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23;
6126 scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23 &&
6127 rect->Width > 0.0 &&
rect->Height > 0.0)
6172 TRACE(
"(%p)\n", graphics);
6194 TRACE(
"(%p)\n", graphics);
6243 if(!graphics || !
state)
6282 REAL scale_x, scale_y;
6286 if(!graphics || !dstrect || !srcrect || unit < UnitPixel || unit >
UnitMillimeter || !
state)
6299 scaled_srcrect.
X = scale_x * srcrect->X;
6300 scaled_srcrect.
Y = scale_y * srcrect->Y;
6301 scaled_srcrect.
Width = scale_x * srcrect->Width;
6302 scaled_srcrect.
Height = scale_y * srcrect->Height;
6308 transform.matrix[4] = dstrect->X - scaled_srcrect.
X;
6309 transform.matrix[5] = dstrect->Y - scaled_srcrect.
Y;
6323 TRACE(
"(%p, %p, %p, %d, %p)\n", graphics, dstrect, srcrect,
unit,
state);
6325 if (!dstrect || !srcrect)
6328 dstrectf.
X = dstrect->X;
6329 dstrectf.
Y = dstrect->Y;
6330 dstrectf.
Width = dstrect->Width;
6331 dstrectf.
Height = dstrect->Height;
6333 srcrectf.
X = srcrect->X;
6334 srcrectf.
Y = srcrect->Y;
6335 srcrectf.
Width = srcrect->Width;
6336 srcrectf.
Height = srcrect->Height;
6343 FIXME(
"(%p, %d, %p): stub\n", graphics, sizeData,
data);
6407 TRACE(
"(%p, %.2f, %.2f, %d)\n", graphics, sx, sy,
order);
6428 TRACE(
"(%p, %p, %d)\n", graphics, srcgraphics,
mode);
6430 if(!graphics || !srcgraphics)
6616 TRACE(
"(%p,%i,%i)\n", graphics,
x,
y);
6639 TRACE(
"(%p,%p,%p)\n", graphics,
x,
y);
6641 if (!graphics || !
x || !
y)
6682 TRACE(
"(%p, %d)\n", graphics, contrast);
6846 TRACE(
"(%p, %.2f, %.2f, %.2f, %.2f, %d)\n", graphics,
x,
y,
width,
height,
mode);
6884 TRACE(
"(%p, %d, %d, %d, %d, %d)\n", graphics,
x,
y,
width,
height,
mode);
6942 if(!graphics || !pen ||
count<=0)
6986 TRACE(
"(%p, %p)\n", graphics,
dpi);
6988 if(!graphics || !
dpi)
7000 TRACE(
"(%p, %p)\n", graphics,
dpi);
7002 if(!graphics || !
dpi)
7050 TRACE(
"(%p, %p)\n", graphics,
hdc);
7052 if(!graphics || !
hdc)
7062 else if (graphics->
owndc)
7069 else if (!graphics->
hdc ||
7086 bmih.
biSize =
sizeof(bmih);
7141 TRACE(
"(%p, %p)\n", graphics,
hdc);
7143 if(!graphics || !
hdc || !graphics->
busy)
7150 else if (graphics->
owndc)
7180 else if (
hdc != graphics->
hdc)
7250 ERR(
"called without matching gdi_transform_acquire\n");
7266 REAL scale_x, scale_y;
7270 if (dst_space != src_space)
7283 if (dst_space < src_space)
7286 switch ((
int)src_space)
7317 switch ((
int)src_space)
7362 TRACE(
"(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space,
points,
count);
7364 if (src_space == dst_space)
return Ok;
7376 TRACE(
"(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space,
points,
count);
7421 TRACE(
"(%p, %.2f, %.2f)\n", graphics,
dx,
dy);
7444 TRACE(
"(%p, %d, %d)\n", graphics,
dx,
dy);
7459 REAL min_x, min_y, max_x, max_y,
x,
y;
7462 const WORD *glyph_indices;
7469 if (!graphics || !
text || !
font || !positions || !boundingBox)
7476 set_rect(boundingBox, 0.0f, 0.0f, 0.0f, 0.0f);
7478 if (
flags & unsupported_flags)
7479 FIXME(
"Ignoring flags %x\n",
flags & unsupported_flags);
7516 glyph_indices =
text;
7518 min_x = max_x =
x = positions[0].X;
7519 min_y = max_y =
y = positions[0].Y;
7539 if (max_y <
y + descent) max_y =
y + descent;
7540 if (min_x >
x) min_x =
x;
7544 if (max_x <
x) max_x =
x;
7547 free(dynamic_glyph_indices);
7551 boundingBox->
X = min_x;
7552 boundingBox->
Y = min_y;
7553 boundingBox->
Width = max_x - min_x;
7554 boundingBox->
Height = max_y - min_y;
7575 eto_flags |= ETO_GLYPH_INDEX;
7579 real_positions =
malloc(
sizeof(*real_positions) *
length);
7580 eto_positions =
malloc(
sizeof(*eto_positions) * 2 * (
length - 1));
7581 if (!real_positions || !eto_positions)
7583 free(real_positions);
7584 free(eto_positions);
7592 free(real_positions);
7593 free(eto_positions);
7650 free(real_positions);
7651 free(eto_positions);
7665 PointF *real_positions, real_position;
7670 DWORD max_glyphsize=0;
7672 static const MAT2 identity = {{0,1}, {0,0}, {0,0}, {0,1}};
7675 int text_mask_stride;
7677 int pixel_data_stride;
7687 if (
flags & unsupported_flags)
7688 FIXME(
"Ignoring flags %x\n",
flags & unsupported_flags);
7696 real_position = positions[0];
7704 if (!real_positions)
7715 free(real_positions);
7734 ERR(
"GetGlyphOutlineW failed\n");
7741 if (glyphsize > max_glyphsize)
7742 max_glyphsize = glyphsize;
7752 if (
top < min_y) min_y =
top;
7764 if (max_glyphsize == 0)
7773 glyph_mask =
calloc(1, max_glyphsize);
7774 text_mask =
calloc(1, (max_x - min_x) * (max_y - min_y));
7775 text_mask_stride = max_x - min_x;
7777 if (!(glyph_mask && text_mask))
7794 &glyphmetrics, max_glyphsize, glyph_mask, &
identity);
7806 BYTE *text_val = text_mask + (
left - min_x) + (
top - min_y +
y) * text_mask_stride;
7809 *text_val =
min(64, *text_val + *glyph_val);
7822 pixel_data =
calloc((max_x - min_x) * (max_y - min_y), 4);
7829 pixel_area.
X = min_x;
7830 pixel_area.
Y = min_y;
7831 pixel_area.
Width = max_x - min_x;
7832 pixel_area.
Height = max_y - min_y;
7833 pixel_data_stride = pixel_area.
Width * 4;
7846 BYTE *text_val = text_mask + text_mask_stride *
y;
7847 BYTE *pixel_val = pixel_data + pixel_data_stride *
y + 3;
7850 *pixel_val = (*pixel_val) * (*text_val) / 64;
7921 TRACE(
"(%p, %p)\n", graphics,
res);
7940 TRACE(
"(%p)\n", graphics);
7955 graphics->
scale = 1.0;
7963 TRACE(
"(%p, %p)\n", graphics, pabort);
7969 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)
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT _Out_ UINT * Height
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT * Width
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(const WCHAR *path, DWORD mode, IStream **stream)
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)
static const char * debugstr_matrix(const DWRITE_MATRIX *m)
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)
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
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
midl_pragma custom(CUSTDATA_STRLIT,"ITypeLib2::GetCustData")
static HANDLE ACCESS_MASK ULONG attributes
png_const_structrp png_const_inforp int * unit
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
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)
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)
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)