2008-03-25 17:34:57 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Google (Evan Stade)
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2018-03-09 12:09:03 +00:00
|
|
|
#include <stdarg.h>
|
2018-05-27 03:10:39 +00:00
|
|
|
#include <assert.h>
|
2018-03-09 12:09:03 +00:00
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
|
|
|
|
#include "objbase.h"
|
|
|
|
|
|
|
|
#include "gdiplus.h"
|
2008-03-25 17:34:57 +00:00
|
|
|
#include "gdiplus_private.h"
|
2018-03-09 12:09:03 +00:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
|
2008-03-25 17:34:57 +00:00
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from,
|
|
|
|
GpCustomLineCap** to)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %p)\n", from, to);
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
if(!from || !to)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (from->type == CustomLineCapTypeDefault)
|
|
|
|
*to = heap_alloc_zero(sizeof(GpCustomLineCap));
|
|
|
|
else
|
|
|
|
*to = heap_alloc_zero(sizeof(GpAdjustableArrowCap));
|
2008-03-25 17:34:57 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!*to)
|
|
|
|
return OutOfMemory;
|
|
|
|
|
|
|
|
if (from->type == CustomLineCapTypeDefault)
|
|
|
|
**to = *from;
|
|
|
|
else
|
|
|
|
*(GpAdjustableArrowCap *)*to = *(GpAdjustableArrowCap *)from;
|
2008-03-25 17:34:57 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
/* Duplicate path data */
|
2015-11-22 10:10:02 +00:00
|
|
|
(*to)->pathdata.Points = heap_alloc_zero(from->pathdata.Count * sizeof(PointF));
|
|
|
|
(*to)->pathdata.Types = heap_alloc_zero(from->pathdata.Count);
|
2008-03-25 17:34:57 +00:00
|
|
|
|
|
|
|
if((!(*to)->pathdata.Types || !(*to)->pathdata.Points) && (*to)->pathdata.Count){
|
2015-11-22 10:10:02 +00:00
|
|
|
heap_free((*to)->pathdata.Points);
|
|
|
|
heap_free((*to)->pathdata.Types);
|
|
|
|
heap_free(*to);
|
2008-03-25 17:34:57 +00:00
|
|
|
return OutOfMemory;
|
|
|
|
}
|
|
|
|
|
|
|
|
memcpy((*to)->pathdata.Points, from->pathdata.Points, from->pathdata.Count
|
|
|
|
* sizeof(PointF));
|
|
|
|
memcpy((*to)->pathdata.Types, from->pathdata.Types, from->pathdata.Count);
|
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("<-- %p\n", *to);
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
static GpStatus init_custom_linecap(GpCustomLineCap *cap, GpPathData *pathdata, BOOL fill, GpLineCap basecap,
|
|
|
|
REAL base_inset)
|
|
|
|
{
|
|
|
|
cap->fill = fill;
|
|
|
|
|
|
|
|
cap->pathdata.Points = heap_alloc_zero(pathdata->Count * sizeof(PointF));
|
|
|
|
cap->pathdata.Types = heap_alloc_zero(pathdata->Count);
|
|
|
|
|
|
|
|
if ((!cap->pathdata.Types || !cap->pathdata.Points) && pathdata->Count)
|
|
|
|
{
|
|
|
|
heap_free(cap->pathdata.Points);
|
|
|
|
heap_free(cap->pathdata.Types);
|
|
|
|
cap->pathdata.Points = NULL;
|
|
|
|
cap->pathdata.Types = NULL;
|
|
|
|
return OutOfMemory;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pathdata->Points)
|
|
|
|
memcpy(cap->pathdata.Points, pathdata->Points, pathdata->Count * sizeof(PointF));
|
|
|
|
if (pathdata->Types)
|
|
|
|
memcpy(cap->pathdata.Types, pathdata->Types, pathdata->Count);
|
|
|
|
cap->pathdata.Count = pathdata->Count;
|
|
|
|
|
|
|
|
cap->inset = base_inset;
|
|
|
|
cap->cap = basecap;
|
|
|
|
cap->join = LineJoinMiter;
|
|
|
|
cap->scale = 1.0;
|
|
|
|
|
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
/* FIXME: Sometimes when fillPath is non-null and stroke path is null, the native
|
|
|
|
* version of this function returns NotImplemented. I cannot figure out why. */
|
|
|
|
GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath,
|
|
|
|
GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap)
|
|
|
|
{
|
|
|
|
GpPathData *pathdata;
|
2018-05-27 03:10:39 +00:00
|
|
|
GpStatus stat;
|
2008-03-25 17:34:57 +00:00
|
|
|
|
|
|
|
TRACE("%p %p %d %f %p\n", fillPath, strokePath, baseCap, baseInset, customCap);
|
|
|
|
|
|
|
|
if(!customCap || !(fillPath || strokePath))
|
|
|
|
return InvalidParameter;
|
|
|
|
|
2015-11-22 10:10:02 +00:00
|
|
|
*customCap = heap_alloc_zero(sizeof(GpCustomLineCap));
|
2008-03-25 17:34:57 +00:00
|
|
|
if(!*customCap) return OutOfMemory;
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (strokePath)
|
2008-03-25 17:34:57 +00:00
|
|
|
pathdata = &strokePath->pathdata;
|
2018-05-27 03:10:39 +00:00
|
|
|
else
|
2008-03-25 17:34:57 +00:00
|
|
|
pathdata = &fillPath->pathdata;
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
stat = init_custom_linecap(*customCap, pathdata, fillPath != NULL, baseCap, baseInset);
|
|
|
|
if (stat != Ok)
|
|
|
|
{
|
2015-11-22 10:10:02 +00:00
|
|
|
heap_free(*customCap);
|
2018-05-27 03:10:39 +00:00
|
|
|
return stat;
|
2008-03-25 17:34:57 +00:00
|
|
|
}
|
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("<-- %p\n", *customCap);
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap *customCap)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p)\n", customCap);
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
if(!customCap)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
2015-11-22 10:10:02 +00:00
|
|
|
heap_free(customCap->pathdata.Points);
|
|
|
|
heap_free(customCap->pathdata.Types);
|
|
|
|
heap_free(customCap);
|
2008-03-25 17:34:57 +00:00
|
|
|
|
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
|
|
|
|
GpLineJoin* lineJoin)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %p)\n", customCap, lineJoin);
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
if(!customCap || !lineJoin)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
|
|
|
*lineJoin = customCap->join;
|
|
|
|
|
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(GpCustomLineCap* custom,
|
|
|
|
REAL* widthScale)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %p)\n", custom, widthScale);
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
if(!custom || !widthScale)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
|
|
|
*widthScale = custom->scale;
|
|
|
|
|
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* custom,
|
|
|
|
GpLineCap start, GpLineCap end)
|
|
|
|
{
|
|
|
|
static int calls;
|
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%u,%u)\n", custom, start, end);
|
|
|
|
|
2008-03-25 17:34:57 +00:00
|
|
|
if(!custom)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
|
|
|
if(!(calls++))
|
|
|
|
FIXME("not implemented\n");
|
|
|
|
|
|
|
|
return NotImplemented;
|
|
|
|
}
|
2008-04-14 12:53:30 +00:00
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap* custom,
|
|
|
|
GpLineCap base)
|
|
|
|
{
|
|
|
|
static int calls;
|
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%u)\n", custom, base);
|
|
|
|
|
2008-04-14 12:53:30 +00:00
|
|
|
if(!(calls++))
|
|
|
|
FIXME("not implemented\n");
|
|
|
|
|
|
|
|
return NotImplemented;
|
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
|
|
|
REAL* inset)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %p)\n", custom, inset);
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
if(!custom || !inset)
|
|
|
|
return InvalidParameter;
|
2008-04-14 12:53:30 +00:00
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
*inset = custom->inset;
|
2008-04-14 12:53:30 +00:00
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
return Ok;
|
2008-04-14 12:53:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap* custom,
|
|
|
|
REAL inset)
|
|
|
|
{
|
|
|
|
static int calls;
|
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%0.2f)\n", custom, inset);
|
|
|
|
|
2008-04-14 12:53:30 +00:00
|
|
|
if(!(calls++))
|
|
|
|
FIXME("not implemented\n");
|
|
|
|
|
|
|
|
return NotImplemented;
|
|
|
|
}
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
/*FIXME: LineJoin completely ignored now */
|
2008-04-14 12:53:30 +00:00
|
|
|
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap* custom,
|
|
|
|
GpLineJoin join)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %d)\n", custom, join);
|
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
if(!custom)
|
|
|
|
return InvalidParameter;
|
2008-04-14 12:53:30 +00:00
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
custom->join = join;
|
2008-04-14 12:53:30 +00:00
|
|
|
|
2008-08-05 12:23:58 +00:00
|
|
|
return Ok;
|
2008-04-14 12:53:30 +00:00
|
|
|
}
|
|
|
|
|
2013-09-19 15:10:19 +00:00
|
|
|
GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap* custom, REAL width)
|
2008-04-14 12:53:30 +00:00
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%0.2f)\n", custom, width);
|
|
|
|
|
2013-09-19 15:10:19 +00:00
|
|
|
if(!custom)
|
|
|
|
return InvalidParameter;
|
2008-04-14 12:53:30 +00:00
|
|
|
|
2013-09-19 15:10:19 +00:00
|
|
|
custom->scale = width;
|
|
|
|
|
|
|
|
return Ok;
|
2008-04-14 12:53:30 +00:00
|
|
|
}
|
2008-05-04 19:41:25 +00:00
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap *customCap, GpLineCap *baseCap)
|
|
|
|
{
|
2008-09-07 10:32:49 +00:00
|
|
|
TRACE("(%p, %p)\n", customCap, baseCap);
|
|
|
|
|
2008-05-04 19:41:25 +00:00
|
|
|
if(!customCap || !baseCap)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
|
|
|
*baseCap = customCap->cap;
|
|
|
|
|
|
|
|
return Ok;
|
|
|
|
}
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2017-03-05 21:15:16 +00:00
|
|
|
GpStatus WINGDIPAPI GdipGetCustomLineCapType(GpCustomLineCap *customCap, CustomLineCapType *type)
|
|
|
|
{
|
|
|
|
TRACE("(%p, %p)\n", customCap, type);
|
|
|
|
|
|
|
|
if(!customCap || !type)
|
|
|
|
return InvalidParameter;
|
|
|
|
|
|
|
|
*type = customCap->type;
|
|
|
|
return Ok;
|
|
|
|
}
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
static void arrowcap_update_path(GpAdjustableArrowCap *cap)
|
|
|
|
{
|
|
|
|
static const BYTE types_filled[] =
|
|
|
|
{
|
|
|
|
PathPointTypeStart, PathPointTypeLine, PathPointTypeLine, PathPointTypeLine | PathPointTypeCloseSubpath
|
|
|
|
};
|
|
|
|
static const BYTE types_unfilled[] =
|
|
|
|
{
|
|
|
|
PathPointTypeStart, PathPointTypeLine, PathPointTypeLine
|
|
|
|
};
|
|
|
|
GpPointF *points;
|
|
|
|
|
|
|
|
assert(cap->cap.pathdata.Count == 3 || cap->cap.pathdata.Count == 4);
|
|
|
|
|
|
|
|
points = cap->cap.pathdata.Points;
|
|
|
|
if (cap->cap.fill)
|
|
|
|
{
|
|
|
|
memcpy(cap->cap.pathdata.Types, types_filled, sizeof(types_filled));
|
|
|
|
cap->cap.pathdata.Count = 4;
|
|
|
|
points[0].X = -cap->width / 2.0;
|
|
|
|
points[0].Y = -cap->height;
|
|
|
|
points[1].X = 0.0;
|
|
|
|
points[1].Y = 0.0;
|
|
|
|
points[2].X = cap->width / 2.0;
|
|
|
|
points[2].Y = -cap->height;
|
|
|
|
points[3].X = 0.0;
|
|
|
|
points[3].Y = -cap->height - cap->middle_inset;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
memcpy(cap->cap.pathdata.Types, types_unfilled, sizeof(types_unfilled));
|
|
|
|
cap->cap.pathdata.Count = 3;
|
|
|
|
points[0].X = -cap->width / 4.0;
|
|
|
|
points[0].Y = -cap->height / 2.0;
|
|
|
|
points[1].X = 0.0;
|
|
|
|
points[1].Y = 0.0;
|
|
|
|
points[2].X = cap->width / 4.0;
|
|
|
|
points[2].Y = -cap->height / 2.0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cap->width == 0.0)
|
|
|
|
cap->cap.inset = 0.0;
|
|
|
|
else
|
|
|
|
cap->cap.inset = cap->height / cap->width;
|
|
|
|
}
|
|
|
|
|
2008-09-07 10:32:49 +00:00
|
|
|
GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL fill,
|
|
|
|
GpAdjustableArrowCap **cap)
|
|
|
|
{
|
2018-05-27 03:10:39 +00:00
|
|
|
GpPathData pathdata;
|
|
|
|
GpStatus stat;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%0.2f,%0.2f,%i,%p)\n", height, width, fill, cap);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
*cap = heap_alloc_zero(sizeof(**cap));
|
|
|
|
if (!*cap)
|
|
|
|
return OutOfMemory;
|
|
|
|
|
|
|
|
/* We'll need 4 points at most. */
|
|
|
|
pathdata.Count = 4;
|
|
|
|
pathdata.Points = NULL;
|
|
|
|
pathdata.Types = NULL;
|
|
|
|
stat = init_custom_linecap(&(*cap)->cap, &pathdata, fill, LineCapTriangle, width != 0.0 ? height / width : 0.0);
|
|
|
|
if (stat != Ok)
|
|
|
|
{
|
|
|
|
heap_free(*cap);
|
|
|
|
return stat;
|
|
|
|
}
|
|
|
|
|
|
|
|
(*cap)->cap.type = CustomLineCapTypeAdjustableArrow;
|
|
|
|
(*cap)->height = height;
|
|
|
|
(*cap)->width = width;
|
|
|
|
(*cap)->middle_inset = 0.0;
|
|
|
|
arrowcap_update_path(*cap);
|
|
|
|
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL* fill)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%p)\n", cap, fill);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap || !fill)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
*fill = cap->cap.fill;
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL* height)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%p)\n", cap, height);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap || !height)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
*height = cap->height;
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL* middle)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%p)\n", cap, middle);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap || !middle)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
*middle = cap->middle_inset;
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL* width)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%p)\n", cap, width);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap || !width)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
*width = cap->width;
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fill)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%i)\n", cap, fill);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
cap->cap.fill = fill;
|
|
|
|
arrowcap_update_path(cap);
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL height)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%0.2f)\n", cap, height);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
cap->height = height;
|
|
|
|
arrowcap_update_path(cap);
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL middle)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%0.2f)\n", cap, middle);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
cap->middle_inset = middle;
|
|
|
|
arrowcap_update_path(cap);
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL width)
|
|
|
|
{
|
2010-03-04 13:34:05 +00:00
|
|
|
TRACE("(%p,%0.2f)\n", cap, width);
|
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
if (!cap)
|
|
|
|
return InvalidParameter;
|
2008-09-07 10:32:49 +00:00
|
|
|
|
2018-05-27 03:10:39 +00:00
|
|
|
cap->width = width;
|
|
|
|
arrowcap_update_path(cap);
|
|
|
|
return Ok;
|
2008-09-07 10:32:49 +00:00
|
|
|
}
|