gdiplus: Always create path gradient brushes with blend positions.

This commit is contained in:
Vincent Povirk 2010-06-19 16:31:14 -05:00 committed by Alexandre Julliard
parent 0178093576
commit 4c93f9f880
1 changed files with 10 additions and 4 deletions

View File

@ -574,12 +574,15 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
if (!*grad) return OutOfMemory;
(*grad)->blendfac = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac){
(*grad)->blendpos = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac || !(*grad)->blendpos){
GdipFree((*grad)->blendfac);
GdipFree((*grad)->blendpos);
GdipFree(*grad);
return OutOfMemory;
}
(*grad)->blendfac[0] = 1.0;
(*grad)->blendpos = NULL;
(*grad)->blendpos[0] = 1.0;
(*grad)->blendcount = 1;
(*grad)->pathdata.Count = count;
@ -664,12 +667,15 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
if (!*grad) return OutOfMemory;
(*grad)->blendfac = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac){
(*grad)->blendpos = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac || !(*grad)->blendpos){
GdipFree((*grad)->blendfac);
GdipFree((*grad)->blendpos);
GdipFree(*grad);
return OutOfMemory;
}
(*grad)->blendfac[0] = 1.0;
(*grad)->blendpos = NULL;
(*grad)->blendpos[0] = 1.0;
(*grad)->blendcount = 1;
(*grad)->pathdata.Count = path->pathdata.Count;