winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
879 discussions
Start a n
N
ew thread
Nikolay Sivov : oleaut32/tests: Fix safearray leaks, test return value after array destruction.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: a5582d77cf4831aa7a9bc12262fd074886b7378f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a5582d77cf4831aa7a9bc1226…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jan 23 01:24:06 2011 +0300 oleaut32/tests: Fix safearray leaks, test return value after array destruction. --- dlls/oleaut32/tests/safearray.c | 87 +++++++++++++++++++++++++++----------- dlls/oleaut32/tests/tmarshal.c | 1 + dlls/oleaut32/tests/usrmarshal.c | 32 ++++++++++---- 3 files changed, 86 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a5582d77cf4831aa7a9bc…
1
0
0
0
Nikolay Sivov : shell32/tests: Fix couple PIDL leaks in tests.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 7ee7f0843bd1760bdc3df9312ccf26efa49b4cc4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ee7f0843bd1760bdc3df9312…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jan 22 03:43:59 2011 +0300 shell32/tests: Fix couple PIDL leaks in tests. --- dlls/shell32/tests/shlfolder.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index f2a1424..ea675b9 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -2784,9 +2784,10 @@ static void test_ShellItemCompare(void) hr = IShellFolder_BindToObject(psf_desktop, pidl_cwd, NULL, &IID_IShellFolder, (void**)&psf_current); ok(SUCCEEDED(hr), "BindToObject returned %x\n", hr); IShellFolder_Release(psf_desktop); + ILFree(pidl_cwd); /* Generate ShellItems for the files */ - ZeroMemory(&psi, sizeof(IShellItem*)*9); + memset(&psi, 0, sizeof(psi)); failed = FALSE; for(i = 0; i < 9; i++) { @@ -4443,6 +4444,7 @@ static void test_SHChangeNotify(void) SHChangeNotifyDeregister(notifyID); DestroyWindow(wnd); + ILFree((LPITEMIDLIST)entries[0].pidl); br = RemoveDirectoryA(root_dirA); ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError()); }
1
0
0
0
Nikolay Sivov : shell32: Fix a parent PIDL leak (Valgrind).
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: b907b7d6bfdc19e0b1ea4aced4e182a486823100 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b907b7d6bfdc19e0b1ea4aced…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Jan 22 03:07:40 2011 +0300 shell32: Fix a parent PIDL leak (Valgrind). --- dlls/shell32/brsfolder.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 705bdfa..9b0d20b 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -229,6 +229,7 @@ static void InitializeTreeView( browse_info *info ) if (FAILED(hr)) { WARN("SHGetDesktopFolder failed! hr = %08x\n", hr); ILFree(pidlChild); + ILFree(pidlParent); return; } hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent); @@ -238,6 +239,7 @@ static void InitializeTreeView( browse_info *info ) if (FAILED(hr)) { WARN("Could not bind to parent shell folder! hr = %08x\n", hr); ILFree(pidlChild); + ILFree(pidlParent); return; } @@ -252,6 +254,7 @@ static void InitializeTreeView( browse_info *info ) WARN("Could not bind to root shell folder! hr = %08x\n", hr); IShellFolder_Release(lpsfParent); ILFree(pidlChild); + ILFree(pidlParent); return; } @@ -262,6 +265,7 @@ static void InitializeTreeView( browse_info *info ) IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfRoot); ILFree(pidlChild); + ILFree(pidlParent); return; } @@ -271,6 +275,7 @@ static void InitializeTreeView( browse_info *info ) SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item ); ILFree(pidlChild); + ILFree(pidlParent); IShellFolder_Release(lpsfRoot); IShellFolder_Release(lpsfParent); }
1
0
0
0
Eric Pouech : kernel32: Added missing include to term.c.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 33389354a51865028a1bcddf90d7f27cff3d2775 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33389354a51865028a1bcddf9…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jan 22 09:23:43 2011 +0100 kernel32: Added missing include to term.c. --- dlls/kernel32/term.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/term.c b/dlls/kernel32/term.c index a7e18ec..850b792 100644 --- a/dlls/kernel32/term.c +++ b/dlls/kernel32/term.c @@ -21,6 +21,7 @@ #include "config.h" #include "wine/port.h" +#include <stdarg.h> #ifdef HAVE_NCURSES_H # include <ncurses.h> #elif defined(HAVE_CURSES_H)
1
0
0
0
Jacek Caban : urlmon: Fixed key name size and format in open_zone_key.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: c117f218765902019a2d29273a4bd5472c2bc6d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c117f218765902019a2d29273…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jan 22 01:52:47 2011 +0100 urlmon: Fixed key name size and format in open_zone_key. --- dlls/urlmon/sec_mgr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 87b8fda..e3be8fe 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -221,9 +221,9 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) static HRESULT open_zone_key(HKEY parent_key, DWORD zone, HKEY *hkey) { - static const WCHAR wszFormat[] = {'%','s','%','l','d',0}; + static const WCHAR wszFormat[] = {'%','s','%','u',0}; - WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+8]; + WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+12]; DWORD res; wsprintfW(key_name, wszFormat, wszZonesKey, zone);
1
0
0
0
Vincent Povirk : gdiplus: Add a software implementation of line gradient brushes.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 0c17a0b5bbfc2af4d29e35caee1877a8f3d19086 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c17a0b5bbfc2af4d29e35cae…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Jan 21 15:48:45 2011 -0600 gdiplus: Add a software implementation of line gradient brushes. --- dlls/gdiplus/graphics.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 284847e..de1e28f 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -256,6 +256,15 @@ static ARGB blend_colors(ARGB start, ARGB end, REAL position) { ARGB result=0; ARGB i; + INT a1, a2, a3; + + a1 = (start >> 24) & 0xff; + a2 = (end >> 24) & 0xff; + + a3 = (int)(a1*(1.0f - position)+a2*(position)); + + result |= a3 << 24; + for (i=0xff; i<=0xff0000; i = i << 8) result |= (int)((start&i)*(1.0f - position)+(end&i)*(position))&i; return result; @@ -493,6 +502,7 @@ static INT brush_can_fill_pixels(GpBrush *brush) { case BrushTypeSolidColor: case BrushTypeHatchFill: + case BrushTypeLinearGradient: return 1; default: return 0; @@ -539,6 +549,66 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, return Ok; } + case BrushTypeLinearGradient: + { + GpLineGradient *fill = (GpLineGradient*)brush; + GpPointF draw_points[3], line_points[3]; + GpStatus stat; + static const GpRectF box_1 = { 0.0, 0.0, 1.0, 1.0 }; + GpMatrix *world_to_gradient; /* FIXME: Store this in the brush? */ + int x, y; + + draw_points[0].X = fill_area->X; + draw_points[0].Y = fill_area->Y; + draw_points[1].X = fill_area->X+1; + draw_points[1].Y = fill_area->Y; + draw_points[2].X = fill_area->X; + draw_points[2].Y = fill_area->Y+1; + + /* Transform the points to a co-ordinate space where X is the point's + * position in the gradient, 0.0 being the start point and 1.0 the + * end point. */ + stat = GdipTransformPoints(graphics, CoordinateSpaceWorld, + CoordinateSpaceDevice, draw_points, 3); + + if (stat == Ok) + { + line_points[0] = fill->startpoint; + line_points[1] = fill->endpoint; + line_points[2].X = fill->startpoint.X + (fill->startpoint.Y - fill->endpoint.Y); + line_points[2].Y = fill->startpoint.Y + (fill->endpoint.X - fill->startpoint.X); + + stat = GdipCreateMatrix3(&box_1, line_points, &world_to_gradient); + } + + if (stat == Ok) + { + stat = GdipInvertMatrix(world_to_gradient); + + if (stat == Ok) + stat = GdipTransformMatrixPoints(world_to_gradient, draw_points, 3); + + GdipDeleteMatrix(world_to_gradient); + } + + if (stat == Ok) + { + REAL x_delta = draw_points[1].X - draw_points[0].X; + REAL y_delta = draw_points[2].X - draw_points[0].X; + + for (y=0; y<fill_area->Height; y++) + { + for (x=0; x<fill_area->Width; x++) + { + REAL pos = draw_points[0].X + x * x_delta + y * y_delta; + + argb_pixels[x + y*cdwStride] = blend_line_gradient(fill, pos); + } + } + } + + return stat; + } default: return NotImplemented; }
1
0
0
0
Vincent Povirk : gdiplus: Add a software implementation of hatch brushes.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: b7e664bc5c18d36aa8decbc97e6cecdfdabc4d57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7e664bc5c18d36aa8decbc97…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Jan 21 13:44:04 2011 -0600 gdiplus: Add a software implementation of hatch brushes. --- dlls/gdiplus/brush.c | 11 +++++++++++ dlls/gdiplus/gdiplus_private.h | 2 ++ dlls/gdiplus/graphics.c | 27 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 61ec6a3..480d0a3 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -219,6 +219,17 @@ static const char HatchBrushes[][8] = { { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff }, /* HatchStyleDarkHorizontal */ }; +GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result) +{ + if (hatchstyle < sizeof(HatchBrushes) / sizeof(HatchBrushes[0])) + { + *result = HatchBrushes[hatchstyle]; + return Ok; + } + else + return NotImplemented; +} + /****************************************************************************** * GdipCreateHatchBrush [GDIPLUS.@] */ diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index b78e459..7665714 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -65,6 +65,8 @@ extern GpStatus trace_path(GpGraphics *graphics, GpPath *path); typedef struct region_element region_element; extern void delete_element(region_element *element); +extern GpStatus get_hatch_data(HatchStyle hatchstyle, const char **result); + static inline INT roundr(REAL x) { return (INT) floorf(x + 0.5); diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 7759685..284847e 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -492,6 +492,7 @@ static INT brush_can_fill_pixels(GpBrush *brush) switch (brush->bt) { case BrushTypeSolidColor: + case BrushTypeHatchFill: return 1; default: return 0; @@ -512,6 +513,32 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, argb_pixels[x + y*cdwStride] = fill->color; return Ok; } + case BrushTypeHatchFill: + { + int x, y; + GpHatch *fill = (GpHatch*)brush; + const char *hatch_data; + + if (get_hatch_data(fill->hatchstyle, &hatch_data) != Ok) + return NotImplemented; + + for (x=0; x<fill_area->Width; x++) + for (y=0; y<fill_area->Height; y++) + { + int hx, hy; + + /* FIXME: Account for the rendering origin */ + hx = (x + fill_area->X) % 8; + hy = (y + fill_area->Y) % 8; + + if ((hatch_data[7-hy] & (0x80 >> hx)) != 0) + argb_pixels[x + y*cdwStride] = fill->forecol; + else + argb_pixels[x + y*cdwStride] = fill->backcol; + } + + return Ok; + } default: return NotImplemented; }
1
0
0
0
Vincent Povirk : gdiplus: Add a software implementation of GdipFillRegion.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 60cd4773423dffcd1afa381e584386c919f8d603 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60cd4773423dffcd1afa381e5…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Jan 21 13:00:34 2011 -0600 gdiplus: Add a software implementation of GdipFillRegion. --- dlls/gdiplus/graphics.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 149 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c196ab8..7759685 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -487,6 +487,36 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush) } } +static INT brush_can_fill_pixels(GpBrush *brush) +{ + switch (brush->bt) + { + case BrushTypeSolidColor: + return 1; + default: + return 0; + } +} + +static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, + DWORD *argb_pixels, GpRect *fill_area, UINT cdwStride) +{ + switch (brush->bt) + { + case BrushTypeSolidColor: + { + int x, y; + GpSolidFill *fill = (GpSolidFill*)brush; + for (x=0; x<fill_area->Width; x++) + for (y=0; y<fill_area->Height; y++) + argb_pixels[x + y*cdwStride] = fill->color; + return Ok; + } + default: + return NotImplemented; + } +} + /* GdipDrawPie/GdipFillPie helper function */ static void draw_pie(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) @@ -3321,13 +3351,122 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush, return Ok; } +static GpStatus SOFTWARE_GdipFillRegion(GpGraphics *graphics, GpBrush *brush, + GpRegion* region) +{ + GpStatus stat; + GpRegion *temp_region; + GpMatrix *world_to_device, *identity; + GpRectF graphics_bounds; + UINT scans_count, i; + INT dummy; + GpRect *scans; + DWORD *pixel_data; + + if (!brush_can_fill_pixels(brush)) + return NotImplemented; + + stat = get_graphics_bounds(graphics, &graphics_bounds); + + if (stat == Ok) + stat = GdipCloneRegion(region, &temp_region); + + if (stat == Ok) + { + stat = get_graphics_transform(graphics, CoordinateSpaceDevice, + CoordinateSpaceWorld, &world_to_device); + + if (stat == Ok) + { + stat = GdipTransformRegion(temp_region, world_to_device); + + GdipDeleteMatrix(world_to_device); + } + + if (stat == Ok) + stat = GdipCombineRegionRect(temp_region, &graphics_bounds, CombineModeIntersect); + + if (stat == Ok) + stat = GdipCreateMatrix(&identity); + + if (stat == Ok) + { + stat = GdipGetRegionScansCount(temp_region, &scans_count, identity); + + if (stat == Ok && scans_count != 0) + { + scans = GdipAlloc(sizeof(*scans) * scans_count); + if (!scans) + stat = OutOfMemory; + + if (stat == Ok) + { + stat = GdipGetRegionScansI(temp_region, scans, &dummy, identity); + + if (stat != Ok) + GdipFree(scans); + } + } + + GdipDeleteMatrix(identity); + } + + GdipDeleteRegion(temp_region); + } + + if (stat == Ok && scans_count == 0) + return Ok; + + if (stat == Ok) + { + UINT max_size=0; + + for (i=0; i<scans_count; i++) + { + UINT size = scans[i].Width * scans[i].Height; + + if (size > max_size) + max_size = size; + } + + pixel_data = GdipAlloc(sizeof(*pixel_data) * max_size); + if (!pixel_data) + stat = OutOfMemory; + + if (stat == Ok) + { + for (i=0; i<scans_count; i++) + { + stat = brush_fill_pixels(graphics, brush, pixel_data, &scans[i], + scans[i].Width); + + if (stat == Ok) + { + stat = alpha_blend_pixels(graphics, scans[i].X, scans[i].Y, + (BYTE*)pixel_data, scans[i].Width, scans[i].Height, + scans[i].Width * 4); + } + + if (stat != Ok) + break; + } + + GdipFree(pixel_data); + } + + GdipFree(scans); + } + + return stat; +} + /***************************************************************************** * GdipFillRegion [GDIPLUS.@] */ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, GpRegion* region) { - GpStatus stat; + GpStatus stat = NotImplemented; TRACE("(%p, %p, %p)\n", graphics, brush, region); @@ -3337,11 +3476,18 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, if(graphics->busy) return ObjectBusy; - stat = GDI32_GdipFillRegion(graphics, brush, region); + if (!graphics->image) + stat = GDI32_GdipFillRegion(graphics, brush, region); + + if (stat == NotImplemented) + stat = SOFTWARE_GdipFillRegion(graphics, brush, region); + + if (stat == NotImplemented && graphics->image) + stat = GDI32_GdipFillRegion(graphics, brush, region); if (stat == NotImplemented) { - FIXME("partially implemented\n"); + FIXME("not implemented for brushtype %i\n", brush->bt); stat = Ok; }
1
0
0
0
Vincent Povirk : gdiplus: Factor the matrix creation code out of GdipTransformPoints.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: 6acffba564193a73e65b013de3499883c26d8d75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6acffba564193a73e65b013de…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Jan 21 12:59:33 2011 -0600 gdiplus: Factor the matrix creation code out of GdipTransformPoints. --- dlls/gdiplus/graphics.c | 57 ++++++++++++++++++++++++++++------------------ 1 files changed, 35 insertions(+), 22 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index a17cbef..c196ab8 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -147,6 +147,9 @@ static void restore_dc(GpGraphics *graphics, INT state) RestoreDC(graphics->hdc, state); } +static GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace dst_space, + GpCoordinateSpace src_space, GpMatrix **matrix); + /* This helper applies all the changes that the points listed in ptf need in * order to be drawn on the device context. In the end, this should include at * least: @@ -4909,25 +4912,13 @@ GpStatus WINGDIPAPI GdipGetClip(GpGraphics *graphics, GpRegion *region) return Ok; } -GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace dst_space, - GpCoordinateSpace src_space, GpPointF *points, INT count) +static GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace dst_space, + GpCoordinateSpace src_space, GpMatrix **matrix) { - GpMatrix *matrix; - GpStatus stat; + GpStatus stat = GdipCreateMatrix(matrix); REAL unitscale; - if(!graphics || !points || count <= 0) - return InvalidParameter; - - if(graphics->busy) - return ObjectBusy; - - TRACE("(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space, points, count); - - if (src_space == dst_space) return Ok; - - stat = GdipCreateMatrix(&matrix); - if (stat == Ok) + if (dst_space != src_space && stat == Ok) { unitscale = convert_unit(graphics_res(graphics), graphics->unit); @@ -4938,12 +4929,12 @@ GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace switch (src_space) { case CoordinateSpaceWorld: - GdipMultiplyMatrix(matrix, graphics->worldtrans, MatrixOrderAppend); + GdipMultiplyMatrix(*matrix, graphics->worldtrans, MatrixOrderAppend); break; case CoordinateSpacePage: break; case CoordinateSpaceDevice: - GdipScaleMatrix(matrix, 1.0/unitscale, 1.0/unitscale, MatrixOrderAppend); + GdipScaleMatrix(*matrix, 1.0/unitscale, 1.0/unitscale, MatrixOrderAppend); break; } @@ -4958,7 +4949,7 @@ GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace { stat = GdipInvertMatrix(inverted_transform); if (stat == Ok) - GdipMultiplyMatrix(matrix, inverted_transform, MatrixOrderAppend); + GdipMultiplyMatrix(*matrix, inverted_transform, MatrixOrderAppend); GdipDeleteMatrix(inverted_transform); } break; @@ -4966,12 +4957,34 @@ GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace case CoordinateSpacePage: break; case CoordinateSpaceDevice: - GdipScaleMatrix(matrix, unitscale, unitscale, MatrixOrderAppend); + GdipScaleMatrix(*matrix, unitscale, unitscale, MatrixOrderAppend); break; } + } + return stat; +} - if (stat == Ok) - stat = GdipTransformMatrixPoints(matrix, points, count); +GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace dst_space, + GpCoordinateSpace src_space, GpPointF *points, INT count) +{ + GpMatrix *matrix; + GpStatus stat; + + if(!graphics || !points || count <= 0) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + TRACE("(%p, %d, %d, %p, %d)\n", graphics, dst_space, src_space, points, count); + + if (src_space == dst_space) return Ok; + + stat = get_graphics_transform(graphics, dst_space, src_space, &matrix); + + if (stat == Ok) + { + stat = GdipTransformMatrixPoints(matrix, points, count); GdipDeleteMatrix(matrix); }
1
0
0
0
Vincent Povirk : gdiplus: Factor out the gdi32 code of GdipFillRegion.
by Alexandre Julliard
24 Jan '11
24 Jan '11
Module: wine Branch: master Commit: b689e63a86bf3986c3d0d06ad17dee3e9111dcf3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b689e63a86bf3986c3d0d06ad…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Jan 21 11:33:52 2011 -0600 gdiplus: Factor out the gdi32 code of GdipFillRegion. --- dlls/gdiplus/graphics.c | 47 ++++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 17 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index e85a8ba..a17cbef 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3282,30 +3282,16 @@ GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GD return ret; } -/***************************************************************************** - * GdipFillRegion [GDIPLUS.@] - */ -GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, - GpRegion* region) +static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush, + GpRegion* region) { INT save_state; GpStatus status; HRGN hrgn; RECT rc; - TRACE("(%p, %p, %p)\n", graphics, brush, region); - - if (!(graphics && brush && region)) - return InvalidParameter; - - if(graphics->busy) - return ObjectBusy; - if(!graphics->hdc) - { - FIXME("graphics object has no HDC\n"); - return Ok; - } + return NotImplemented; status = GdipGetRegionHRgn(region, graphics, &hrgn); if(status != Ok) @@ -3332,6 +3318,33 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, return Ok; } +/***************************************************************************** + * GdipFillRegion [GDIPLUS.@] + */ +GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, + GpRegion* region) +{ + GpStatus stat; + + TRACE("(%p, %p, %p)\n", graphics, brush, region); + + if (!(graphics && brush && region)) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + stat = GDI32_GdipFillRegion(graphics, brush, region); + + if (stat == NotImplemented) + { + FIXME("partially implemented\n"); + stat = Ok; + } + + return stat; +} + GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention) { TRACE("(%p,%u)\n", graphics, intention);
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200