gdiplus: SetPenEndCap
Evan Stade
estade at gmail.com
Thu Jul 5 20:37:52 CDT 2007
Hi,
changelog:
*Added SetPenEndCap
*added linecap types
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/gdiplus_private.h | 1 +
dlls/gdiplus/pen.c | 15 +++++++++++++++
include/gdiplusenums.h | 18 ++++++++++++++++++
include/gdiplusgpstubs.h | 1 +
5 files changed, 36 insertions(+), 1 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 5ca2b0f..f3ebc6b 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -550,7 +550,7 @@
@ stub GdipSetPenDashCap197819
@ stub GdipSetPenDashOffset
@ stub GdipSetPenDashStyle
-@ stub GdipSetPenEndCap
+@ stdcall GdipSetPenEndCap(ptr long)
@ stub GdipSetPenLineCap197819
@ stub GdipSetPenLineJoin
@ stub GdipSetPenMiterLimit
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index e221044..b023c31 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -32,6 +32,7 @@ struct GpPen{
GpUnit unit;
REAL width;
HPEN gdipen;
+ GpLineCap endcap;
};
struct GpGraphics{
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index 9ee72d9..0fcbb69 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -43,6 +43,7 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB
gp_pen->color = ARGB2COLORREF(color);
gp_pen->width = width;
gp_pen->unit = unit;
+ gp_pen->endcap = LineCapFlat;
/* FIXME: Currently only solid lines supported. */
lb.lbStyle = BS_SOLID;
@@ -71,3 +72,17 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen
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;
+}
diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h
index c6b5f15..16ded0d 100644
--- a/include/gdiplusenums.h
+++ b/include/gdiplusenums.h
@@ -45,11 +45,29 @@ enum FillMode
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
typedef enum Unit Unit;
typedef enum BrushType BrushType;
typedef enum FillMode FillMode;
+typedef enum LineCap LineCap;
#endif /* end of c typedefs */
diff --git a/include/gdiplusgpstubs.h b/include/gdiplusgpstubs.h
index 6e283d8..8be4e9c 100644
--- a/include/gdiplusgpstubs.h
+++ b/include/gdiplusgpstubs.h
@@ -43,5 +43,6 @@ typedef BrushType GpBrushType;
typedef PointF GpPointF;
typedef FillMode GpFillMode;
typedef PathData GpPathData;
+typedef LineCap GpLineCap;
#endif
--
1.4.1
More information about the wine-patches
mailing list