mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
gdiplus: Use the mode passed to GdipCreateLineBrushFromRect.
This commit is contained in:
parent
aaee4d7f9d
commit
717ac52dda
1 changed files with 29 additions and 4 deletions
|
@ -309,10 +309,35 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect,
|
||||||
if(!line || !rect)
|
if(!line || !rect)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
start.X = rect->X;
|
switch (mode)
|
||||||
start.Y = rect->Y;
|
{
|
||||||
end.X = rect->X + rect->Width;
|
case LinearGradientModeHorizontal:
|
||||||
end.Y = rect->Y + rect->Height;
|
start.X = rect->X;
|
||||||
|
start.Y = rect->Y;
|
||||||
|
end.X = rect->X + rect->Width;
|
||||||
|
end.Y = rect->Y;
|
||||||
|
break;
|
||||||
|
case LinearGradientModeVertical:
|
||||||
|
start.X = rect->X;
|
||||||
|
start.Y = rect->Y;
|
||||||
|
end.X = rect->X;
|
||||||
|
end.Y = rect->Y + rect->Height;
|
||||||
|
break;
|
||||||
|
case LinearGradientModeForwardDiagonal:
|
||||||
|
start.X = rect->X;
|
||||||
|
start.Y = rect->Y;
|
||||||
|
end.X = rect->X + rect->Width;
|
||||||
|
end.Y = rect->Y + rect->Height;
|
||||||
|
break;
|
||||||
|
case LinearGradientModeBackwardDiagonal:
|
||||||
|
start.X = rect->X + rect->Width;
|
||||||
|
start.Y = rect->Y;
|
||||||
|
end.X = rect->X;
|
||||||
|
end.Y = rect->Y + rect->Height;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return InvalidParameter;
|
||||||
|
}
|
||||||
|
|
||||||
stat = GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line);
|
stat = GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue