mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 15:15:39 +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->inset = base_inset;
|
||||
cap->cap = basecap;
|
||||
cap->basecap = basecap;
|
||||
cap->join = LineJoinMiter;
|
||||
cap->scale = 1.0;
|
||||
|
||||
|
@ -193,16 +193,15 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(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++))
|
||||
FIXME("not implemented\n");
|
||||
|
||||
return NotImplemented;
|
||||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
||||
|
@ -264,7 +263,7 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap *customCap, GpLi
|
|||
if(!customCap || !baseCap)
|
||||
return InvalidParameter;
|
||||
|
||||
*baseCap = customCap->cap;
|
||||
*baseCap = customCap->basecap;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
|
|
@ -351,7 +351,7 @@ struct GpCustomLineCap{
|
|||
CustomLineCapType type;
|
||||
GpPathData pathdata;
|
||||
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 */
|
||||
GpLineJoin join;
|
||||
REAL scale;
|
||||
|
|
|
@ -283,14 +283,15 @@ static void test_create_adjustable_cap(void)
|
|||
ok(base == LineCapTriangle, "Unexpected base cap %d\n", base);
|
||||
|
||||
stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquare);
|
||||
todo_wine
|
||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||
|
||||
stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base);
|
||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||
todo_wine
|
||||
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 */
|
||||
stat = GdipGetAdjustableArrowCapWidth(cap, &width);
|
||||
ok(stat == Ok, "Unexpected return code, %d\n", stat);
|
||||
|
|
Loading…
Reference in a new issue