// coverity[+alloc : arg-*3] GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap (REAL height, REAL width, BOOL isFilled, GpAdjustableArrowCap **cap) { GpAdjustableArrowCap *result; if (!gdiplusInitialized) return GdiplusNotInitialized; if (!cap) return InvalidParameter; result = gdip_adjust_arrowcap_new (); if (!result) { *cap = NULL; return OutOfMemory; } result->fill_state = isFilled; result->width = width; result->height = height; update_adjustablearrowcap (result); *cap = result; return Ok; }
GpStatus gdip_adjust_arrowcap_clone_cap (GpCustomLineCap *cap, GpCustomLineCap **clonedCap) { GpAdjustableArrowCap *newcap; if (!cap || !clonedCap) return InvalidParameter; newcap = gdip_adjust_arrowcap_new (); if (!newcap) return OutOfMemory; memcpy (newcap, cap, sizeof (GpAdjustableArrowCap)); *clonedCap = (GpCustomLineCap *) newcap; return Ok; }
// coverity[+alloc : arg-*3] GpStatus GdipCreateAdjustableArrowCap (float height, float width, BOOL isFilled, GpAdjustableArrowCap **arrowCap) { GpAdjustableArrowCap *cap; if (!arrowCap) return InvalidParameter; cap = gdip_adjust_arrowcap_new (); if (!cap) { *arrowCap = NULL; return OutOfMemory; } cap->fill_state = isFilled; cap->width = width; cap->height = height; *arrowCap = cap; return Ok; }