Commit 3d274bc1 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Implemented GdipGetLineRect/GdipGetLineRectI.

parent 2c059d7f
......@@ -715,3 +715,34 @@ GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient *brush,
return NotImplemented;
}
GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient *brush, GpRectF *rect)
{
if(!brush || !rect)
return InvalidParameter;
rect->X = (brush->startpoint.X < brush->endpoint.X ? brush->startpoint.X: brush->endpoint.X);
rect->Y = (brush->startpoint.Y < brush->endpoint.Y ? brush->startpoint.Y: brush->endpoint.Y);
rect->Width = fabs(brush->startpoint.X - brush->endpoint.X);
rect->Height = fabs(brush->startpoint.Y - brush->endpoint.Y);
return Ok;
}
GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient *brush, GpRect *rect)
{
GpRectF rectF;
GpStatus ret;
ret = GdipGetLineRect(brush, &rectF);
if(ret == Ok){
rect->X = roundr(rectF.X);
rect->Y = roundr(rectF.Y);
rect->Width = roundr(rectF.Width);
rect->Height = roundr(rectF.Height);
}
return ret;
}
......@@ -306,8 +306,8 @@
@ stdcall GdipGetLineGammaCorrection(ptr ptr)
@ stub GdipGetLinePresetBlend
@ stub GdipGetLinePresetBlendCount
@ stub GdipGetLineRect
@ stub GdipGetLineRectI
@ stdcall GdipGetLineRect(ptr ptr)
@ stdcall GdipGetLineRectI(ptr ptr)
@ stub GdipGetLineSpacing
@ stub GdipGetLineTransform
@ stub GdipGetLineWrapMode
......
......@@ -157,6 +157,8 @@ GpStatus WINGDIPAPI GdipCreateTextureIAI(GpImage*,GDIPCONST GpImageAttributes*,
GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*);
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*);
GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*);
GpStatus WINGDIPAPI GdipGetLineRect(GpLineGradient*,GpRectF*);
GpStatus WINGDIPAPI GdipGetLineRectI(GpLineGradient*,GpRect*);
GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*);
GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*);
GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment