Commit 68ba30f4 authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added SetPenEndCap.

parent fff723d7
...@@ -550,7 +550,7 @@ ...@@ -550,7 +550,7 @@
@ stub GdipSetPenDashCap197819 @ stub GdipSetPenDashCap197819
@ stub GdipSetPenDashOffset @ stub GdipSetPenDashOffset
@ stub GdipSetPenDashStyle @ stub GdipSetPenDashStyle
@ stub GdipSetPenEndCap @ stdcall GdipSetPenEndCap(ptr long)
@ stub GdipSetPenLineCap197819 @ stub GdipSetPenLineCap197819
@ stub GdipSetPenLineJoin @ stub GdipSetPenLineJoin
@ stub GdipSetPenMiterLimit @ stub GdipSetPenMiterLimit
......
...@@ -32,6 +32,7 @@ struct GpPen{ ...@@ -32,6 +32,7 @@ struct GpPen{
GpUnit unit; GpUnit unit;
REAL width; REAL width;
HPEN gdipen; HPEN gdipen;
GpLineCap endcap;
}; };
struct GpGraphics{ struct GpGraphics{
......
...@@ -43,6 +43,7 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit, ...@@ -43,6 +43,7 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
gp_pen->color = ARGB2COLORREF(color); gp_pen->color = ARGB2COLORREF(color);
gp_pen->width = width; gp_pen->width = width;
gp_pen->unit = unit; gp_pen->unit = unit;
gp_pen->endcap = LineCapFlat;
/* FIXME: Currently only solid lines supported. */ /* FIXME: Currently only solid lines supported. */
lb.lbStyle = BS_SOLID; lb.lbStyle = BS_SOLID;
...@@ -71,3 +72,17 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen) ...@@ -71,3 +72,17 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
return Ok; return Ok;
} }
GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
{
if(!pen) return InvalidParameter;
if(cap != LineCapFlat){
FIXME("Not implemented for non-flat EndCap\n");
return NotImplemented;
}
pen->endcap = cap;
return Ok;
}
...@@ -45,11 +45,29 @@ enum FillMode ...@@ -45,11 +45,29 @@ enum FillMode
FillModeWinding = 1 FillModeWinding = 1
}; };
enum LineCap
{
LineCapFlat = 0x00,
LineCapSquare = 0x01,
LineCapRound = 0x02,
LineCapTriangle = 0x03,
LineCapNoAnchor = 0x10,
LineCapSquareAnchor = 0x11,
LineCapRoundAnchor = 0x12,
LineCapDiamondAnchor = 0x13,
LineCapArrowAnchor = 0x14,
LineCapCustom = 0xff,
LineCapAnchorMask = 0xf0
};
#ifndef __cplusplus #ifndef __cplusplus
typedef enum Unit Unit; typedef enum Unit Unit;
typedef enum BrushType BrushType; typedef enum BrushType BrushType;
typedef enum FillMode FillMode; typedef enum FillMode FillMode;
typedef enum LineCap LineCap;
#endif /* end of c typedefs */ #endif /* end of c typedefs */
......
...@@ -43,5 +43,6 @@ typedef BrushType GpBrushType; ...@@ -43,5 +43,6 @@ typedef BrushType GpBrushType;
typedef PointF GpPointF; typedef PointF GpPointF;
typedef FillMode GpFillMode; typedef FillMode GpFillMode;
typedef PathData GpPathData; typedef PathData GpPathData;
typedef LineCap GpLineCap;
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment