gdiplus: Implemented GdipGetLineRect/GdipGetLineRectI.
This commit is contained in:
parent
2c059d7f52
commit
3d274bc1cf
|
@ -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*);
|
||||
|
|
Loading…
Reference in New Issue