mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 07:44:47 +00:00
gdiplus: Add GdipSetCustomLineCapBaseCap implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45273
This commit is contained in:
parent
aeb43dce75
commit
742c315702
|
@ -96,7 +96,7 @@ static GpStatus init_custom_linecap(GpCustomLineCap *cap, GpPathData *pathdata,
|
||||||
cap->pathdata.Count = pathdata->Count;
|
cap->pathdata.Count = pathdata->Count;
|
||||||
|
|
||||||
cap->inset = base_inset;
|
cap->inset = base_inset;
|
||||||
cap->cap = basecap;
|
cap->basecap = basecap;
|
||||||
cap->join = LineJoinMiter;
|
cap->join = LineJoinMiter;
|
||||||
cap->scale = 1.0;
|
cap->scale = 1.0;
|
||||||
|
|
||||||
|
@ -193,16 +193,15 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* custom,
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap* custom,
|
||||||
GpLineCap base)
|
GpLineCap basecap)
|
||||||
{
|
{
|
||||||
static int calls;
|
TRACE("(%p,%u)\n", custom, basecap);
|
||||||
|
if(!custom || basecap > LineCapTriangle)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
TRACE("(%p,%u)\n", custom, base);
|
custom->basecap = basecap;
|
||||||
|
|
||||||
if(!(calls++))
|
return Ok;
|
||||||
FIXME("not implemented\n");
|
|
||||||
|
|
||||||
return NotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
||||||
|
@ -264,7 +263,7 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap *customCap, GpLi
|
||||||
if(!customCap || !baseCap)
|
if(!customCap || !baseCap)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
*baseCap = customCap->cap;
|
*baseCap = customCap->basecap;
|
||||||
|
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,7 @@ struct GpCustomLineCap{
|
||||||
CustomLineCapType type;
|
CustomLineCapType type;
|
||||||
GpPathData pathdata;
|
GpPathData pathdata;
|
||||||
BOOL fill; /* TRUE for fill, FALSE for stroke */
|
BOOL fill; /* TRUE for fill, FALSE for stroke */
|
||||||
GpLineCap cap; /* as far as I can tell, this value is ignored */
|
GpLineCap basecap; /* cap used together with customLineCap */
|
||||||
REAL inset; /* how much to adjust the end of the line */
|
REAL inset; /* how much to adjust the end of the line */
|
||||||
GpLineJoin join;
|
GpLineJoin join;
|
||||||
REAL scale;
|
REAL scale;
|
||||||
|
|
|
@ -283,14 +283,15 @@ static void test_create_adjustable_cap(void)
|
||||||
ok(base == LineCapTriangle, "Unexpected base cap %d\n", base);
|
ok(base == LineCapTriangle, "Unexpected base cap %d\n", base);
|
||||||
|
|
||||||
stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquare);
|
stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquare);
|
||||||
todo_wine
|
|
||||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||||
|
|
||||||
stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base);
|
stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base);
|
||||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||||
todo_wine
|
|
||||||
ok(base == LineCapSquare, "Unexpected base cap %d\n", base);
|
ok(base == LineCapSquare, "Unexpected base cap %d\n", base);
|
||||||
|
|
||||||
|
stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquareAnchor);
|
||||||
|
ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat);
|
||||||
|
|
||||||
/* Base inset */
|
/* Base inset */
|
||||||
stat = GdipGetAdjustableArrowCapWidth(cap, &width);
|
stat = GdipGetAdjustableArrowCapWidth(cap, &width);
|
||||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||||
|
|
Loading…
Reference in a new issue